Releases: DePayFi/web3-client
Releases · DePayFi/web3-client
v3.0.3
only use connected wallet if it is connected to the desired blockchain
v3.0.1
always return a new provider on every request
v3.0.0
renaming to depay-web3-client
and adding support for bsc
v2.3.2
fix ethers import
v2.3.1
fix reseting cache store in tests
v2.0.0
Introduces URL syntax for blockchain resources. Also adds requesting balance.
v1.3.0
adds resetCache
to fix stale cache state have an effect on other tests
v1.2.0
allow calls with unnamed params and bump web3mock
v1.1.0
This version adds cache
cache
The cache
attribute of any call allows you to cache calls:
let getAmountsOut = ()=>call({
cache: 1000, // 1000ms = 1s
blockchain: 'ethereum',
address: '0x7a250d5630b4cf539739df2c5dacb4c659f2488d',
api: abi,
method: 'getAmountsOut',
params: {
amountIn: '1000000000000000000',
path: ['0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2','0xa0bed124a09ac2bd941b10349d8d224fe3c955eb']
}
})
getAmountsOut() // makes the call to RPC
getAmountsOut() // returns cached result
The number passed to cache
is the amount of ms the cache should stay valid (it's invalidated after Date.now + cache).
If nothing or 0
is passed to cache
, the call is not cached at all
v1.0.0
renames abi
to api
(blockchainagnostic)