Docs
Reference
Contract documentation
tokenvault
BridgedERC1155

BridgedERC1155

Contract for bridging ERC1155 tokens across different chains.

srcToken

address srcToken

srcChainId

uint256 srcChainId

symbol

string symbol

Transfer

event Transfer(address from, address to, uint256 tokenId, uint256 amount)

BRIDGED_TOKEN_CANNOT_RECEIVE

error BRIDGED_TOKEN_CANNOT_RECEIVE()

BRIDGED_TOKEN_INVALID_PARAMS

error BRIDGED_TOKEN_INVALID_PARAMS()

init

function init(address _addressManager, address _srcToken, uint256 _srcChainId, string _symbol, string _name) external

Initializer function to be called after deployment.

Parameters

NameTypeDescription
_addressManageraddressThe address of the address manager.
_srcTokenaddressAddress of the source token.
_srcChainIduint256Source chain ID.
_symbolstringSymbol of the bridged token.
_namestringName of the bridged token.

mint

function mint(address account, uint256 tokenId, uint256 amount) public

Mints tokens.

Parameters

NameTypeDescription
accountaddressAddress to receive the minted tokens.
tokenIduint256ID of the token to mint.
amountuint256Amount of tokens to mint.

burn

function burn(address account, uint256 tokenId, uint256 amount) public

Burns tokens.

Parameters

NameTypeDescription
accountaddressAddress from which tokens are burned.
tokenIduint256ID of the token to burn.
amountuint256Amount of tokens to burn.

safeTransferFrom

function safeTransferFrom(address from, address to, uint256 tokenId, uint256 amount, bytes data) public

Safely transfers tokens from one address to another.

Parameters

NameTypeDescription
fromaddressAddress from which tokens are transferred.
toaddressAddress to which tokens are transferred.
tokenIduint256ID of the token to transfer.
amountuint256Amount of tokens to transfer.
databytesAdditional data.

name

function name() public view returns (string)

Gets the concatenated name of the bridged token.

Return Values

NameTypeDescription
[0]stringThe concatenated name.

ProxiedBridgedERC1155

Proxied version of the parent contract.