Docs
Reference
Contract documentation
tokenvault
BridgedERC721

BridgedERC721

Contract for bridging ERC721 tokens across different chains.

srcToken

address srcToken

srcChainId

uint256 srcChainId

BRIDGED_TOKEN_CANNOT_RECEIVE

error BRIDGED_TOKEN_CANNOT_RECEIVE()

BRIDGED_TOKEN_INVALID_PARAMS

error BRIDGED_TOKEN_INVALID_PARAMS()

BRIDGED_TOKEN_INVALID_BURN

error BRIDGED_TOKEN_INVALID_BURN()

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) public

Mints tokens.

Parameters

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

burn

function burn(address account, uint256 tokenId) public

Burns tokens.

Parameters

NameTypeDescription
accountaddressAddress from which the token is burned.
tokenIduint256ID of the token to burn.

transferFrom

function transferFrom(address from, address to, uint256 tokenId) public

Safely transfers tokens from one address to another.

Parameters

NameTypeDescription
fromaddressAddress from which the token is transferred.
toaddressAddress to which the token is transferred.
tokenIduint256ID of the token to transfer.

name

function name() public view returns (string)

Gets the concatenated name of the bridged token.

Return Values

NameTypeDescription
[0]stringThe concatenated name.

source

function source() public view returns (address, uint256)

Gets the source token and source chain ID being bridged.

Return Values

NameTypeDescription
[0]addressSource token address and source chain ID.
[1]uint256

tokenURI

function tokenURI(uint256 tokenId) public pure virtual returns (string)

Returns an empty token URI.

Parameters

NameTypeDescription
tokenIduint256ID of the token.

Return Values

NameTypeDescription
[0]stringAn empty string.

ProxiedBridgedERC721

Proxied version of the parent contract.