@@ -48,7 +48,7 @@ module.exports = {
4848task ( "deploy" , "Deploy bridge contract" )
4949 . addParam ( "environment" , "Config file name without extension" )
5050 . setAction ( async ( taskArgs , hre ) => {
51- const { deploy } = require ( "./scripts/deploy .js" ) ;
51+ const { deploy } = require ( "./scripts/utils .js" ) ;
5252 const [ signer ] = await hre . ethers . getSigners ( ) ;
5353 const config = require ( `./scripts/aurora_${ taskArgs . environment } .params.json` ) ;
5454
@@ -60,3 +60,56 @@ task("deploy", "Deploy bridge contract")
6060 auroraUtilsAddress : config . utilsAddress ,
6161 } ) ;
6262 } ) ;
63+
64+ task ( "deployImpl" , "Deploy implementation bridge contract" )
65+ . addParam ( "environment" , "Config file name without extension" )
66+ . setAction ( async ( taskArgs , hre ) => {
67+ const { deployImplementation } = require ( "./scripts/utils.js" ) ;
68+ const config = require ( `./scripts/aurora_${ taskArgs . environment } .params.json` ) ;
69+
70+ await hre . run ( "compile" ) ;
71+ await deployImplementation ( {
72+ wNearAddress : config . wNearAddress ,
73+ eNearAccountId : config . eNearAccountId ,
74+ auroraSdkAddress : config . auroraSdkAddress ,
75+ auroraUtilsAddress : config . utilsAddress ,
76+ } ) ;
77+ } ) ;
78+
79+ task ( "upgrade" , "Upgrade bridge contract" )
80+ . addParam ( "environment" , "Config file name without extension" )
81+ . setAction ( async ( taskArgs , hre ) => {
82+ const { upgrade } = require ( "./scripts/utils.js" ) ;
83+ const [ signer ] = await hre . ethers . getSigners ( ) ;
84+ const config = require ( `./scripts/aurora_${ taskArgs . environment } .params.json` ) ;
85+
86+ await hre . run ( "compile" ) ;
87+ await upgrade ( {
88+ signer,
89+ proxyAddress : config . proxyAddress ,
90+ auroraSdkAddress : config . auroraSdkAddress ,
91+ auroraUtilsAddress : config . utilsAddress ,
92+ } ) ;
93+ } ) ;
94+
95+
96+ task ( "withdraw" , "Withdraw from implicit near account" )
97+ . addParam ( "recipient" , "Recipient address" )
98+ . addParam ( "amount" , "Amount to withdraw" )
99+ . addParam ( "environment" , "Config file name without extension" )
100+ . setAction ( async ( taskArgs , hre ) => {
101+ const { withdraw } = require ( "./scripts/utils.js" ) ;
102+ const [ signer ] = await hre . ethers . getSigners ( ) ;
103+ const config = require ( `./scripts/aurora_${ taskArgs . environment } .params.json` ) ;
104+
105+ await hre . run ( "compile" ) ;
106+ await withdraw ( {
107+ recipientAddress : taskArgs . recipient ,
108+ amount : taskArgs . amount ,
109+ signer,
110+ wNearAccountId : config . wNearAccountId ,
111+ proxyAddress : config . proxyAddress ,
112+ auroraSdkAddress : config . auroraSdkAddress ,
113+ auroraUtilsAddress : config . utilsAddress ,
114+ } ) ;
115+ } ) ;
0 commit comments