@@ -11,23 +11,18 @@ export const mint = async (cli: CLIEnvironment, cliArgs: CLIArgs) => {
11
11
const subgraphID = cliArgs . subgraphID
12
12
const amount = parseGRT ( cliArgs . amount )
13
13
14
- const curationEntry = cli . addressBook . getEntry ( 'Curation' )
15
- const graphTokenEntry = cli . addressBook . getEntry ( 'GraphToken' )
16
-
17
- const curation = getContractAt ( 'Curation' , curationEntry . address ) . connect ( cli . wallet )
18
- const graphToken = getContractAt ( 'GraphToken' , graphTokenEntry . address ) . connect ( cli . wallet )
14
+ const curation = cli . contracts . Curation
15
+ const graphToken = cli . contracts . GraphToken
19
16
20
17
logger . log ( 'First calling approve() to ensure curation contract can call transferFrom()...' )
21
- await sendTransaction ( cli . wallet , graphToken , 'approve' , ...[ curationEntry . address , amount ] )
18
+ await sendTransaction ( cli . wallet , graphToken , 'approve' , ...[ curation . address , amount ] )
22
19
logger . log ( `Signaling on ${ subgraphID } with ${ cliArgs . amount } tokens...` )
23
20
await sendTransaction ( cli . wallet , curation , 'mint' , ...[ subgraphID , amount ] )
24
21
}
25
22
export const burn = async ( cli : CLIEnvironment , cliArgs : CLIArgs ) => {
26
23
const subgraphID = cliArgs . subgraphID
27
24
const amount = parseGRT ( cliArgs . amount )
28
-
29
- const curationEntry = cli . addressBook . getEntry ( 'Curation' )
30
- const curation = getContractAt ( 'Curation' , curationEntry . address ) . connect ( cli . wallet )
25
+ const curation = cli . contracts . Curation
31
26
32
27
logger . log ( `Burning signal on ${ subgraphID } with ${ cliArgs . amount } tokens...` )
33
28
await sendTransaction ( cli . wallet , curation , 'burn' , ...[ subgraphID , amount ] )
0 commit comments