Skip to main content

IERC20

Hierarchy

  • TokenWrapper

    IERC20

Implements

  • Serializable

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new IERC20(origin?): IERC20

Parameters

NameType
originAddress

Returns

IERC20

Overrides

TokenWrapper.constructor

Defined in

assembly/interfaces/IERC20.ts:20

Properties

_origin

_origin: Address

Inherited from

TokenWrapper._origin

Defined in

node_modules/@massalabs/sc-standards/assembly/contracts/FT/wrapper.ts:26

Methods

allowance

allowance(ownerAccount, spenderAccount): u256

Returns the allowance set on the owner's account for the spender.

Parameters

NameType
ownerAccountAddress
spenderAccountAddress

Returns

u256

Inherited from

TokenWrapper.allowance

Defined in

node_modules/@massalabs/sc-standards/assembly/contracts/FT/wrapper.ts:125


balanceOf

balanceOf(account): u256

Returns the balance of an account.

Parameters

NameType
accountAddress

Returns

u256

Inherited from

TokenWrapper.balanceOf

Defined in

node_modules/@massalabs/sc-standards/assembly/contracts/FT/wrapper.ts:103


burn

burn(nbTokens): void

Burn nbTokens on the caller address

Parameters

NameType
nbTokensu256

Returns

void

Inherited from

TokenWrapper.burn

Defined in

node_modules/@massalabs/sc-standards/assembly/contracts/FT/wrapper.ts:213


decimals

decimals(): u8

Returns

u8

Overrides

TokenWrapper.decimals

Defined in

assembly/interfaces/IERC20.ts:29


decreaseAllowance

decreaseAllowance(spenderAccount, nbTokens): void

Decreases the allowance of the spender on the owner's account by the given amount.

This function can only be called by the owner.

Parameters

NameType
spenderAccountAddress
nbTokensu256

Returns

void

Inherited from

TokenWrapper.decreaseAllowance

Defined in

node_modules/@massalabs/sc-standards/assembly/contracts/FT/wrapper.ts:163


deserialize

deserialize(data, offset): Result<i32>

Parameters

NameType
dataStaticArray<u8>
offseti32

Returns

Result<i32>

Implementation of

Serializable.deserialize

Defined in

assembly/interfaces/IERC20.ts:75


equals

equals(other): bool

Parameters

NameType
otherIERC20

Returns

bool

Defined in

assembly/interfaces/IERC20.ts:85


increaseAllowance

increaseAllowance(spenderAccount, nbTokens): void

Increases the allowance of the spender on the owner's account by the given amount.

This function can only be called by the owner.

Parameters

NameType
spenderAccountAddress
nbTokensu256

Returns

void

Inherited from

TokenWrapper.increaseAllowance

Defined in

node_modules/@massalabs/sc-standards/assembly/contracts/FT/wrapper.ts:145


init

init(name, symbol, decimals, supply): void

Parameters

NameType
namestring
symbolstring
decimalsu8
supplyu256

Returns

void

Overrides

TokenWrapper.init

Defined in

assembly/interfaces/IERC20.ts:24


mint

mint(toAccount, nbTokens): void

Mint an amount of nbTokens tokens from to the toAccount address .

Parameters

NameType
toAccountAddress
nbTokensu256

Returns

void

Inherited from

TokenWrapper.mint

Defined in

node_modules/@massalabs/sc-standards/assembly/contracts/FT/wrapper.ts:204


name

name(): string

Returns the name of the token.

Returns

string

name of the token.

Inherited from

TokenWrapper.name

Defined in

node_modules/@massalabs/sc-standards/assembly/contracts/FT/wrapper.ts:65


notEqual

notEqual(other): bool

Parameters

NameType
otherIERC20

Returns

bool

Defined in

assembly/interfaces/IERC20.ts:81


received

received(reserve, fees): u256

Returns the amount of token received by the pair

Parameters

NameTypeDescription
reserveu256The total reserve of token
feesu256The total fees of token

Returns

u256

  • The amount received by the pair

Defined in

assembly/interfaces/IERC20.ts:42


serialize

serialize(): StaticArray<u8>

Returns

StaticArray<u8>

Implementation of

Serializable.serialize

Defined in

assembly/interfaces/IERC20.ts:71


symbol

symbol(): string

Returns the symbol of the token.

Returns

string

token symbol.

Inherited from

TokenWrapper.symbol

Defined in

node_modules/@massalabs/sc-standards/assembly/contracts/FT/wrapper.ts:73


totalSupply

totalSupply(): u256

Returns the total token supply.

The number of tokens that were initially minted.

Returns

u256

number of minted tokens.

Inherited from

TokenWrapper.totalSupply

Defined in

node_modules/@massalabs/sc-standards/assembly/contracts/FT/wrapper.ts:94


transfer

transfer(toAccount, nbTokens): void

Parameters

NameType
toAccountAddress
nbTokensu256

Returns

void

Overrides

TokenWrapper.transfer

Defined in

assembly/interfaces/IERC20.ts:48


transferFrom

transferFrom(ownerAccount, recipientAccount, nbTokens): void

Parameters

NameType
ownerAccountAddress
recipientAccountAddress
nbTokensu256

Returns

void

Overrides

TokenWrapper.transferFrom

Defined in

assembly/interfaces/IERC20.ts:58


version

version(): string

Returns the version of the smart contract. This versioning is following the best practices defined in https://semver.org/.

Returns

string

Inherited from

TokenWrapper.version

Defined in

node_modules/@massalabs/sc-standards/assembly/contracts/FT/wrapper.ts:56