@exodus/ethereum-api 6.3.13 → 6.3.14

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/ethereum-api",
3
- "version": "6.3.13",
3
+ "version": "6.3.14",
4
4
  "description": "Ethereum Api",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -16,7 +16,7 @@
16
16
  "dependencies": {
17
17
  "@exodus/asset-lib": "^3.7.1",
18
18
  "@exodus/crypto": "^1.0.0-rc.0",
19
- "@exodus/ethereum-lib": "^3.3.32",
19
+ "@exodus/ethereum-lib": "^3.3.33",
20
20
  "@exodus/ethereumjs-util": "^7.1.0-exodus.6",
21
21
  "@exodus/fetch": "^1.3.0-beta.4",
22
22
  "@exodus/simple-retry": "^0.0.6",
@@ -34,5 +34,5 @@
34
34
  "devDependencies": {
35
35
  "@exodus/models": "^8.10.4"
36
36
  },
37
- "gitHead": "3bda147deb846bf356029d43654cee5bb4f78254"
37
+ "gitHead": "a3f47ac29169f74502d0889f1cf867416fdce821"
38
38
  }
@@ -1,12 +1,6 @@
1
1
  import { EthereumStaking } from './ethereum-staking'
2
2
 
3
- // stake(uint256 source)
4
- const DELEGATE = '0x3a29dbae'
5
- // unstakePending(uint256 amount)
6
- const UNSTAKE_PENDING = '0xed0723d4'
7
-
8
- // unstake(uint256 amount)
9
- const UNSTAKE = '0x215f826b'
3
+ const { DELEGATE, UNSTAKE, UNSTAKE_PENDING } = EthereumStaking.METHODS_IDS
10
4
 
11
5
  const STAKING_MANAGER_CONTRACTS = [
12
6
  EthereumStaking.addresses.ethereum.EVERSTAKE_ADDRESS_CONTRACT_POOL.toLowerCase(),
@@ -21,6 +15,4 @@ export const isEthereumDelegate = (tx) =>
21
15
  tx.data?.methodId === DELEGATE
22
16
  export const isEthereumUndelegate = (tx) => isEthereumStakingTx(tx) && tx.data?.methodId === UNSTAKE
23
17
  export const isEthereumClaimUndelegate = (tx) =>
24
- isEthereumStakingTx(tx) &&
25
- STAKING_MANAGER_CONTRACTS.includes(tx.from[0]) &&
26
- tx.data?.methodId === UNSTAKE_PENDING
18
+ isEthereumStakingTx(tx) && tx.data?.methodId === UNSTAKE_PENDING
@@ -17,6 +17,11 @@ export class EthereumStaking {
17
17
  EVERSTAKE_ADDRESS_CONTRACT_POOL: '0x1F28aD3B3e26192a09c1248D4092c692c32f8Ec0',
18
18
  },
19
19
  }
20
+ static METHODS_IDS = {
21
+ DELEGATE: '0x3a29dbae', // stake(uint256 source)
22
+ UNSTAKE: '0x215f826b', // unstake(uint256 amount)
23
+ UNSTAKE_PENDING: '0x33986ffa', // unstakePending(uint256 amount)
24
+ }
20
25
 
21
26
  constructor(
22
27
  asset, // ethereum or ethereumgoerli for testnet