File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,6 @@ import {
42
42
Web3Client ,
43
43
Web3Provider
44
44
} from './index'
45
- import { LATEST_ARC_VERSION } from './settings'
46
45
47
46
const abis = require ( './abis/abis.json' )
48
47
@@ -631,9 +630,22 @@ export class Arc extends GraphNodeObserver {
631
630
}
632
631
633
632
public approveTokens ( tokenAddress : Address , spender : Address , amount : BN ) {
634
- const erc20Abi = this . getABI ( { abiName : 'ERC20Mock' , version : LATEST_ARC_VERSION } )
635
633
const signer = ( this . web3 as JsonRpcProvider ) . getSigner ( this . defaultAccount as any )
636
- const tokenContract = new Contract ( tokenAddress , erc20Abi , signer )
634
+ const abi = [
635
+ {
636
+ constant : false ,
637
+ inputs : [
638
+ { name : '_spender' , type : 'address' } ,
639
+ { name : '_value' , type : 'uint256' }
640
+ ] ,
641
+ name : 'approve' ,
642
+ outputs : [ { name : '' , type : 'bool' } ] ,
643
+ payable : false ,
644
+ stateMutability : 'nonpayable' ,
645
+ type : 'function'
646
+ }
647
+ ]
648
+ const tokenContract = new Contract ( tokenAddress , abi , signer )
637
649
638
650
return this . sendTransaction ( {
639
651
contract : tokenContract ,
Original file line number Diff line number Diff line change @@ -286,4 +286,4 @@ export function getContractAddressesFromMigration(environment: 'private' | 'rink
286
286
}
287
287
}
288
288
return contracts
289
- }
289
+ }
You can’t perform that action at this time.
0 commit comments