SwiftERC20
Inherits: ERC20Upgradeable
State Variables
_swiftGate
address of the swift gate contract
address internal _swiftGate;
_remoteToken
address of the remote token contract
address internal _remoteToken;
Functions
onlySwiftGate
can only be called by swift gate
modifier onlySwiftGate();
initialize
initialize the contract
function initialize(string memory name_, string memory symbol_, address swiftGate_, address remoteToken_)
public
initializer;
Parameters
Name | Type | Description |
---|---|---|
name_ | string | name of the wrapped token |
symbol_ | string | symbol of the wrapped token |
swiftGate_ | address | address of the swift gate contract |
remoteToken_ | address | address of the remote token contract |
mint
swift gate mints tokens
function mint(address account_, uint256 amount_) external onlySwiftGate;
Parameters
Name | Type | Description |
---|---|---|
account_ | address | address to mint tokens to |
amount_ | uint256 | amount of tokens to mint |
burn
swift gate burns tokens
function burn(address account_, uint256 amount_) external onlySwiftGate;
Parameters
Name | Type | Description |
---|---|---|
account_ | address | address to burn tokens from |
amount_ | uint256 | amount of tokens to burn |
getSwiftGate
returns the address of the swift gate
function getSwiftGate() external view returns (address);
getRemoteToken
returns the address of the remote token
function getRemoteToken() external view returns (address);
Errors
OnlySwiftGateError
triggered when an address other than the swift gate calls this contract
error OnlySwiftGateError(address msgSender_);