@exodus/ethereum-lib 2.14.0 → 2.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/ethereum-lib",
3
- "version": "2.14.0",
3
+ "version": "2.15.0",
4
4
  "description": "Ethereum Library",
5
5
  "main": "src/index.js",
6
6
  "author": "Exodus Movement, Inc.",
@@ -24,5 +24,5 @@
24
24
  "peerDependencies": {
25
25
  "@exodus/assets": "8.0.x"
26
26
  },
27
- "gitHead": "f898e71ce1f19bbb5cd35327f4708f55a7bcb72c"
27
+ "gitHead": "e82aa2dcf0a729e17ec2c7e304625fc6ae9d66a4"
28
28
  }
@@ -0,0 +1,124 @@
1
+ export default [
2
+ {
3
+ anonymous: false,
4
+ inputs: [
5
+ { indexed: true, internalType: 'address', name: 'owner', type: 'address' },
6
+ {
7
+ indexed: true,
8
+ internalType: 'address',
9
+ name: 'spender',
10
+ type: 'address',
11
+ },
12
+ { indexed: false, internalType: 'uint256', name: 'value', type: 'uint256' },
13
+ ],
14
+ name: 'Approval',
15
+ type: 'event',
16
+ },
17
+ {
18
+ anonymous: false,
19
+ inputs: [
20
+ { indexed: true, internalType: 'address', name: 'from', type: 'address' },
21
+ {
22
+ indexed: true,
23
+ internalType: 'address',
24
+ name: 'to',
25
+ type: 'address',
26
+ },
27
+ { indexed: false, internalType: 'uint256', name: 'value', type: 'uint256' },
28
+ ],
29
+ name: 'Transfer',
30
+ type: 'event',
31
+ },
32
+ {
33
+ inputs: [
34
+ { internalType: 'address', name: 'owner', type: 'address' },
35
+ {
36
+ internalType: 'address',
37
+ name: 'spender',
38
+ type: 'address',
39
+ },
40
+ ],
41
+ name: 'allowance',
42
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
43
+ stateMutability: 'view',
44
+ type: 'function',
45
+ },
46
+ {
47
+ inputs: [
48
+ { internalType: 'address', name: 'spender', type: 'address' },
49
+ {
50
+ internalType: 'uint256',
51
+ name: 'amount',
52
+ type: 'uint256',
53
+ },
54
+ ],
55
+ name: 'approve',
56
+ outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
57
+ stateMutability: 'nonpayable',
58
+ type: 'function',
59
+ },
60
+ {
61
+ inputs: [{ internalType: 'address', name: 'account', type: 'address' }],
62
+ name: 'balanceOf',
63
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
64
+ stateMutability: 'view',
65
+ type: 'function',
66
+ },
67
+ {
68
+ inputs: [],
69
+ name: 'decimals',
70
+ outputs: [{ internalType: 'uint8', name: '', type: 'uint8' }],
71
+ stateMutability: 'view',
72
+ type: 'function',
73
+ },
74
+ {
75
+ inputs: [],
76
+ name: 'name',
77
+ outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
78
+ stateMutability: 'view',
79
+ type: 'function',
80
+ },
81
+ {
82
+ inputs: [],
83
+ name: 'symbol',
84
+ outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
85
+ stateMutability: 'view',
86
+ type: 'function',
87
+ },
88
+ {
89
+ inputs: [],
90
+ name: 'totalSupply',
91
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
92
+ stateMutability: 'view',
93
+ type: 'function',
94
+ },
95
+ {
96
+ inputs: [
97
+ { internalType: 'address', name: 'to', type: 'address' },
98
+ {
99
+ internalType: 'uint256',
100
+ name: 'amount',
101
+ type: 'uint256',
102
+ },
103
+ ],
104
+ name: 'transfer',
105
+ outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
106
+ stateMutability: 'nonpayable',
107
+ type: 'function',
108
+ },
109
+ {
110
+ inputs: [
111
+ { internalType: 'address', name: 'from', type: 'address' },
112
+ {
113
+ internalType: 'address',
114
+ name: 'to',
115
+ type: 'address',
116
+ },
117
+ { internalType: 'uint256', name: 'amount', type: 'uint256' },
118
+ ],
119
+ name: 'transferFrom',
120
+ outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
121
+ stateMutability: 'nonpayable',
122
+ type: 'function',
123
+ },
124
+ ]
package/src/abi/index.js CHANGED
@@ -2,6 +2,7 @@ import ant from './ant'
2
2
  import cdai from './cdai'
3
3
  import dai from './dai'
4
4
  import erc20 from './ierc20-extended'
5
+ import erc20BytesParams from './ierc20-bytes-params'
5
6
  import gnt from './gnt'
6
7
  import kyberv2 from './kyberv2.js'
7
8
  import loomv2Swap from './loomv2-swap'
@@ -16,6 +17,7 @@ export default {
16
17
  cdai,
17
18
  dai,
18
19
  erc20,
20
+ erc20BytesParams,
19
21
  gnt,
20
22
  kyberv2,
21
23
  loomv2Swap,
@@ -14,6 +14,7 @@ export const isEthereumToken = (asset) => asset.assetType === 'ETHEREUM_ERC20'
14
14
  export const isBscToken = (asset) => asset.assetType === 'BSC_BEP20'
15
15
  export const isPolygonToken = (asset) => asset.assetType === 'MATIC_ERC20'
16
16
  export const isAvalancheToken = (asset) => asset.assetType === 'AVAX_ERC20'
17
+ export const isFantomToken = (asset) => asset.assetType === 'FTM_ERC20'
17
18
 
18
19
  // All ethereum-like tokens
19
20
  export const isEthereumLikeToken = (asset) => ETHEREUM_LIKE_TOKEN_TYPES.includes(asset.assetType)