iexec-contracts-js-client
JS client lib to interact with iExec Ethereum smart contracts.
Ressources
Changelog
V5.2
- optional
flavour?: 'standard'|'enterprise'
added to the constructor - optional
useGas?: boolean
added to the constructor
V4 to V5.1 migration
[BREAKING] v5.1 uses ethers v5, you may need to update your code
[BREAKING] Instanciation method changes
- use constructor
new IExecContractsClient({ provider, signer, chainId, hubAddress, isNative })
provider must be an ethers v5 Provider, signer must be a connected ethers v5 Signer
[BREAKING] removed jsonRpcProvider
jsonRpcProvider
is removed from IExecContractsClient, use signer
or provider
[BREAKING] deployed resources are NFTs identified by id
the following methods are replaced:
- getUserObjAddressByIndex -> getUserObjIdByIndex
- getUserAppAddressByIndex -> getUserAppIdByIndex
- getUserDatasetAddressByIndex -> getUserDatasetIdByIndex
- getUserWorkerpoolAddressByIndex -> getUserWorkerpoolIdByIndex
V3.1 to V4 migration
ethProvider accepts rpc url
- A json-rpc url can be used as ethProvider to access read only methods (other methods will fail)
[BREAKING] Native token usage:
- For blockchains using the native token as utility token (sidechains) the optional key
isNative
must be set to true
. Default values are provided for iexec sidechains '133' and '134'
const contracts = createIExecContracts({
ethProvider: web3Signer,
chainId,
isNative: true,
});
isNative
is exposed by IExecContracts Object- methods
fetchRLCAddress()
and getRLCContract()
are not exposed by IExecContracts when using native token
[BREAKING] Returned object changes:
- removed
ethProvider
- removed
eth
- added
jsonRpcProvider
ethersjs JsonRpcProvider