TokenManagerERC1155
Runs on SKALE Chains, accepts messages from mainnet, and creates ERC1155 clones. TokenManagerERC1155 mints tokens. When a user exits a SKALE chain, it burns them.
-
transferToSchainERC1155(targetSchainName, contractOnMainnet, id, amount)
-
transferToSchainERC1155Batch(targetSchainName, contractOnMainnet, ids, amounts)
-
addERC1155TokenByOwner(targetChainName, erc1155OnMainnet, erc1155OnSchain)
-
initialize(newChainName, newMessageProxy, newIMALinker, newCommunityLocker, newDepositBox)
exitToMainERC1155 exitToMainERC1155(address contractOnMainnet, uint256 id, uint256 amount)
external
Move tokens from schain to mainnet.
{contractOnMainnet} tokens are burned on schain and unlocked on mainnet for {to} address.
exitToMainERC1155Batch exitToMainERC1155Batch(address contractOnMainnet, uint256[] ids, uint256[] amounts)
external
Move batch of tokens from schain to mainnet.
{contractOnMainnet} tokens are burned on schain and unlocked on mainnet for {to} address.
transferToSchainERC1155 transferToSchainERC1155(string targetSchainName, address contractOnMainnet, uint256 id, uint256 amount)
external
Move tokens from schain to schain.
{contractOnMainnet} tokens are burned on origin schain and are minted on {targetSchainName} schain for {to} address.
transferToSchainERC1155Batch transferToSchainERC1155Batch(string targetSchainName, address contractOnMainnet, uint256[] ids, uint256[] amounts)
external
Move batch of tokens from schain to schain.
{contractOnMainnet} tokens are burned on origin schain and are minted on {targetSchainName} schain for {to} address.
postMessage postMessage(bytes32 fromChainHash, address sender, bytes data) → address
external
Allows MessageProxy to post operational message from mainnet or SKALE chains.
Requirements:
-
MessageProxy must be the sender.
-
fromSchainName
must exist in TokenManagerERC1155 addresses.
addERC1155TokenByOwner addERC1155TokenByOwner(string targetChainName, address erc1155OnMainnet, address erc1155OnSchain)
external
Allows Schain owner to register an ERC1155 token clone in the token manager.
initialize initialize(string newChainName, contract IMessageProxyForSchain newMessageProxy, contract ITokenManagerLinker newIMALinker, contract ICommunityLocker newCommunityLocker, address newDepositBox)
external
Is called once during contract deployment.
onERC1155Received onERC1155Received(address operator, address, uint256, uint256, bytes) → bytes4
external
onERC1155BatchReceived onERC1155BatchReceived(address operator, address, uint256[], uint256[], bytes) → bytes4
external
supportsInterface supportsInterface(bytes4 interfaceId) → bool
public
Checks whether contract supports such interface (first 4 bytes of method name and its params).
ERC1155TokenAdded ERC1155TokenAdded(bytes32 chainHash, address erc1155OnMainnet, address erc1155OnSchain)
event
Emitted when schain owner register new ERC1155 clone.
ERC1155TokenCreated ERC1155TokenCreated(bytes32 chainHash, address erc1155OnMainnet, address erc1155OnSchain)
event
Emitted when TokenManagerERC1155 automatically deploys new ERC1155 clone.
ERC1155TokenReceived ERC1155TokenReceived(bytes32 chainHash, address erc1155OnMainnet, address erc1155OnSchain, uint256[] ids, uint256[] amounts)
event
Emitted when someone sends tokens from mainnet to schain.
ERC1155TokenReady ERC1155TokenReady(bytes32 chainHash, address contractOnMainnet, uint256[] ids, uint256[] amounts)
event
Emitted when token is received by TokenManager and is ready to be cloned or transferred on SKALE chain.