ABI manager
matic.js internally uses ABIManager for handling ABI management, configuration for you. All of the ABI and config are taken from static repo.
matic.js internally uses ABIManager for handling ABI management, configuration for you. All of the ABI and config are taken from static repo.
Change ABI
Sometimes you are required to change the ABI, particularly when you are developing a contract. You can do so by using ABIManager.
Syntax
import { ABIManager } from '@maticnetwork/maticjs'
const manager = new ABIManager(<network name>,<version>);
await manager.init();
// set abi
manager.setABI(<contract name>,<bridge type>, <abi value>);
// get abi
manager.getABI(<contract name>,<bridge type>);The network name, contract name, bridge name etc can be taken from our official static repo.
Example
import { ABIManager } from '@maticnetwork/maticjs'
const manager = new ABIManager('testnet','amoy');
await manager.init();
// set abi
manager.setABI('ERC20PredicateProxy','pos', 'abi value');
// get abi
manager.getABI('ERC20PredicateProxy','pos');Last updated on
Set proof API
The API links have been changed from https://apis.matic.network &rarr; https://proof-generator.polygon.technology. Please make sure to update the links.
Exit util
matic.js internally use ExitUtil for generating proofs. It is a class which has different methods for helping with exit utilities.