File tree Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ A collection of Solidity contract examples that integrate with or demonstrate th
7
7
| Contract | Polygon | Mumbai |
8
8
| ------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
9
9
| OffsetHelper | [ 0xFAFcCd01C395e4542BEed819De61f02f5562fAEa] ( https://polygonscan.com/address/0xFAFcCd01C395e4542BEed819De61f02f5562fAEa ) | [ 0x30dC279166DCFB69F52C91d6A3380dCa75D0fCa7] ( https://mumbai.polygonscan.com/address/0x30dC279166DCFB69F52C91d6A3380dCa75D0fCa7 ) |
10
+ | Swapper | [ 0x1C7f2CCa1Cd52Aae8A25B7BA4b7800c153F48D70] ( https://polygonscan.com/address/0x1C7f2CCa1Cd52Aae8A25B7BA4b7800c153F48D70 ) | [ 0xDd052AcA9AC1492a8b4F1432B68f11989903dE4d] ( https://mumbai.polygonscan.com/address/0xDd052AcA9AC1492a8b4F1432B68f11989903dE4d ) |
10
11
11
12
## OffsetHelper
12
13
Original file line number Diff line number Diff line change @@ -68,6 +68,51 @@ task("deployOffsetHelper", "Deploys and verifies OffsetHelper")
68
68
}
69
69
} ) ;
70
70
71
+ task ( "deploySwapper" , "Deploys and verifies Swapper" )
72
+ . addOptionalParam (
73
+ "verify" ,
74
+ "Set false to not verify the Swapper after deployment" ,
75
+ true ,
76
+ boolean
77
+ )
78
+ . setAction ( async ( taskArgs , hre ) => {
79
+ const Swapper = await hre . ethers . getContractFactory ( "Swapper" ) ;
80
+
81
+ const addressesToUse =
82
+ hre . network . name == "mumbai" ? mumbaiAddresses : addresses ;
83
+
84
+ const swapper = await Swapper . deploy ( tokens , [
85
+ addressesToUse . bct ,
86
+ addressesToUse . nct ,
87
+ addressesToUse . usdc ,
88
+ addressesToUse . weth ,
89
+ addressesToUse . wmatic ,
90
+ ] ) ;
91
+ await swapper . deployed ( ) ;
92
+ console . log ( `Swapper deployed on ${ hre . network . name } to:` , swapper . address ) ;
93
+
94
+ if ( taskArgs . verify === true ) {
95
+ await swapper . deployTransaction . wait ( 5 ) ;
96
+ await hre . run ( "verify:verify" , {
97
+ address : swapper . address ,
98
+ constructorArguments : [
99
+ tokens ,
100
+ [
101
+ addressesToUse . bct ,
102
+ addressesToUse . nct ,
103
+ addressesToUse . usdc ,
104
+ addressesToUse . weth ,
105
+ addressesToUse . wmatic ,
106
+ ] ,
107
+ ] ,
108
+ } ) ;
109
+ console . log (
110
+ `Swapper verified on ${ hre . network . name } to:` ,
111
+ swapper . address
112
+ ) ;
113
+ }
114
+ } ) ;
115
+
71
116
const config : HardhatUserConfig = {
72
117
defaultNetwork : "hardhat" ,
73
118
solidity : {
You can’t perform that action at this time.
0 commit comments