This contract is a proxy for token manager contracts.
This contract implements BaseProxy and ITokenManagerProxy.
address interchainTokenService
uint256 implementationType
Returns implementation type of this token manager.
| Name | Type | Description | | —- | —- | ———– |
bytes32 interchainTokenId
Returns the interchain token ID of the token manager.
| Name | Type | Description | | —- | —- | ———– |
address tokenAddress
Returns token address that this token manager manages.
| Name | Type | Description | | —- | —- | ———– |
constructor(address interchainTokenService_, uint256 implementationType_, bytes32 tokenId, bytes params) public
Constructs the TokenManagerProxy contract.
Name | Type | Description |
---|---|---|
interchainTokenService_ | address | The address of the interchain token service. |
implementationType_ | uint256 | The token manager type. |
tokenId | bytes32 | The identifier for the token. |
params | bytes | The initialization parameters for the token manager contract. |
function contractId() internal pure returns (bytes32)
Getter for the contract id.
Name | Type | Description |
---|---|---|
[0] | bytes32 | bytes32 The contract id. |
function getImplementationTypeAndTokenAddress() external view returns (uint256 implementationType_, address tokenAddress_)
Returns implementation type and token address.
Name | Type | Description |
---|---|---|
implementationType_ | uint256 | The implementation type. |
tokenAddress_ | address | The token address. |
function implementation() public view returns (address implementation_)
Returns the address of the current implementation.
Name | Type | Description |
---|---|---|
implementation_ | address | The address of the current implementation. |
function _tokenManagerImplementation(address interchainTokenService_, uint256 implementationType_) internal view returns (address implementation_)
Returns the implementation address from the interchain token service for the provided type.
Name | Type | Description |
---|---|---|
interchainTokenService_ | address | The address of the interchain token service. |
implementationType_ | uint256 | The token manager type. |
Name | Type | Description |
---|---|---|
implementation_ | address | The address of the implementation. |