Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/node_modules
/venv
natspec/lib/*
venv-py312
/venv-py312

# Production
/build
Expand Down
34 changes: 29 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,29 +37,45 @@ The Yearn Docs [website](https://docs.yearn.fi/) is built using [Docusaurus](htt
2. Install Python/Vyper dependencies for natspec docs generation (You can skip this step if you aren't working on smart contract documentation)

This assumes you are using linux and will use the apt package manager. If not, other OSes have their own package manager that will have Python and Vyper.
The pinned `vyper==0.3.7` dependency in `requirements.txt` only supports Python `>=3.7,<3.11`,
so use Python `3.10.x` for this setup.

2a. update the apt package manager

```bash
sudo apt update
```

2b. Install Python 3
2b. Install Python 3.10

```bash
sudo apt install python3
sudo apt install python3.10 python3.10-venv
```

If `python3.10` is not available from `apt` on your distro (for example Ubuntu 24.04),
install it with a version manager such as `uv` instead:

```bash
uv python install 3.10
```

2c. Verify the installation

```bash
python3 --version
python3.10 --version
```

2d. Create and initialize python virtual environment

```bash
python3 -m venv venv
python3.10 -m venv venv
source venv/bin/activate
```

If you installed Python 3.10 with `uv`, create the environment with:

```bash
uv venv --python 3.10 --seed venv
source venv/bin/activate
```

Expand Down Expand Up @@ -239,9 +255,17 @@ For reference, these are the addresses for the different submodules:
- [yearn/yearn-ERC4626-Router](https://github.com/yearn/Yearn-ERC4626-Router)

2. If you haven't already, create a python virtual environment and initialize.
Use Python `3.10.x` here as well, since `vyper==0.3.7` does not install on Python `3.11+`.
If you installed Python 3.10 with `uv`, use the `uv venv` command below so `pip` is
seeded in the environment.

```bash
python3.10 -m venv venv
source venv/bin/activate
```

```bash
python3 -m venv venv
uv venv --python 3.10 --seed venv
source venv/bin/activate
```

Expand Down
3 changes: 2 additions & 1 deletion bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion docs/developers/addresses/core-contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ See all stYFI contracts [on this page](./styfi-contracts.md)
| --------------------- | ------------------------------------------ |
| kChad multisig | [0xe6ad5A88f5da0F276C903d9Ac2647A937c917162](https://katanascan.com/address/0xe6ad5A88f5da0F276C903d9Ac2647A937c917162) |
| Strategist multisig | [0xBe7c7efc1ef3245d37E3157F76A512108D6D7aE6](https://katanascan.com/address/0xBe7c7efc1ef3245d37E3157F76A512108D6D7aE6) |
| V3 multisig | [0x33333333D5eFb92f19a5F94a43456b3cec2797AE](https://katanascan.com/address/0x33333333D5eFb92f19a5F94a43456b3cec2797AE) |
| Timelock | [0x88Ba032be87d5EF1fbE87336B7090767F367BF73](https://katanascan.com/address/0x88Ba032be87d5EF1fbE87336B7090767F367BF73) |
| Timelock Executor | [0xF8f60BF9456A6e0141149Db2DD6f02C60da5779B](https://katanascan.com/address/0xF8f60BF9456A6e0141149Db2DD6f02C60da5779B) |

Expand Down
6 changes: 6 additions & 0 deletions docs/developers/addresses/v3-contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ All generic periphery contracts and factories can be retrieved onchain from the
| **Debt Allocator Factory** <br/> | <ContractAddress contractName = {['protocolPeriphery', 'debtAllocatorFactory']} /> |
| **Registry Factory** <br/> | <ContractAddress contractName = {['protocolPeriphery', 'registryFactory']} /> |
| **Splitter Factory** <br/> | <ContractAddress contractName = {['protocolPeriphery', 'splitterFactory']} /> |
| **Auction Registry** <br/> | <ContractAddress contractName = {['protocolPeriphery', 'auctionRegistry']} /> |
| **Auction Factory** <br/> | <ContractAddress contractName = {['protocolPeriphery', 'auctionFactory']} /> |
| **Dumper** <br/> | <ContractAddress contractName = {['protocolPeriphery', 'dumper']} /> |
| **Keeper** <br/> | <ContractAddress contractName = {['protocolPeriphery', 'keeper']} /> |
| **Base Fee Provider** <br/> | <ContractAddress contractName = {['protocolPeriphery', 'baseFeeProvider']} /> |

Expand All @@ -84,6 +86,7 @@ These addresses are consistent across all EVM chains.

| Name / ENS | Contract Address |
| ---------------------- | ---------------------- |
| **V3 Deployer Multisig** <br/> registry.v3.ychad.eth | <ContractAddress contractName = {['yearnV3ContractsStable', 'v3Deployer']} /> |
| **Current V3 Registry** <br/> registry.v3.ychad.eth | <ContractAddress contractName = {['yearnV3ContractsStable', 'registry']} /> |
| **Legacy V3 Registry** <br/> | <ContractAddress contractName = {['yearnV3ContractsStable', 'legacyRegistry1']} /> |

Expand All @@ -95,6 +98,7 @@ Ethereum-specific Yearn addresses
| ---------------------- | ---------------------- |
| **Role Manager** <br/> role-manager.v3.ychad.eth | <ContractAddress contractName = {['yearnV3ContractsMainnet', 'roleManager']} /> |
| **Accountant** <br/> accountant.v3.ychad.eth | <ContractAddress contractName = {['yearnV3ContractsMainnet', 'accountant']} /> |
| **Debt Allocator** <br/> | <ContractAddress contractName = {['yearnV3ContractsMainnet', 'debtAllocator']} /> |

### Optimism (10) Addresses

Expand Down Expand Up @@ -122,6 +126,7 @@ Base-specific Yearn addresses
| ---------------------- | ---------------------- |
| **Role Manager** <br/> | <ContractAddress contractName = {['yearnV3ContractsBase', 'roleManager']} chainID={8453} /> |
| **Accountant** <br/> | <ContractAddress contractName = {['yearnV3ContractsBase', 'accountant']} chainID={8453} /> |
| **Debt Allocator** <br/> | <ContractAddress contractName = {['yearnV3ContractsMainnet', 'debtAllocator']} /> |

### Arbitrum (42161) Addresses

Expand All @@ -131,6 +136,7 @@ Arbitrum-specific Yearn addresses
| ---------------------- | ---------------------- |
| **Role Manager** <br/> | <ContractAddress contractName = {['yearnV3ContractsArbitrum', 'roleManager']} chainID={42161} /> |
| **Accountant** <br/> | <ContractAddress contractName = {['yearnV3ContractsArbitrum', 'accountant']} chainID={42161} /> |
| **Debt Allocator** <br/> | <ContractAddress contractName = {['yearnV3ContractsMainnet', 'debtAllocator']} /> |

### Katana (747474) Addresses

Expand Down
199 changes: 199 additions & 0 deletions docs/developers/smart-contracts/V3/Periphery/AuctionFactory.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
<!-- markdownlint-disable MD024 MD034 MD036 -->
# AuctionFactory

[Git Source](https://github.com/yearn/tokenized-strategy-periphery/blob/c0dfe4a563a45efb72718547e840429b3a6092e6/src/Auctions/AuctionFactory.sol)

**Inherits:** ClonableCreate2

**Title:**
AuctionFactory

Deploy a new Auction.

## State Variables

### DEFAULT_STARTING_PRICE

The amount to start the auction with.

```solidity
uint256 public constant DEFAULT_STARTING_PRICE = 1_000_000
```

### auctions

Full array of all auctions deployed through this factory.

```solidity
address[] public auctions
```

## Functions

### constructor

```solidity
constructor() ;
```

### version

```solidity
function version() external pure returns (string memory);
```

### createNewAuction

Creates a new auction contract.

```solidity
function createNewAuction(address _want) external returns (address);
```

**Parameters**

|Name|Type|Description|
|----|----|-----------|
|`_want`|`address`|Address of the token users will bid with.|

**Returns**

|Name|Type|Description|
|----|----|-----------|
|`<none>`|`address`|_newAuction Address of the newly created auction contract.|

### createNewAuction

Creates a new auction contract.

```solidity
function createNewAuction(address _want, address _receiver) external returns (address);
```

**Parameters**

|Name|Type|Description|
|----|----|-----------|
|`_want`|`address`|Address of the token users will bid with.|
|`_receiver`|`address`|Address that will receive the funds in the auction.|

**Returns**

|Name|Type|Description|
|----|----|-----------|
|`<none>`|`address`|_newAuction Address of the newly created auction contract.|

### createNewAuction

Creates a new auction contract.

```solidity
function createNewAuction(address _want, address _receiver, address _governance) external returns (address);
```

**Parameters**

|Name|Type|Description|
|----|----|-----------|
|`_want`|`address`|Address of the token users will bid with.|
|`_receiver`|`address`|Address that will receive the funds in the auction.|
|`_governance`|`address`|Address allowed to enable and disable auctions.|

**Returns**

|Name|Type|Description|
|----|----|-----------|
|`<none>`|`address`|_newAuction Address of the newly created auction contract.|

### createNewAuction

Creates a new auction contract.

```solidity
function createNewAuction(address _want, address _receiver, address _governance, uint256 _startingPrice)
external
returns (address);
```

**Parameters**

|Name|Type|Description|
|----|----|-----------|
|`_want`|`address`|Address of the token users will bid with.|
|`_receiver`|`address`|Address that will receive the funds in the auction.|
|`_governance`|`address`|Address allowed to enable and disable auctions.|
|`_startingPrice`|`uint256`|Starting price for the auction (no decimals). NOTE: The starting price should be without decimals (1k == 1_000).|

**Returns**

|Name|Type|Description|
|----|----|-----------|
|`<none>`|`address`|_newAuction Address of the newly created auction contract.|

### createNewAuction

Creates a new auction contract.

```solidity
function createNewAuction(
address _want,
address _receiver,
address _governance,
uint256 _startingPrice,
bytes32 _salt
) external returns (address);
```

**Parameters**

|Name|Type|Description|
|----|----|-----------|
|`_want`|`address`|Address of the token users will bid with.|
|`_receiver`|`address`|Address that will receive the funds in the auction.|
|`_governance`|`address`|Address allowed to enable and disable auctions.|
|`_startingPrice`|`uint256`|Starting price for the auction (no decimals).|
|`_salt`|`bytes32`|The salt to use for deterministic deployment.|

**Returns**

|Name|Type|Description|
|----|----|-----------|
|`<none>`|`address`|_newAuction Address of the newly created auction contract.|

### _createNewAuction

Deploys and initializes a new Auction

```solidity
function _createNewAuction(
address _want,
address _receiver,
address _governance,
uint256 _startingPrice,
bytes32 _salt
) internal returns (address _newAuction);
```

### getAllAuctions

Get the full list of auctions deployed through this factory.

```solidity
function getAllAuctions() external view returns (address[] memory);
```

### numberOfAuctions

Get the total number of auctions deployed through this factory.

```solidity
function numberOfAuctions() external view returns (uint256);
```

## Events

### DeployedNewAuction

```solidity
event DeployedNewAuction(address indexed auction, address indexed want);
```
Loading
Loading