Near Protocol Contract
Last updated
Last updated
Here to get MAPO mainnet and testnet MCS contract address.
Transfer from Mapo to Near based on the proof data and event. Must attach enough NEAR funds to cover for storage of the proof.
receipt_proof
ReceiptProof
the proof of one receipt
index
usize
the index of event among all the events in the receipt
Transfer out tokens to other blockchain.
token
String
NEAR account of the mcs token contract
to
Vec
the target account address on target blockchain
amount
U128
the amount of token to transfer out
to_chain
u128
the chain id of target blockchain
Transfer out native token to other blockchain.
to
Vec
the target account address on target blockchain
to_chain
u128
the chain id of target blockchain
Deposit out native token to MAP blockchain.
to
Vec
the target account address on MAP blockchain
Initialize the contract with configuration parameters.
map_light_client
String
NEAR account of the MAP light client contract
map_bridge_address
String
the address of the MCS contract on MAP blockchain, in hex
wrapped_token
String
NEAR account of the wrap near contract
near_chain_id
u128
the chain id of the near blockchain
Get the version info of the current MCS contract.
Deploy MCS token contract. The deployed token can be minted/burnt by MCS contract.
name
String
the name of MCS token, the full address of the token will be .
Check if the event is ussed or not.
order_id
&CryptoHash
the order id of the event
bool
true if the event is already used, false otherwise
Get the record information( validators, threshold and epoch) for the epecified epoch.
address
String
the contract address of the MCS token
name
Option
the human-readable name of the token
symbol
Option
the abbreviation, like wETH or AMPL
reference
Option
a link to a valid JSON file containing various keys offering supplementary details on the token
reference_hash
Option
the base64-encoded sha256 hash of the JSON file contained in the reference field
decimals
Option
used in frontends to show the proper significant digits of a token
icon
Option
a small image associated with this token
Get the controller of the MCS contract.
Option
the controller account id of the MCS contract
Set the controller of the MCS contract.
controller
AccountId
the controller account id of the MCS contract
Check if the predecessor is controller or self.
bool
true if the predecessor is controller or self, false otherwise
Get all deployed MCS tokens and their target chains.
Vec<(String, HashSet)>
deployed MCS tokens and their target chains
Get all registered fungible tokens and their target chains.
Vec<(String, HashSet)>
registered fungible tokens and their target chains
Get all registered native token target chains.
HashSet
registered native token target chains
Add target chain for native token.
to_chain
u128
target chain id
Remove target chain for native token.
to_chain
u128
target chain id
Allow the MCS token to be transfered to the target chain.
token
String
MCS token address
to_chain
u128
target chain id
Remove the target chain id from the allow list of the MCS token.
token
String
MCS token address
to_chain
u128
target chain id
Check if the MCS token is allowed to be transfered to the target chain.
token
&String
MCS token address
to_chain
u128
target chain id
bool
true if target chain is allowed, false otherwise
Allow the fungible token to be transfered to the target chain.
token
String
fungible token address
to_chain
u128
target chain id
Remove the target chain id from the allow list of the fungible token.
token
String
fungible token address
to_chain
u128
target chain id
Check if the fungible token is allowed to be transfered to the target chain.
token
&String
MCS token address
to_chain
u128
target chain id
bool
true if target chain is allowed, false otherwise
MapCrossChainService is the map cross chain service contract.
ReceiptProof includes the proof and the receipt to prove.