File tree Expand file tree Collapse file tree 2 files changed +18
-227
lines changed
packages/access-control-conditions/src/lib Expand file tree Collapse file tree 2 files changed +18
-227
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -17,10 +17,25 @@ import {
1717 UnifiedAccessControlConditions ,
1818} from '@lit-protocol/types' ;
1919
20- import ABI_ERC20 from './abis/ERC20.json' ;
21-
2220const logger = pino ( { level : 'info' , name : 'humanizer' } ) ;
2321
22+ export const ERC20ABI = [
23+ {
24+ constant : true ,
25+ inputs : [ ] ,
26+ name : 'decimals' ,
27+ outputs : [
28+ {
29+ name : '' ,
30+ type : 'uint8' ,
31+ } ,
32+ ] ,
33+ payable : false ,
34+ stateMutability : 'view' ,
35+ type : 'function' ,
36+ } ,
37+ ] ;
38+
2439/**
2540 *
2641 * Get the number of decimal places in a token
@@ -44,7 +59,7 @@ export const decimalPlaces = async ({
4459 skipFetchSetup : true ,
4560 } ) ;
4661
47- const contract = new Contract ( contractAddress , ABI_ERC20 . abi , web3 ) ; // TODO drop the full ABI and just define "decimals"
62+ const contract = new Contract ( contractAddress , ERC20ABI , web3 ) ;
4863
4964 return await contract [ 'decimals' ] ( ) ;
5065} ;
You can’t perform that action at this time.
0 commit comments