Skip to content

Commit

Permalink
hardhat ignition create2 config
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanaichi committed Apr 18, 2024
1 parent 25ab90d commit 437be00
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
12 changes: 11 additions & 1 deletion basic/21-aave-uni-loan/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,16 @@ module.exports = {
timeout: 80000
},

ignition: {
strategyConfig: {
create2: {
// To learn more about salts, see the CreateX documentation
// generate via ethers.keccak256(ethers.toUtf8Bytes("dapp-learning"))
salt: "0x262a460790f6b524b7fa041acd8d42a64d405de6fcf470a86d8b706fc6d18dd7",
},
},
},

networkAddressMapping: {
matic: {
daiAddress: '0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063',
Expand All @@ -118,7 +128,7 @@ module.exports = {
wethGatewayAddress: '0xe9E52021f4e11DEAD8661812A0A6c8627abA2a54',
aaveApeAddress: '0x4699f609F4FD97A3cf74CB63EFf5cd1200Dfe3dA',
},
mainnet: {
main: {
daiAddress: '0x6B175474E89094C44Da98b954EedeAC495271d0F',
wmaticAddress: '',
wethAddress: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
Expand Down
4 changes: 2 additions & 2 deletions basic/21-aave-uni-loan/scripts/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const querySql = `

const url = {
matic: 'https://api.thegraph.com/subgraphs/name/aave/protocol-v3-polygon',
mainnet: 'https://api.thegraph.com/subgraphs/name/aave/protocol-v3',
main: 'https://api.thegraph.com/subgraphs/name/aave/protocol-v3',
optimism: 'https://api.thegraph.com/subgraphs/name/aave/protocol-v3-optimism'
}

Expand Down Expand Up @@ -231,7 +231,7 @@ main = async () => {
'id': fish
};

let interest = await getInterest(url.matic,querySql,variables)
let interest = await getInterest(url[network.name],querySql,variables)
console.log("current total interest: ",interest)
};

Expand Down

0 comments on commit 437be00

Please sign in to comment.