GoodDollar

The GoodDollar G$ token follows the ERC-20 token standard and also supports ERC-677.

Events

Transfer

Emitted when value tokens are moved from one account (from) to another (to).

Note that value may be zero.

event Transfer(address indexed from, address indexed to, uint256 value);

Approval

Emitted when the allowance of a spender for an owner is set by a call to {approve}. value is the new allowance.

event Approval(address indexed owner, address indexed spender, uint256 value);

transfer

Processes fees from given value and sends remainder to given address.

Returns: a boolean that indicates if the operation was successful.

function transfer(address to, uint256 value) public returns (bool);

approve

Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.

Returns: a boolean that indicates if the operation was successful.

function approve(address spender, uint256 value) public returns (bool);

transferFrom

Transfer tokens from one address to another on behalf of the third party as msg.sender.

Returns: a boolean that indicates if the operation was successful.

function transferFrom(
        address from,
        address to,
        uint256 value
    ) public returns (bool);

transferAndCall

Processes transfer fees and calls ERC677Token transferAndCall function.

Returns: a boolean that indicates if the operation was successful.

function transferAndCall(
        address to,
        uint256 value,
        bytes calldata data
    ) external returns (bool);

mint

Minting function.

Who can execute: An address who is in minter role.

Returns: a boolean that indicates if the operation was successful.

function mint(address to, uint256 value) public;

burn

Burns a specific amount of tokens.

Who can execute: An address who is not blocklisted by the administration.

function burn(uint256 value) public;

burnFrom

Burns a specific amount of tokens from the target address and decreases an allowance.

Who can execute: An address who is not blocklisted by the administration.

function burnFrom(address from, uint256 value) public;

increaseAllowance

Increase the amount of tokens that an owner allows a spender.

Returns: a boolean that indicates if the operation was successful.

function increaseAllowance(address spender, uint256 addedValue) public returns (bool);

decreaseAllowance

Decrease the amount of tokens that an owner allowed to a spender.

Returns: a boolean that indicates if the operation was successful.

function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool);

getFees

Gets the current transaction fees.

Returns: tuple of uint256 and bool, first is an absolute amount of fees based on value and the second is whether msg.sender paying or not.

function getFees(uint256 value) public view returns (uint256, bool);

setFeeRecipient

Sets the address that receives the transactional fees.

Who can execute: An adminstrator only.

function setFeeRecipient(address _feeRecipient) public;

Last updated