diff --git a/.github/workflows/deployment-checks.yml b/.github/workflows/deployment-checks.yml index a1c51e64..9ba8a887 100644 --- a/.github/workflows/deployment-checks.yml +++ b/.github/workflows/deployment-checks.yml @@ -107,6 +107,16 @@ jobs: BASE_RPC_ENDPOINT: ${{ secrets.BASE_RPC_ENDPOINT }} with: network-name: base + check-fantom-deployments: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Check Fantom Deployment Addresses + uses: ./.github/actions/check-network-deployments + env: + FANTOM_RPC_ENDPOINT: ${{ secrets.FANTOM_RPC_ENDPOINT }} + with: + network-name: fantom check-goerli-deployments: runs-on: ubuntu-latest steps: @@ -218,6 +228,16 @@ jobs: BASE_RPC_ENDPOINT: ${{ secrets.BASE_RPC_ENDPOINT }} with: network-name: base + check-fantom-action-ids: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Check Fantom Action IDs + uses: ./.github/actions/check-network-action-ids + env: + FANTOM_RPC_ENDPOINT: ${{ secrets.FANTOM_RPC_ENDPOINT }} + with: + network-name: fantom check-goerli-action-ids: runs-on: ubuntu-latest steps: diff --git a/action-ids/fantom/action-ids.json b/action-ids/fantom/action-ids.json new file mode 100644 index 00000000..bddb8fca --- /dev/null +++ b/action-ids/fantom/action-ids.json @@ -0,0 +1,52 @@ +{ + "20210418-vault": { + "Vault": { + "useAdaptor": false, + "actionIds": { + "batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)": "0x613346615cf0b67eb4dddb25974f638ea9054ffcba6253356eab0c0d6b2beee5", + "deregisterTokens(bytes32,address[])": "0x40a88a4d4208ce22e6f9279d454f391e99eb5f5c45161dc41f22a28375c00ce7", + "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))": "0x1f49de385af1f787ffdbaa879dd9f69a291a44d65e3209396c0faeaf35165e42", + "flashLoan(address,address[],uint256[],bytes)": "0xed78cdc6e17c42a1dd1f9136fe40b12bf790b6ef16405ddb71c409beb0512772", + "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))": "0xe4f58b20b91d2aa26b17bf7b6d206053ef49c007c105db60c6c5b63ba61eb159", + "managePoolBalance((uint8,bytes32,address,uint256)[])": "0x5cd3ae1c2bb7376da46b0d1a38f51048a2d3b20780cf6f96795d2424f13aaad2", + "manageUserBalance((uint8,address,uint256,address,address)[])": "0xb9fe74424b9ef83062b3b19b2d4afff4e31d0ecee07c4d44f830f84db1d68415", + "queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))": "0x659f3141dbdbc64b86ed2ebce6cb53be16c77f97ad8ecf6854bdbadc2b8bf6e0", + "registerPool(uint8)": "0x32adf8e96622c9f170a5bd69057f3f3acd6a57b2ffde1b7ee60a8ec638e77d26", + "registerTokens(bytes32,address[],address[])": "0xcfbbfb34caebcee01f914f8abd47ecb844db698ec2960993029f1ad76cee63a3", + "setAuthorizer(address)": "0xf41701137fd710c221d68f7103fd6a64c3914383f695636a59d588226646c9df", + "setPaused(bool)": "0x5bc378820edc8261ac3898ec88e8bee0d5f16fb9f6f71435a59f1a8010f8b677", + "setRelayerApproval(address,address,bool)": "0xcd0cc5c1132a8d963f443e6d4eace05e0fc29532dae743d2e03a7391a9b25ec1", + "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)": "0x4f471780cf1bf482a126b1bde17518ff8d63bb1b35ec0e7ac2c594d1e62abc25" + } + }, + "ProtocolFeesCollector": { + "useAdaptor": false, + "actionIds": { + "setFlashLoanFeePercentage(uint256)": "0xdf9dc03a6ab1cf43cd556a9e3f5f91e7e6fe495dd7ae950689bf294fdbf699ed", + "setSwapFeePercentage(uint256)": "0xaa71aa88cd3944c17523ff0a64c6e533d8066ea755c4539194cb741182cb9ecc", + "withdrawCollectedFees(address[],uint256[],address)": "0x91a484dd2c010cdae861f168371dad11bcb6432aaf363ba69dc6d2abf56c7c20" + } + }, + "BalancerHelpers": { + "useAdaptor": true, + "actionIds": { + "queryExit(bytes32,address,address,(address[],uint256[],bytes,bool))": "0x512b9a93fd57632fc35a0124b55602916796d411fc8c4a823f28cd78ba495ef2", + "queryJoin(bytes32,address,address,(address[],uint256[],bytes,bool))": "0x55eb5e239a30128b882e2e463c0a776a7d5624023c57d2fe879e24f1afddf42b" + } + } + }, + "20210418-authorizer": { + "Authorizer": { + "useAdaptor": true, + "actionIds": { + "grantRole(bytes32,address)": "0x86b5f83c06d20c9d4735e35beb5eb5926f231219976e93a14741e51036265285", + "grantRoles(bytes32[],address)": "0x3abaed4e576fa8b4709de963b82a2c271bfbf32e2683ca9aa0fd334206b19f5b", + "grantRolesToMany(bytes32[],address[])": "0x7ccc4ffbf7a31a03bb8bb809993c2ced0b0da0ef010eb72b15602e99b84e2e42", + "renounceRole(bytes32,address)": "0x9bee1368d353cdf1019a4c0fe291e9dbc46f00510856443923c4e51d939fb069", + "revokeRole(bytes32,address)": "0x49aea02dbec1410fd8fb7de27e5250d6be519c1e5bf5bd29e057922218720df7", + "revokeRoles(bytes32[],address)": "0xf1a230ca8eaf24aefa82b0b85cd7fb19407feefcfb986c8a9d80a48922ddfab1", + "revokeRolesFromMany(bytes32[],address[])": "0x67b84c426d4bf6689457859eb80edae734f93248d30e247662e996f644eddd8a" + } + } + } +} \ No newline at end of file diff --git a/addresses/.supported-networks.json b/addresses/.supported-networks.json index 108fdaea..50236475 100644 --- a/addresses/.supported-networks.json +++ b/addresses/.supported-networks.json @@ -38,5 +38,9 @@ "base": { "chainId": 8453, "block-explorer": "https://basescan.org" + }, + "fantom": { + "chainId": 250, + "block-explorer": "https://ftmscan.com" } } diff --git a/addresses/fantom.json b/addresses/fantom.json new file mode 100644 index 00000000..bf2a5ee6 --- /dev/null +++ b/addresses/fantom.json @@ -0,0 +1,55 @@ +{ + "20210418-authorizer": { + "contracts": [ + { + "name": "Authorizer", + "address": "0x974D3FF709D84Ba44cde3257C0B5B0b14C081Ce9" + } + ], + "status": "ACTIVE" + }, + "20210418-vault": { + "contracts": [ + { + "name": "Vault", + "address": "0x20dd72Ed959b6147912C2e529F0a0C651c33c9ce" + }, + { + "name": "ProtocolFeesCollector", + "address": "0xC6920d3a369E7c8BD1A22DbE385e11d1F7aF948F" + }, + { + "name": "BalancerHelpers", + "address": "0x230a59F4d9ADc147480f03B0D3fFfeCd56c3289a" + } + ], + "status": "ACTIVE" + }, + "20220325-authorizer-adaptor": { + "contracts": [ + { + "name": "AuthorizerAdaptor", + "address": "0xf7D5DcE55E6D47852F054697BAB6A1B48A00ddbd" + } + ], + "status": "ACTIVE" + }, + "20220325-test-balancer-token": { + "contracts": [ + { + "name": "TestBalancerToken", + "address": "0x45fFd460cC6642B8D8Fb12373DFd77Ceb0f4932B" + } + ], + "status": "ACTIVE" + }, + "20220721-balancer-queries": { + "contracts": [ + { + "name": "BalancerQueries", + "address": "0x1B0A42663DF1edeA171cD8732d288a81EFfF6d23" + } + ], + "status": "ACTIVE" + } +} \ No newline at end of file diff --git a/ci/prepare-config.ts b/ci/prepare-config.ts index cc6e01bd..5f41c159 100644 --- a/ci/prepare-config.ts +++ b/ci/prepare-config.ts @@ -42,6 +42,9 @@ if (process.env.CI) { }, "base": { "url": "${process.env.BASE_RPC_ENDPOINT}" + }, + "fantom": { + "url": "${process.env.FANTOM_RPC_ENDPOINT}" } }, "defaultConfig": { diff --git a/deployment-txs/fantom.json b/deployment-txs/fantom.json new file mode 100644 index 00000000..e1a72a2f --- /dev/null +++ b/deployment-txs/fantom.json @@ -0,0 +1,9 @@ +{ + "0x974D3FF709D84Ba44cde3257C0B5B0b14C081Ce9": "0x9b3ec8fe9f5daace7799b75f609893586674a43c075780704efd66e8a4f9cddc", + "0x20dd72Ed959b6147912C2e529F0a0C651c33c9ce": "0xf20fda67cd02d4c925b21e7e03a1a005d87c5cf565fe0038618e8976952d84ac", + "0xC6920d3a369E7c8BD1A22DbE385e11d1F7aF948F": "0xf20fda67cd02d4c925b21e7e03a1a005d87c5cf565fe0038618e8976952d84ac", + "0x230a59F4d9ADc147480f03B0D3fFfeCd56c3289a": "0xcfd907698d30a8c99a857573944ba512f41041f00b4a80107075532531181afe", + "0xf7D5DcE55E6D47852F054697BAB6A1B48A00ddbd": "0xc29b723ff783a778ce0ef6a7f43040a720e134af0e03547f5d94fc3045844d62", + "0x45fFd460cC6642B8D8Fb12373DFd77Ceb0f4932B": "0x04ce127af1d5addc67295c7e2d5375ed9ea8bc4a2ace73b2f3507ddcefb18a06", + "0x1B0A42663DF1edeA171cD8732d288a81EFfF6d23": "0x020b022f0f0392cc765afb9cf140137721c4029d45d89251943f5416224f2a97" +} \ No newline at end of file diff --git a/hardhat.config.ts b/hardhat.config.ts index 3f83521c..911eee18 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -345,6 +345,14 @@ export default { browserURL: 'https://basescan.org/', }, }, + { + network: 'fantom', + chainId: 250, + urls: { + apiURL: 'https://api.ftmscan.com/api', + browserURL: 'https://ftmscan.com', + }, + }, ], }, }; diff --git a/package.json b/package.json index dde442bd..8d237884 100644 --- a/package.json +++ b/package.json @@ -25,12 +25,12 @@ "check": "yarn check-artifacts && yarn check-deployments", "check-artifacts": "hardhat check-artifacts", "check-network-deployments": "hardhat check-deployments --network", - "check-deployments": "hardhat check-deployments --network mainnet && hardhat check-deployments --network polygon && hardhat check-deployments --network arbitrum && hardhat check-deployments --network optimism && hardhat check-deployments --network goerli && hardhat check-deployments --network bsc && hardhat check-deployments --network avalanche && hardhat check-deployments --network zkevm && hardhat check-deployments --network base && hardhat check-deployments --network sepolia", + "check-deployments": "hardhat check-deployments --network mainnet && hardhat check-deployments --network polygon && hardhat check-deployments --network arbitrum && hardhat check-deployments --network optimism && hardhat check-deployments --network goerli && hardhat check-deployments --network bsc && hardhat check-deployments --network avalanche && hardhat check-deployments --network zkevm && hardhat check-deployments --network base && hardhat check-deployments --network fantom && hardhat check-deployments --network sepolia", "check-network-action-ids": "hardhat check-action-ids --network", - "check-action-ids": "hardhat check-action-ids --network mainnet && hardhat check-action-ids --network polygon && hardhat check-action-ids --network arbitrum && hardhat check-action-ids --network optimism && hardhat check-action-ids --network bsc && hardhat check-action-ids --network avalanche && hardhat check-action-ids --network zkevm && hardhat check-action-ids --network base && hardhat check-action-ids --network sepolia", + "check-action-ids": "hardhat check-action-ids --network mainnet && hardhat check-action-ids --network polygon && hardhat check-action-ids --network arbitrum && hardhat check-action-ids --network optimism && hardhat check-action-ids --network bsc && hardhat check-action-ids --network avalanche && hardhat check-action-ids --network zkevm && hardhat check-action-ids --network base && hardhat check-action-ids --network fantom && hardhat check-action-ids --network sepolia", "extract-artifacts": "hardhat extract-artifacts", - "build-address-lookup": "hardhat build-address-lookup --network mainnet && hardhat build-address-lookup --network polygon && hardhat build-address-lookup --network arbitrum && hardhat build-address-lookup --network optimism && hardhat build-address-lookup --network gnosis && hardhat build-address-lookup --network bsc && hardhat build-address-lookup --network avalanche && hardhat build-address-lookup --network zkevm && hardhat build-address-lookup --network base && hardhat build-address-lookup --network goerli && hardhat build-address-lookup --network sepolia", - "check-address-lookup": "hardhat check-address-lookup --network mainnet && hardhat check-address-lookup --network polygon && hardhat check-address-lookup --network arbitrum && hardhat check-address-lookup --network optimism && hardhat check-address-lookup --network gnosis && hardhat check-address-lookup --network bsc && hardhat check-address-lookup --network avalanche && hardhat check-address-lookup --network zkevm && hardhat check-address-lookup --network base && hardhat check-address-lookup --network goerli && hardhat check-address-lookup --network sepolia", + "build-address-lookup": "hardhat build-address-lookup --network mainnet && hardhat build-address-lookup --network polygon && hardhat build-address-lookup --network arbitrum && hardhat build-address-lookup --network optimism && hardhat build-address-lookup --network gnosis && hardhat build-address-lookup --network bsc && hardhat build-address-lookup --network avalanche && hardhat build-address-lookup --network zkevm && hardhat build-address-lookup --network base && hardhat build-address-lookup --network fantom && hardhat build-address-lookup --network goerli && hardhat build-address-lookup --network sepolia", + "check-address-lookup": "hardhat check-address-lookup --network mainnet && hardhat check-address-lookup --network polygon && hardhat check-address-lookup --network arbitrum && hardhat check-address-lookup --network optimism && hardhat check-address-lookup --network gnosis && hardhat check-address-lookup --network bsc && hardhat check-address-lookup --network avalanche && hardhat check-address-lookup --network zkevm && hardhat check-address-lookup --network base && hardhat check-address-lookup --network fantom && hardhat check-address-lookup --network goerli && hardhat check-address-lookup --network sepolia", "lint": "yarn lint:solidity && yarn lint:typescript", "lint:solidity": "solhint 'src/helpers/contracts/**/*.sol'", "lint:typescript": "NODE_NO_WARNINGS=1 eslint . --ext .ts --ignore-path ./.eslintignore --max-warnings 0", diff --git a/src/types.ts b/src/types.ts index 5ebc2ed3..1c01fe20 100644 --- a/src/types.ts +++ b/src/types.ts @@ -17,6 +17,7 @@ export const NETWORKS = [ 'zkevm', 'sepolia', 'base', + 'fantom', ]; export type Network = (typeof NETWORKS)[number]; diff --git a/tasks/00000000-tokens/output/fantom.json b/tasks/00000000-tokens/output/fantom.json new file mode 100644 index 00000000..4569afa5 --- /dev/null +++ b/tasks/00000000-tokens/output/fantom.json @@ -0,0 +1,4 @@ +{ + "BAL": "0x45fFd460cC6642B8D8Fb12373DFd77Ceb0f4932B", + "WETH": "0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83" +} \ No newline at end of file diff --git a/tasks/20210418-authorizer/input.ts b/tasks/20210418-authorizer/input.ts index 357bdb0d..9def0d45 100644 --- a/tasks/20210418-authorizer/input.ts +++ b/tasks/20210418-authorizer/input.ts @@ -39,4 +39,7 @@ export default { base: { admin: '0xC40DCFB13651e64C8551007aa57F9260827B6462', }, + fantom: { + admin: '0x4fbe899d37fb7514adf2f41B0630E018Ec275a0C', + }, }; diff --git a/tasks/20210418-authorizer/output/fantom.json b/tasks/20210418-authorizer/output/fantom.json new file mode 100644 index 00000000..d4749256 --- /dev/null +++ b/tasks/20210418-authorizer/output/fantom.json @@ -0,0 +1,3 @@ +{ + "Authorizer": "0x974D3FF709D84Ba44cde3257C0B5B0b14C081Ce9" +} \ No newline at end of file diff --git a/tasks/20210418-authorizer/readme.md b/tasks/20210418-authorizer/readme.md index aeefbba8..ac1322ef 100644 --- a/tasks/20210418-authorizer/readme.md +++ b/tasks/20210418-authorizer/readme.md @@ -15,6 +15,7 @@ This contract is expected to be eventually replaced by one with a) native suppor - [Avalanche mainnet addresses](./output/avalanche.json) - [Polygon zkeVM mainnet addresses](./output/zkevm.json) - [Base mainnet addresses](./output/base.json) +- [Fantom mainnet addresses](./output/fantom.json) - [Goerli testnet addresses](./output/goerli.json) - [Sepolia testnet addresses](./output/sepolia.json) - [`Authorizer` artifact](./artifact/Authorizer.json) diff --git a/tasks/20210418-vault/output/fantom.json b/tasks/20210418-vault/output/fantom.json new file mode 100644 index 00000000..3c0e2b76 --- /dev/null +++ b/tasks/20210418-vault/output/fantom.json @@ -0,0 +1,5 @@ +{ + "Vault": "0x20dd72Ed959b6147912C2e529F0a0C651c33c9ce", + "ProtocolFeesCollector": "0xC6920d3a369E7c8BD1A22DbE385e11d1F7aF948F", + "BalancerHelpers": "0x230a59F4d9ADc147480f03B0D3fFfeCd56c3289a" +} \ No newline at end of file diff --git a/tasks/20210418-vault/readme.md b/tasks/20210418-vault/readme.md index be54fc5f..21c5ef90 100644 --- a/tasks/20210418-vault/readme.md +++ b/tasks/20210418-vault/readme.md @@ -17,6 +17,7 @@ Aditionally, the `WETH` argument may represent different things in different net - [Avalanche mainnet addresses](./output/avalanche.json) - [Polygon zkeVM mainnet addresses](./output/zkevm.json) - [Base mainnet addresses](./output/base.json) +- [Fantom mainnet addresses](./output/fantom.json) - [Goerli testnet addresses](./output/goerli.json) - [Sepolia testnet addresses](./output/sepolia.json) - [`Vault` artifact](./artifact/Vault.json) diff --git a/tasks/20220325-authorizer-adaptor/output/fantom.json b/tasks/20220325-authorizer-adaptor/output/fantom.json new file mode 100644 index 00000000..b6137c38 --- /dev/null +++ b/tasks/20220325-authorizer-adaptor/output/fantom.json @@ -0,0 +1,3 @@ +{ + "AuthorizerAdaptor": "0xf7D5DcE55E6D47852F054697BAB6A1B48A00ddbd" +} \ No newline at end of file diff --git a/tasks/20220325-authorizer-adaptor/readme.md b/tasks/20220325-authorizer-adaptor/readme.md index 98257d27..9e3274aa 100644 --- a/tasks/20220325-authorizer-adaptor/readme.md +++ b/tasks/20220325-authorizer-adaptor/readme.md @@ -15,6 +15,7 @@ The adaptor may then be the admin for these systems and acts as a proxy forwardi - [Avalanche mainnet addresses](./output/avalanche.json) - [Polygon zkeVM mainnet addresses](./output/zkevm.json) - [Base mainnet addresses](./output/base.json) +- [Fantom mainnet addresses](./output/fantom.json) - [Goerli testnet addresses](./output/goerli.json) - [Sepolia testnet addresses](./output/sepolia.json) - [`AuthorizerAdaptor` artifact](./artifact/AuthorizerAdaptor.json) diff --git a/tasks/20220325-test-balancer-token/input.ts b/tasks/20220325-test-balancer-token/input.ts index ffc32551..df970eb0 100644 --- a/tasks/20220325-test-balancer-token/input.ts +++ b/tasks/20220325-test-balancer-token/input.ts @@ -15,4 +15,7 @@ export default { base: { Admin: '0xC40DCFB13651e64C8551007aa57F9260827B6462', }, + fantom: { + Admin: '0x9d0327954009C59eD70Dc98b7726e911879d4D92', + }, }; diff --git a/tasks/20220325-test-balancer-token/output/fantom.json b/tasks/20220325-test-balancer-token/output/fantom.json new file mode 100644 index 00000000..cc08a8ad --- /dev/null +++ b/tasks/20220325-test-balancer-token/output/fantom.json @@ -0,0 +1,3 @@ +{ + "TestBalancerToken": "0x45fFd460cC6642B8D8Fb12373DFd77Ceb0f4932B" +} \ No newline at end of file diff --git a/tasks/20220325-test-balancer-token/readme.md b/tasks/20220325-test-balancer-token/readme.md index b492de8c..0b087fae 100644 --- a/tasks/20220325-test-balancer-token/readme.md +++ b/tasks/20220325-test-balancer-token/readme.md @@ -5,6 +5,7 @@ Deployment of the `TestBalancerToken`, for replicating the BAL token's access co ## Useful Files - [Base mainnet addresses](./output/base.json) +- [Fantom mainnet addresses](./output/fantom.json) - [Goerli testnet addresses](./output/goerli.json) - [Sepolia testnet addresses](./output/sepolia.json) - [`TestBalancerToken` artifact](./artifact/TestBalancerToken.json) diff --git a/tasks/20220721-balancer-queries/output/fantom.json b/tasks/20220721-balancer-queries/output/fantom.json new file mode 100644 index 00000000..5b442489 --- /dev/null +++ b/tasks/20220721-balancer-queries/output/fantom.json @@ -0,0 +1,3 @@ +{ + "BalancerQueries": "0x1B0A42663DF1edeA171cD8732d288a81EFfF6d23" +} \ No newline at end of file diff --git a/tasks/20220721-balancer-queries/readme.md b/tasks/20220721-balancer-queries/readme.md index 25ed8cea..93e2e74e 100644 --- a/tasks/20220721-balancer-queries/readme.md +++ b/tasks/20220721-balancer-queries/readme.md @@ -14,6 +14,7 @@ result they would have if called on the Vault given the current state. - [Avalanche mainnet addresses](./output/avalanche.json) - [Polygon zkeVM mainnet addresses](./output/zkevm.json) - [Base mainnet addresses](./output/base.json) +- [Fantom mainnet addresses](./output/fantom.json) - [Goerli testnet addresses](./output/goerli.json) - [Sepolia testnet addresses](./output/sepolia.json) - [`BalancerQueries` artifact](./artifact/BalancerQueries.json)