Skip to content

configtax ​

This action will allow token issuer to config the trigger_supply and when token supply surpass this, any transfer will be applied with rate_bp tax except for whitelisted_accounts. All tax amount will be transferred to tax_receiver.

  • Parameters
FieldsTypeDescription
trigger_supplyeosio::assetThe threshold supply for when tax will be applied to transfer
rate_bpuint16_tThe rate where tax will be applied in basis where 1 is 0.01%
tax_receivereosio::nameThe account where tax will be transfer to
whitelisted_accountsstd::vector<eosio::name>The accounts will be exempted from tax

Required Permissions: issuer or ultra

  • cleos Example
shell
cleos push action eosio.token configtax '["8,TAX", 100, "taxreceiver", '["account1", "account2"]']' -p issuer
  • eos-js Example
typescript
(async () => {
    const result = await api.transact(
        {
            actions: [
                {
                    account: 'eosio.token',
                    name: 'configtax',
                    authorization: [
                        {
                            actor: 'issuer',
                            permission: 'active',
                        },
                    ],
                    data: {
                        trigger_supply: '8,TAX',
                        rate_bp: 100,
                        tax_receiver: 'taxreceiver',
                        whitelisted_accounts: ['account1', 'account2'],
                    },
                },
            ],
        },
        {
            blocksBehind: 3,
            expireSeconds: 30,
        }
    );
})();