Skip to content

Commit

Permalink
Chore/testnet sepolia (#126)
Browse files Browse the repository at this point in the history
* deploy contracts on sepolia

* deploy pool contracts on sepolia

* deploy wsteth price & debt swap

* deploy koda gateway

* deploy some interest rate
  • Loading branch information
thorseldon authored Mar 17, 2024
1 parent 9ce2699 commit b3530b2
Show file tree
Hide file tree
Showing 14 changed files with 10,884 additions and 10,930 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ deployed-contracts.json
!/deployments/deployed-contracts-rinkeby*.json
!/deployments/deployed-contracts-develop*.json
!/deployments/deployed-contracts-goerli*.json
!/deployments/deployed-contracts-sepolia*.json

/flattened
bend-flattened.*
Expand Down
169 changes: 169 additions & 0 deletions deployments/deployed-contracts-sepolia.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
{
"BendProxyAdminPool": {
"address": "0x60E1dD31C415687d64855ec5A3F5367cDF4e2D8A"
},
"BendProxyAdminFund": {
"address": "0x575a6BDCB1AAc7C3655f6a52A7c4e355b209DaBB"
},
"BendProxyAdminWTL": {
"address": "0x15c2Ae6eE45b57f592e6DcDf7C06a2d956c98d03",
"deployer": "0xafF5C36642385b6c7Aaf7585eC785aB2316b5db6"
},
"BendCollectorImpl": {
"address": "0x6cb417A3Cb4e2881814fa2945CCD49c3eAE435F1"
},
"BendCollector": {
"address": "0xdd3eC916c0B438b9DB2Ee675cBD412c46763a641",
"deployer": "0xafF5C36642385b6c7Aaf7585eC785aB2316b5db6"
},
"LendPoolAddressesProvider": {
"address": "0x95e84AED75EB9A545D817c391A0011E0B34EAf5C",
"deployer": "0xafF5C36642385b6c7Aaf7585eC785aB2316b5db6"
},
"LendPoolAddressesProviderRegistry": {
"address": "0x4e762Cd5695F9217E04c77df98BA9DcDadb6Cc33",
"deployer": "0xafF5C36642385b6c7Aaf7585eC785aB2316b5db6"
},
"GenericLogic": {
"address": "0xD0cA9d0caBc13F6c8Ee3dA8bafb4a4DE7f09F5aB",
"deployer": "0xafF5C36642385b6c7Aaf7585eC785aB2316b5db6"
},
"ReserveLogic": {
"address": "0x4BB3029EDdBaFE9C83068FE39643B687F15ED3dC",
"deployer": "0xafF5C36642385b6c7Aaf7585eC785aB2316b5db6"
},
"NftLogic": {
"address": "0x1C1A282F9892d1E565D7215a764E8fcd17726C3f",
"deployer": "0xafF5C36642385b6c7Aaf7585eC785aB2316b5db6"
},
"ValidationLogic": {
"address": "0x89a60BB6cE83D4514dA956165664Ba6Ee4c15687",
"deployer": "0xafF5C36642385b6c7Aaf7585eC785aB2316b5db6"
},
"SupplyLogic": {
"address": "0x1C9Ef41AC8aEC7Ec1A9F03e42AEcAF433629fEE6",
"deployer": "0xafF5C36642385b6c7Aaf7585eC785aB2316b5db6"
},
"BorrowLogic": {
"address": "0xdeE5158389802b006dD4610BddA929436B3FbD32",
"deployer": "0xafF5C36642385b6c7Aaf7585eC785aB2316b5db6"
},
"LiquidateLogic": {
"address": "0x37A76Db446bDB3EF1b73112a8D5E6868de06464f",
"deployer": "0xafF5C36642385b6c7Aaf7585eC785aB2316b5db6"
},
"ConfiguratorLogic": {
"address": "0x0d00adF5988e21Ba7E75064292232f2bf0C689c2",
"deployer": "0xafF5C36642385b6c7Aaf7585eC785aB2316b5db6"
},
"LendPoolImpl": {
"address": "0xb0A1Df91157E08F63126Be78A722C096D857D7ce"
},
"LendPool": {
"address": "0xC0a03A1c61ECf436d2C6F3285992D7270a0e8a3F"
},
"LendPoolLoanImpl": {
"address": "0xA713dC63450F8EBC6AeEF888e81b6A5BaA370dee"
},
"LendPoolLoan": {
"address": "0xaA04774b15FC5555DabC2b87Bdd6976B6C9f4Bc0"
},
"LendPoolConfiguratorImpl": {
"address": "0x77537048BEd42b0f3aCfd58D9e865774367FC0f5"
},
"LendPoolConfigurator": {
"address": "0x1252Ee9B28A632a653061bE91000f2Ccf40A9b26"
},
"BToken": {
"address": "0xA10D91F63AbCF82D8CC0637c8a9a6148E5D1bd64",
"deployer": "0xafF5C36642385b6c7Aaf7585eC785aB2316b5db6"
},
"DebtToken": {
"address": "0x0f72Dae580E04AdAe973cD12C4f8FdCE8d23cAC6",
"deployer": "0xafF5C36642385b6c7Aaf7585eC785aB2316b5db6"
},
"ReserveOracleImpl": {
"address": "0x830e8e47591F9eB047efde3b2A8E2F13e9235EC6"
},
"ReserveOracle": {
"address": "0x0EBbD387769f012a3Bbf65eaCb4Ec3db3c7693f6",
"deployer": "0xafF5C36642385b6c7Aaf7585eC785aB2316b5db6"
},
"NFTOracleImpl": {
"address": "0x958f36955e10FFaa0aC92aA65acB30Ef6268421c"
},
"NFTOracle": {
"address": "0xF143144Fb2703C8aeefD0c4D06d29F5Bb0a9C60A",
"deployer": "0xafF5C36642385b6c7Aaf7585eC785aB2316b5db6"
},
"InterestRate": {
"address": "0x3D8F428874a7fBde38a3EFBA48740bA6dD6E767f",
"deployer": "0xafF5C36642385b6c7Aaf7585eC785aB2316b5db6"
},
"rateStrategyWETH": {
"address": "0x3D8F428874a7fBde38a3EFBA48740bA6dD6E767f"
},
"WETHGatewayImpl": {
"address": "0x5703d8325485Ef2e1800322B7a322BCfa147B8D2"
},
"WETHGateway": {
"address": "0x6D48c2B1fff6868446d893e4bCAe745e33423e7C",
"deployer": "0xafF5C36642385b6c7Aaf7585eC785aB2316b5db6"
},
"PunkGatewayImpl": {
"address": "0xD22505aAF3Cc3F0809657dD85395780D313159d4"
},
"PunkGateway": {
"address": "0xe391312B83b0CdF967dC9968dcad0b170c911a68",
"deployer": "0xafF5C36642385b6c7Aaf7585eC785aB2316b5db6"
},
"WalletBalanceProvider": {
"address": "0xf4d6e94BDe83B59A72FecdDde686A3a132467C3E",
"deployer": "0xafF5C36642385b6c7Aaf7585eC785aB2316b5db6"
},
"BendProtocolDataProvider": {
"address": "0xE82FdAEd5aa1D5667f9E3eaA55226Dbf6e92d910",
"deployer": "0xafF5C36642385b6c7Aaf7585eC785aB2316b5db6"
},
"UIPoolDataProvider": {
"address": "0x65fe0C8E9d18b4959BF7f49B63796Ba9f4F9a0fb",
"deployer": "0xafF5C36642385b6c7Aaf7585eC785aB2316b5db6"
},
"ChainlinkAggregatorHelperImpl": {
"address": "0xd85D35107682510b39610C1d23b85213aADb646b"
},
"ChainlinkAggregatorHelper": {
"address": "0x1f7915Ed7A71275DF5A99646C1aab4b241d3f693",
"deployer": "0xafF5C36642385b6c7Aaf7585eC785aB2316b5db6"
},
"UniswapV3DebtSwapAdapterImpl": {
"address": "0xF08f40fa0312B23C31C4b027F26fDbc95Bcd7781"
},
"UniswapV3DebtSwapAdapter": {
"address": "0x3ea00A4A0E4Ba9a549304C5681988c5bb04dEfBe",
"deployer": "0xafF5C36642385b6c7Aaf7585eC785aB2316b5db6"
},
"WstETHPriceAggregator": {
"address": "0xf8c43C594826A778026c0e32ca6c3A300E122cb3",
"deployer": "0xafF5C36642385b6c7Aaf7585eC785aB2316b5db6"
},
"KodaGatewayImpl": {
"address": "0x8aD31a2c0e9341E3c62C44FA3F520C8A25855903"
},
"KodaGateway": {
"address": "0x45F617abbD8A9996b4feaf300F405b9b9407259B",
"deployer": "0xafF5C36642385b6c7Aaf7585eC785aB2316b5db6"
},
"rateStrategyWSTETH240130": {
"address": "0x2c449422039d69cE9FE3f651979513161F6bd22a",
"deployer": "0xafF5C36642385b6c7Aaf7585eC785aB2316b5db6"
},
"rateStrategyUSDT231211": {
"address": "0x1e976Aba254e3D8C3e7aDa5EEDB07e87AFF56D40",
"deployer": "0xafF5C36642385b6c7Aaf7585eC785aB2316b5db6"
},
"rateStrategyWETH231117": {
"address": "0x2C86cdA99e2cea822a2915fFfeB75C9D3E2830F9",
"deployer": "0xafF5C36642385b6c7Aaf7585eC785aB2316b5db6"
}
}
3 changes: 2 additions & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const getCommonNetworkConfig = (networkName: eNetwork, networkId: number) => ({
hardfork: HARDFORK,
blockGasLimit: DEFAULT_BLOCK_GAS_LIMIT,
gasMultiplier: DEFAULT_GAS_MUL,
//gasPrice: NETWORKS_DEFAULT_GAS[networkName],
gasPrice: NETWORKS_DEFAULT_GAS[networkName],
chainId: networkId,
accounts: PRIVATE_KEY
? [PRIVATE_KEY]
Expand Down Expand Up @@ -106,6 +106,7 @@ const buidlerConfig: HardhatUserConfig = {
chainId: BUIDLEREVM_CHAINID,
accounts: accounts.map(({ secretKey, balance }: { secretKey: string; balance: string }) => (secretKey)),
},
sepolia: getCommonNetworkConfig(eEthereumNetwork.sepolia, 11155111),
goerli: getCommonNetworkConfig(eEthereumNetwork.goerli, 5),
rinkeby: getCommonNetworkConfig(eEthereumNetwork.rinkeby, 4),
main: getCommonNetworkConfig(eEthereumNetwork.main, 1),
Expand Down
13 changes: 9 additions & 4 deletions helper-hardhat-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,28 @@ export const buildForkConfig = (): HardhatNetworkForkingUserConfig | undefined =
};

export const NETWORKS_RPC_URL: iParamsPerNetwork<string> = {
[eEthereumNetwork.sepolia]: ALCHEMY_KEY
? `https://eth-sepolia.g.alchemy.com/v2/${ALCHEMY_KEY}`
: `https://sepolia.infura.io/v3/${INFURA_KEY}`,
[eEthereumNetwork.goerli]: ALCHEMY_KEY
? `https://eth-goerli.alchemyapi.io/v2/${ALCHEMY_KEY}`
? `https://eth-goerli.g.alchemy.com/v2/${ALCHEMY_KEY}`
: `https://goerli.infura.io/v3/${INFURA_KEY}`,
[eEthereumNetwork.rinkeby]: ALCHEMY_KEY
? `https://eth-rinkeby.alchemyapi.io/v2/${ALCHEMY_KEY}`
? `https://eth-rinkeby.g.alchemy.com/v2/${ALCHEMY_KEY}`
: `https://rinkeby.infura.io/v3/${INFURA_KEY}`,
[eEthereumNetwork.main]: ALCHEMY_KEY
? `https://eth-mainnet.alchemyapi.io/v2/${ALCHEMY_KEY}`
? `https://eth-mainnet.g.alchemy.com/v2/${ALCHEMY_KEY}`
: `https://mainnet.infura.io/v3/${INFURA_KEY}`,
[eEthereumNetwork.coverage]: "http://localhost:8555",
[eEthereumNetwork.hardhat]: "http://localhost:8545",
[eEthereumNetwork.localhost]: "http://localhost:8545",
};

export const NETWORKS_DEFAULT_GAS: iParamsPerNetwork<number> = {
[eEthereumNetwork.sepolia]: 35 * GWEI,
[eEthereumNetwork.goerli]: 65 * GWEI,
[eEthereumNetwork.rinkeby]: 65 * GWEI,
[eEthereumNetwork.main]: 25 * GWEI,
[eEthereumNetwork.main]: 35 * GWEI,
[eEthereumNetwork.coverage]: 65 * GWEI,
[eEthereumNetwork.hardhat]: 65 * GWEI,
[eEthereumNetwork.localhost]: 65 * GWEI,
Expand All @@ -53,6 +57,7 @@ export const BLOCK_TO_FORK: iParamsPerNetwork<number | undefined> = {
[eEthereumNetwork.main]: 13623705,
[eEthereumNetwork.rinkeby]: 0,
[eEthereumNetwork.goerli]: 0,
[eEthereumNetwork.sepolia]: 0,
[eEthereumNetwork.coverage]: 0,
[eEthereumNetwork.hardhat]: 0,
[eEthereumNetwork.localhost]: 0,
Expand Down
5 changes: 5 additions & 0 deletions helpers/contracts-deployments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,11 @@ export const deployMockERC721Underlying = async (id: string, args: [string, stri
export const deployMockERC721Wrapper = async (id: string, args: [string, string, string], verify?: boolean) =>
withSaveAndVerify(await new MockerERC721WrapperFactory(await getDeploySigner()).deploy(...args), id, args, verify);

export const deployWrapperGatewayImpl = async (id: string, verify?: boolean) => {
const gatewayImpl = await new WrapperGatewayFactory(await getDeploySigner()).deploy();
return withSaveAndVerify(gatewayImpl, id + "Impl", [], verify);
};

export const deployWrapperGateway = async (id: string, verify?: boolean) => {
const gatewayImpl = await new WrapperGatewayFactory(await getDeploySigner()).deploy();
await rawInsertContractAddressInDb(id + "Impl", gatewayImpl.address);
Expand Down
4 changes: 3 additions & 1 deletion helpers/contracts-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export const linkBytecode = (artifact: Artifact, libraries: any) => {
};

export const getParamPerNetwork = <T>(param: iParamsPerNetwork<T>, network: eNetwork) => {
const { main, rinkeby, goerli, hardhat, coverage, localhost } = param as iEthereumParamsPerNetwork<T>;
const { main, rinkeby, goerli, sepolia, hardhat, coverage, localhost } = param as iEthereumParamsPerNetwork<T>;
if (process.env.FORK) {
return param[process.env.FORK as eNetwork] as T;
}
Expand All @@ -183,6 +183,8 @@ export const getParamPerNetwork = <T>(param: iParamsPerNetwork<T>, network: eNet
return hardhat;
case eEthereumNetwork.localhost:
return localhost;
case eEthereumNetwork.sepolia:
return sepolia;
case eEthereumNetwork.goerli:
return goerli;
case eEthereumNetwork.rinkeby:
Expand Down
2 changes: 1 addition & 1 deletion helpers/etherscan-verification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const okErrors = [`Contract source code already verified`, `Already Verified`];

const unableVerifyError = "Fail - Unable to verify";

export const SUPPORTED_ETHERSCAN_NETWORKS = ["main", "ropsten", "goerli", "rinkeby"];
export const SUPPORTED_ETHERSCAN_NETWORKS = ["main", "ropsten", "goerli", "sepolia", "rinkeby"];

function delay(ms: number) {
return new Promise((resolve) => setTimeout(resolve, ms));
Expand Down
2 changes: 2 additions & 0 deletions helpers/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export enum eEthereumNetwork {
localhost = "localhost",
goerli = "goerli",
rinkeby = "rinkeby",
sepolia = "sepolia",
main = "main",
}

Expand Down Expand Up @@ -351,6 +352,7 @@ export interface iEthereumParamsPerNetwork<T> {
[eEthereumNetwork.localhost]: T;
[eEthereumNetwork.goerli]: T;
[eEthereumNetwork.rinkeby]: T;
[eEthereumNetwork.sepolia]: T;
[eEthereumNetwork.main]: T;
}

Expand Down
Loading

0 comments on commit b3530b2

Please sign in to comment.