File tree Expand file tree Collapse file tree 3 files changed +4333
-3016
lines changed Expand file tree Collapse file tree 3 files changed +4333
-3016
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @vechain.energy/gas" ,
3
- "version" : " 1.0.4 " ,
3
+ "version" : " 1.1.0 " ,
4
4
"description" : " calculate estimated gas usage for transactions" ,
5
5
"repository" : " https://github.com/vechain-energy/gas.git" ,
6
6
"bugs" : " https://github.com/vechain-energy/gas/issues" ,
9
9
"types" : " types/index.d.ts" ,
10
10
"license" : " MIT" ,
11
11
"devDependencies" : {
12
- "@babel/preset-typescript" : " ^7.21.5 " ,
13
- "@types/bent" : " ^7.3.3 " ,
14
- "@types/jest" : " ^29.5.1 " ,
15
- "jest" : " ^29.5.0 " ,
16
- "ts-jest" : " ^29.1 .0" ,
17
- "typescript" : " ^5.0.4 "
12
+ "@babel/preset-typescript" : " ^7.27.1 " ,
13
+ "@types/bent" : " ^7.3.8 " ,
14
+ "@types/jest" : " ^30.0.0 " ,
15
+ "jest" : " ^30.0.3 " ,
16
+ "ts-jest" : " ^29.4 .0" ,
17
+ "typescript" : " ^5.8.3 "
18
18
},
19
19
"scripts" : {
20
20
"test" : " jest src" ,
21
21
"build" : " tsc"
22
22
},
23
23
"dependencies" : {
24
- "@vechain/connex-types" : " ^2.0.12 " ,
24
+ "@vechain/connex-types" : " ^2.2.1 " ,
25
25
"bent" : " ^7.3.12" ,
26
- "bignumber.js" : " ^9.1.1 " ,
27
- "web3-eth-abi" : " ^1.10.0 "
26
+ "bignumber.js" : " ^9.3.0 " ,
27
+ "web3-eth-abi" : " ^4.4.1 "
28
28
},
29
29
"keywords" : [
30
30
" vechain" ,
Original file line number Diff line number Diff line change 1
1
import bent from 'bent'
2
2
import BigNumber from 'bignumber.js'
3
- import Web3EthAbi from 'web3-eth-abi'
3
+ import { decodeParameter } from 'web3-eth-abi'
4
4
5
5
export default async function basePrice ( nodeOrConnex : Connex | string ) : Promise < BigNumber > {
6
6
// get base price via HTTP request
@@ -19,7 +19,7 @@ export default async function basePrice(nodeOrConnex: Connex | string): Promise<
19
19
}
20
20
21
21
const data = response [ 0 ] . data
22
- let decoded = Web3EthAbi . decodeParameter ( 'uint256' , data )
22
+ let decoded = decodeParameter ( 'uint256' , data )
23
23
return new BigNumber ( String ( decoded ) )
24
24
}
25
25
You can’t perform that action at this time.
0 commit comments