SwiftERC20

Git Source

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

NameTypeDescription
name_stringname of the wrapped token
symbol_stringsymbol of the wrapped token
swiftGate_addressaddress of the swift gate contract
remoteToken_addressaddress of the remote token contract

mint

swift gate mints tokens

function mint(address account_, uint256 amount_) external onlySwiftGate;

Parameters

NameTypeDescription
account_addressaddress to mint tokens to
amount_uint256amount of tokens to mint

burn

swift gate burns tokens

function burn(address account_, uint256 amount_) external onlySwiftGate;

Parameters

NameTypeDescription
account_addressaddress to burn tokens from
amount_uint256amount 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_);