Skip to main content

MultiToken Contract

The MultiToken contract is mainly used to manage the user's account and transaction fees related settings. Implements aelf Standards ACS1 and ACS2.

Contract Methods

Method NameRequest TypeResponse TypeDescription
AdvanceResourceTokentokenimpl.AdvanceResourceTokenInputgoogle.protobuf.EmptyTransfer resource tokens to designated contract address.
TakeResourceTokenBacktokenimpl.TakeResourceTokenBackInputgoogle.protobuf.EmptyTake token from contract address.
RegisterCrossChainTokenContractAddresstokenimpl.RegisterCrossChainTokenContractAddressInputgoogle.protobuf.EmptyRegister the token contract address for cross chain.
SetFeeReceiveraelf.Addressgoogle.protobuf.EmptySet the receiver address of the side chain transaction fee.
ValidateTokenInfoExiststokenimpl.ValidateTokenInfoExistsInputgoogle.protobuf.EmptyValidates if the token exist.
UpdateRentaltokenimpl.UpdateRentalInputgoogle.protobuf.EmptyUpdate the rental unit price of the side chain.
UpdateRentedResourcestokenimpl.UpdateRentedResourcesInputgoogle.protobuf.EmptySet the amount of resources fee per minute for the side chain.
TransferToContracttokenimpl.TransferToContractInputgoogle.protobuf.EmptyTransfer Token to the specified contract.
ChangeSideChainRentalControllerAuthorityInfogoogle.protobuf.EmptyChange the governance organization of side chain rental.
ChangeSymbolsToPayTXSizeFeeControllerAuthorityInfogoogle.protobuf.EmptyChange the governance organization for tokens to pay transaction fees.
ChangeCrossChainTokenContractRegistrationControllerAuthorityInfogoogle.protobuf.EmptyChange the governance organization for cross-chain token contract address registration.
ChangeUserFeeControllerAuthorityInfogoogle.protobuf.EmptyChange the governance organization of the coefficient of the user transaction fee calculation formula.
ChangeDeveloperControllerAuthorityInfogoogle.protobuf.EmptyChange the governance organization of the coefficient of the developer's transaction resource fee calculation formula.
ConfigTransactionFeeFreeAllowancestoken.ConfigTransactionFeeFreeAllowancesInputgoogle.protobuf.EmptySet allowance configurations for transaction fee exemption.
GetFeeReceivergoogle.protobuf.Emptyaelf.AddressGet the address of fee receiver.
GetResourceUsagegoogle.protobuf.Empty tokenimpl.ResourceUsage Query the amount of resources usage currently.
GetSymbolsToPayTXSizeFeeControllergoogle.protobuf.Empty AuthorityInfo Query the governance organization for tokens to pay transaction fees.
GetCrossChainTokenContractRegistrationControllergoogle.protobuf.Empty AuthorityInfo Query the governance organization of the
GetUserFeeControllergoogle.protobuf.Empty tokenimpl.UserFeeController Query the governance organization that calculates the formula coefficient for the transaction cost the user sends the contract.
GetDeveloperFeeControllergoogle.protobuf.Empty tokenimpl.DeveloperFeeController Query the governing organization of the formula coefficients for calculating developer contract transaction fee.
GetSideChainRentalControllerCreateInfogoogle.protobuf.Empty AuthorityInfo Query the organization that governs the side chain rental fee.
GetTransactionFeeFreeAllowancesaelf.Address token.TransactionFeeFreeAllowancesMap >Get the allowances for transaction fee exemption.
GetTransactionFeeFreeAllowancesConfiggoogle.protobuf.Empty token.GetTransactionFeeFreeAllowancesConfigOutput Query allowance configurations for transaction fee exemption.
GetTransactionFeeDelegateestoken.GetTransactionFeeDelegateesInput token.GetTransactionFeeDelegateesOutput Retrieve a list of proxy addresses corresponding to a given address.
GetVirtualAddressForLockingtokenimpl.GetVirtualAddressForLockingInput aelf.Address Compute the virtual address for locking.
GetOwningRentalgoogle.protobuf.Empty tokenimpl.OwningRental Query how much resource tokens should be paid currently.
GetOwningRentalUnitValuegoogle.protobuf.Empty tokenimpl.OwningRentalUnitValue Query the unit price of the side chain resource cost resource cost = unit price * quantity the quantity can be queried through GetResourceUsage.
Createtoken.CreateInput google.protobuf.Empty Create a new token/collection/nft.
Issuetoken.IssueInput google.protobuf.Empty Issuing some amount of tokens/collection/nft to an address is the action of increasing that addresses balance for the given token. The total amount of issued tokens must not exceed the total supply of the token and only the issuer (creator) of the token/collection/nft can issue tokens. Issuing token/collection/nft effectively increases the circulating supply.
Transfertoken.TransferInput google.protobuf.Empty Transferring tokens simply is the action of transferring a given amount of tokens from one address to another. The origin or source address is the signer of the transaction. The balance of the sender must be higher than the amount that is transferred.
TransferFromtoken.TransferFromInput google.protobuf.Empty The TransferFrom action will transfer a specified amount of tokens from one address to another. For this operation to succeed the from address needs to have approved (see allowances) enough tokens to Sender of this transaction. If successful the amount will be removed from the allowance.
Approvetoken.ApproveInput google.protobuf.Empty The approve action increases the allowance from the Sender to the Spender address enabling the Spender to call TransferFrom.
UnApprovetoken.UnApproveInput google.protobuf.Empty This is the reverse operation for Approve it will decrease the allowance.
Locktoken.LockInput google.protobuf.Empty This method can be used to lock tokens.
Unlocktoken.UnlockInput google.protobuf.Empty This is the reverse operation of locking it un-locks some previously locked tokens.
Burntoken.BurnInput google.protobuf.Empty This action will burn the specified amount of tokens removing them from the token’s Supply.
SetPrimaryTokenSymboltoken.SetPrimaryTokenSymbolInput google.protobuf.Empty Set the primary token of side chain.
CrossChainTransfertoken.CrossChainTransferInput google.protobuf.Empty This interface is used for cross-chain transfer.
CrossChainReceiveTokentoken.CrossChainReceiveTokenInput google.protobuf.Empty This method is used to receive cross-chain transfers.
CrossChainCreateTokentoken.CrossChainCreateTokenInput google.protobuf.Empty Create token/collection/nft on the other chain. Collection must be created before creating nft.
InitializeFromParentChaintoken.InitializeFromParentChainInput google.protobuf.Empty When the side chain is started the side chain is initialized with the parent chain information.
ClaimTransactionFeestoken.TotalTransactionFeesMap google.protobuf.Empty Handle the transaction fees charged by ChargeTransactionFees.
ChargeTransactionFeestoken.ChargeTransactionFeesInputtoken.ChargeTransactionFeesOutput Used to collect transaction fees.
ChargeUserContractTransactionFeestoken.ChargeTransactionFeesInputtoken.ChargeTransactionFeesOutput Used to collect transaction fees of user contract .
CheckThresholdtoken.CheckThresholdInput google.protobuf.Empty Check the token threshold.
InitialCoefficientsgoogle.protobuf.Empty google.protobuf.Empty Initialize coefficients of every type of tokens supporting charging fee.
DonateResourceTokentoken.TotalResourceTokensMaps google.protobuf.Empty Processing resource token received.
ChargeResourceTokentoken.ChargeResourceTokenInput google.protobuf.Empty A transaction resource fee is charged to implement the ACS8 standards.
CheckResourceTokengoogle.protobuf.Empty google.protobuf.Empty Verify that the resource token are sufficient.
SetSymbolsToPayTxSizeFeetoken.SymbolListToPayTxSizeFee google.protobuf.Empty Set the list of tokens to pay transaction fees.
UpdateCoefficientsForSendertoken.UpdateCoefficientsInput google.protobuf.Empty Update the coefficient of the transaction fee calculation formula.
UpdateCoefficientsForContracttoken.UpdateCoefficientsInput google.protobuf.Empty Update the coefficient of the transaction fee calculation formula.
InitializeAuthorizedControllergoogle.protobuf.Empty google.protobuf.Empty This method is used to initialize the governance organization for some functions including: the coefficient of the user transaction fee calculation formula the coefficient of the contract developer resource fee calculation formula and the side chain rental fee.
GetTokenInfotoken.GetTokenInfoInput token.TokenInfo Query token information.
GetNativeTokenInfogoogle.protobuf.Empty token.TokenInfo Query native token information.
GetResourceTokenInfogoogle.protobuf.Empty token.TokenInfoList <#token.TokenInfoList>Query resource token information.
GetBalancetoken.GetBalanceInput token.GetBalanceOutput Query the balance at the specified address.
GetAllowancetoken.GetAllowanceInput token.GetAllowanceOutput Query the account's allowance for other addresses
IsInWhiteListtoken.IsInWhiteListInput google.protobuf.BoolValue Check whether the token is in the whitelist of an address which can be called TransferFrom to transfer the token under the condition of not being credited.
GetLockedAmounttoken.GetLockedAmountInput token.GetLockedAmountOutput <#token.GetLockedAmountOutput>Query the information for a lock.
GetCrossChainTransferTokenContractAddresstoken.GetCrossChainTransferTokenContractAddressInput <#token.GetCrossChainTransferTokenContractAddressInput>aelf.Address Query the address of receiving token in cross-chain transfer.
GetPrimaryTokenSymbolgoogle.protobuf.Empty google.protobuf.StringValue Query the name of the primary Token.
GetCalculateFeeCoefficientsForContractgoogle.protobuf.Int32Value token.CalculateFeeCoefficients Query the coefficient of the transaction fee calculation formula.
UpdateCoefficientsForContracttoken.UpdateCoefficientsInput google.protobuf.Empty Update the coefficient of the transaction fee calculation formula.
InitializeAuthorizedControllergoogle.protobuf.Empty google.protobuf.Empty This method is used to initialize the governance organization for some functions including: the coefficient of the user transaction fee calculation formula the coefficient of the contract developer resource fee calculation formula and the side chain rental fee.
GetTokenInfotoken.GetTokenInfoInput token.TokenInfo Query token information.
GetNativeTokenInfogoogle.protobuf.Empty token.TokenInfo Query native token information.
GetResourceTokenInfogoogle.protobuf.Empty token.TokenInfoList Query resource token information.
GetBalancetoken.GetBalanceInput token.GetBalanceOutputQuery the balance at the specified address.
GetAllowancetoken.GetAllowanceInput token.GetAllowanceOutput Query the account's allowance for other addresses
IsInWhiteListtoken.IsInWhiteListInput google.protobuf.BoolValue Check whether the token is in the whitelist of an address which can be called TransferFrom to transfer the token under the condition of not being credited.
GetLockedAmounttoken.GetLockedAmountInput token.GetLockedAmountOutput Query the information for a lock.
GetCrossChainTransferTokenContractAddresstoken.GetCrossChainTransferTokenContractAddressInput aelf.Address Query the address of receiving token in cross-chain transfer.
GetPrimaryTokenSymbolgoogle.protobuf.Empty google.protobuf.StringValue Query the name of the primary Token.
GetCalculateFeeCoefficientsForContractgoogle.protobuf.Int32Value token.CalculateFeeCoefficients Query the coefficient of the transaction fee calculation formula.
GetCalculateFeeCoefficientsForSendergoogle.protobuf.Empty token.CalculateFeeCoefficients Query the coefficient of the transaction fee calculation formula.
GetSymbolsToPayTxSizeFeegoogle.protobuf.Empty token.SymbolListToPayTxSizeFee Query tokens that can pay transaction fees.
GetLatestTotalTransactionFeesMapHashgoogle.protobuf.Empty aelf.Hash Query the hash of the last input of ClaimTransactionFees.
GetLatestTotalResourceTokensMapsHashgoogle.protobuf.Empty aelf.Hash Query the hash of the last input of DonateResourceToken.
IsTokenAvailableForMethodFeegoogle.protobuf.StringValue google.protobuf.BoolValue
SetTransactionFeeDelegationstoken.SetTransactionFeeDelegationsInput token.SetTransactionFeeDelegationsOutput <#token.SetTransactionFeeDelegationsOutput>Set delegation of transaction fee payment.
SetTransactionFeeDelegateInfostoken.SetTransactionFeeDelegateInfosInput google.protobuf.Empty Set delegate info to pay transaction fee.
RemoveTransactionFeeFreeAllowancesConfigtoken.RemoveTransactionFeeFreeAllowancesConfigInput google.protobuf.Empty Remove allowance configurations for transaction fee exemption.
RemoveTransactionFeeDelegatortoken.RemoveTransactionFeeDelegatorInput google.protobuf.Empty Remove transaction fee delegator.
RemoveTransactionFeeDelegatorInfostoken.RemoveTransactionFeeDelegatorInfosInput google.protobuf.Empty Remove delegator info of the delegatee.
RemoveTransactionFeeDelegateetoken.RemoveTransactionFeeDelegateeInput google.protobuf.Empty Remove transaction fee delegatee.
RemoveTransactionFeeDelegateeInfostoken.RemoveTransactionFeeDelegateeInfosInputgoogle.protobuf.Empty Remove delegatee info of the delegator.
GetTransactionFeeDelegationsOfADelegateetoken.GetTransactionFeeDelegationsOfADelegateeInput token.TransactionFeeDelegations Get the delegation of transaction fee payment of a delegatee.
GetTransactionFeeDelegateeListtoken.GetTransactionFeeDelegateeListInput token.GetTransactionFeeDelegateeListOutput Get all delegatee list of a delegator.
GetTransactionFeeDelegateInfotoken.GetTransactionFeeDelegateInfoInput token.TransactionFeeDelegations Get delegate info for transaction fee.

AElf.Standards.ACS1

Method NameRequest TypeResponse TypeDescription
SetMethodFeeacs1.MethodFees google.protobuf.Empty Set the method fees for the specified method. Note that this will override all fees of the method.
ChangeMethodFeeControllerAuthorityInfo google.protobuf.Empty Change the method fee controller the default is parliament and default organization.
GetMethodFeegoogle.protobuf.StringValue acs1.MethodFees Query method fee information by method name.
GetMethodFeeControllergoogle.protobuf.Empty AuthorityInfo Query the method fee controller.

AElf.Standards.ACS2

Method NameRequest TypeResponse TypeDescription
GetResourceInfoaelf.Transaction <#aelf.Transaction>acs2.ResourceInfo Gets the resource information that the transaction execution depends on.

Contract Types

AElf.Contracts.MultiToken

tokenimpl.AdvanceResourceTokenInput

FieldTypeDescriptionLabel
contract_addressaelf.Address The contract address to transfer.
resource_token_symbolstring The resource token symbol to transfer.
amountint64 The amount of resource token to transfer.

tokenimpl.DeveloperFeeController

FieldTypeDescriptionLabel
root_controllerAuthorityInfo The association that governs the organization.
parliament_controllerAuthorityInfo The parliament organization of members.
developer_controllerAuthorityInfo The developer organization of members.

tokenimpl.GetVirtualAddressForLockingInput

FieldTypeDescriptionLabel
addressaelf.Address The address of the lock.
lock_idaelf.Hash The id of the lock.

tokenimpl.OwningRental

FieldTypeDescriptionLabel
resource_amountOwningRental.ResourceAmountEntry The amount of resource tokens owed symbol -> amount.repeated

tokenimpl.OwningRental.ResourceAmountEntry

FieldTypeDescriptionLabel
keystring
valueint64

tokenimpl.OwningRentalUnitValue

FieldTypeDescriptionLabel
resource_unit_valueOwningRentalUnitValue.ResourceUnitValueEntry Resource unit price symbol -> unit price.repeated

tokenimpl.OwningRentalUnitValue.ResourceUnitValueEntry

FieldTypeDescriptionLabel
keystring
valueint64

AElf.Standards.ACS1

Method NameRequest TypeResponse TypeDescription
SetMethodFeeacs1.MethodFeesgoogle.protobuf.EmptySet the method fees for the specified method. Note that this will override all fees of the method.
ChangeMethodFeeControllerAuthorityInfogoogle.protobuf.EmptyChange the method fee controller the default is parliament and default organization.
GetMethodFeegoogle.protobuf.StringValueacs1.MethodFeesQuery method fee information by method name.
GetMethodFeeControllergoogle.protobuf.EmptyAuthorityInfoQuery the method fee controller.

AElf.Standards.ACS2

Method NameRequest TypeResponse TypeDescription
GetResourceInfoaelf.Transactionacs2.ResourceInfoGets the resource information that the transaction execution depends on.

AElf.Contracts.MultiToken - tokenimpl.AdvanceResourceTokenInput

FieldTypeDescriptionLabel
contract_addressaelf.AddressThe contract address to transfer.
resource_token_symbolstringThe resource token symbol to transfer.
amountint64The amount of resource token to transfer.

tokenimpl.RegisterCrossChainTokenContractAddressInput

FieldTypeDescriptionLabel
from_chain_idint32The source chain id.
parent_chain_heightint64The parent chain height of the transaction.
transaction_bytesbytesThe raw bytes of the transfer transaction.
merkle_pathaelf.MerklePathThe merkle path created from the transaction.
token_contract_addressaelf.AddressThe token contract address.

tokenimpl.ValidateTokenInfoExistsInput

FieldTypeDescriptionLabel
symbolstringThe symbol of the token.
token_namestringThe full name of the token.
total_supplyint64The total supply of the token.
decimalsint32The precision of the token.
issueraelf.AddressThe address that has permission to issue the token/collection/nft.
is_burnableboolA flag indicating if this token is burnable.
issue_chain_idint32The chain id of the token.
external_infomap<stringstring>Attributes or description of the token/collection/nft.
owneraelf.AddressThe address that has permission to create nft.

token.AllCalculateFeeCoefficients

FieldTypeDescriptionLabel
valueCalculateFeeCoefficientsThe coefficients of fee Calculation.repeated

token.ApproveInput

FieldTypeDescriptionLabel
spenderaelf.AddressThe address that allowance will be increased.
symbolstringThe symbol of token to approve.
amountint64The amount of token to approve.

token.Approved

FieldTypeDescriptionLabel
owneraelf.AddressThe address of the token owner.
spenderaelf.AddressThe address that allowance be increased.
symbolstringThe symbol of approved token.
amountint64The amount of approved token.

token.BurnInput

FieldTypeDescriptionLabel
symbolstringThe symbol of token to burn.
amountint64The amount of token to burn.

token.Burned

FieldTypeDescriptionLabel
burneraelf.AddressThe address who wants to burn token.
symbolstringThe symbol of burned token.
amountint64The amount of burned token.

token.CalculateFeeAlgorithmUpdated

FieldTypeDescriptionLabel
all_type_fee_coefficientsAllCalculateFeeCoefficientsAll calculate fee coefficients after modification.

token.CalculateFeeCoefficients

FieldTypeDescriptionLabel
fee_token_typeint32The resource fee type like READ WRITE etc.
piece_coefficients_listCalculateFeePieceCoefficientsCoefficients of one single piece.repeated

token.CalculateFeePieceCoefficients

FieldTypeDescriptionLabel
valueint32Coefficients of one single piece. The first char is its type: liner / power. The second char is its piece upper bound.repeated

token.ChainPrimaryTokenSymbolSet

FieldTypeDescriptionLabel
token_symbolstringThe symbol of token.

token.ChargeResourceTokenInput

FieldTypeDescriptionLabel
cost_dicChargeResourceTokenInput.CostDicEntryCollection of charge resource token Symbol->Amount.repeated
calleraelf.AddressThe sender of the transaction.

token.ChargeResourceTokenInput.CostDicEntry

FieldTypeDescriptionLabel
keystring
valueint64

token.ChargeTransactionFeesInput

FieldTypeDescriptionLabel
method_namestringThe method name of transaction.
contract_addressaelf.AddressThe contract address of transaction.
transaction_size_feeint64The amount of transaction size fee.
symbols_to_pay_tx_size_feeSymbolToPayTxSizeFeeTransaction fee token information.repeated

token.ChargeTransactionFeesOutput

FieldTypeDescription
successboolWhether the charge was successful.
charging_informationstringThe charging information.

token.CheckThresholdInput

FieldTypeDescription
senderaelf.AddressThe sender of the transaction.
symbol_to_thresholdSymbolToThresholdEntryThe threshold to set Symbol->Threshold.
is_check_allowanceboolWhether to check the allowance.

token.CheckThresholdInput.SymbolToThresholdEntry

FieldTypeDescription
keystring
valueint64

token.ConfigTransactionFeeFreeAllowancesInput

FieldTypeDescription
valueConfigTransactionFeeFreeAllowanceThe configuration of free allowance.

token.ConfigTransactionFeeFreeAllowance

FieldTypeDescription
symbolstringThe symbol of threshold token.
transaction_fee_free_allowancesTransactionFeeFreeAllowancesThe allowance of each token when a user gets his allowance of the full amount.
refresh_secondsint64The time needed for a user’s allowance to be refreshed back to the full amount. Unit: second
thresholdint64The required amount of Token in possession for a user to be eligible for transaction fee exemption.

token.TransactionFeeFreeAllowances

FieldTypeDescription
valueTransactionFeeFreeAllowanceThe allowance of the token.

token.TransactionFeeFreeAllowance

FieldTypeDescription
symbolstringToken symbol.
amountint64The amount of fee free allowance.

token.TransactionFeeFreeAllowanceConfig

FieldTypeDescription
symbolstringThe symbol of threshold token.
free_allowancesTransactionFeeFreeAllowanceMapThe allowance of each token when a user gets his allowance of the full amount.
refresh_secondsint64The time needed for a user’s allowance to be refreshed back to the full amount. Unit: second
thresholdint64The required amount of Token in possession for a user to be eligible for transaction fee exemption.

token.TransactionFeeFreeAllowanceMap

FieldTypeDescription
mapmap<string TransactionFeeFreeAllowance>free allowance symbol free allowance

token.ContractTotalResourceTokens

FieldTypeDescription
contract_addressaelf.AddressThe contract address.
tokens_mapTotalResourceTokensMapResource tokens to charge.

token.CreateInput

FieldTypeDescription
symbolstringThe symbol of the token/collection/nft.
token_namestringThe full name of the token/collection/nft.
total_supplyint64The total supply of the token/collection/nft.
decimalsint32The precision of the toke/collection/nft.
issueraelf.AddressThe address that has permission to issue the token/collection/nft.
is_burnableboolA flag indicating if this token/collection/nft is burnable.
lock_white_listaelf.AddressA whitelist address list used to lock tokens/collection/nft.
issue_chain_idint32The chain id of the token/collection/nft.
external_infomap<stringstring>Attributes or description of the token/collcection/nft. There is no mandatory constraint on the naming of the key. But it is recommended to use nft as the prefix key to set the nft attribute such asnft_image_url.
owneraelf.AddressThe address that has permission to create nft.

token.CrossChainCreateTokenInput

FieldTypeDescriptionLabel
from_chain_idint32The chain id of the chain on which the token was created.
parent_chain_heightint64The height of the transaction that created the token/collection/nft.
transaction_bytesbytesThe transaction that created the token/collection/nft.
merkle_pathaelf.MerklePathThe merkle path created from the transaction that created the transaction.

token.CrossChainReceiveTokenInput

FieldTypeDescriptionLabel
from_chain_idint32The source chain id.
parent_chain_heightint64The height of the transfer transaction.
transfer_transaction_bytesbytesThe raw bytes of the transfer transaction.
merkle_pathaelf.MerklePathThe merkle path created from the transfer transaction.

token.CrossChainReceived

FieldTypeDescriptionLabel
fromaelf.AddressThe source address of the transferred token.
toaelf.AddressThe destination address of the transferred token.
symbolstringThe symbol of the received token.
amountint64The amount of the received token.
memostringThe memo.
from_chain_idint32The destination chain id.
issue_chain_idint32The chain id of the token.
parent_chain_heightint64The parent chain height of the transfer transaction.
transfer_transaction_idaelf.HashThe id of transfer transaction.

token.CrossChainTransferInput

FieldTypeDescriptionLabel
toaelf.AddressThe receiver of transfer.
symbolstringThe symbol of token.
amountint64The amount of token to transfer.
memostringThe memo.
to_chain_idint32The destination chain id.
issue_chain_idint32The chain id of the token.

token.CrossChainTransferred

FieldTypeDescriptionLabel
fromaelf.AddressThe source address of the transferred token.
toaelf.AddressThe destination address of the transferred token.
symbolstringThe symbol of the transferred token.
amountint64The amount of the transferred token.
memostringThe memo.
to_chain_idint32The destination chain id.
issue_chain_idint32The chain id of the token.

token.ExtraTokenListModified

FieldTypeDescriptionLabel
symbol_list_to_pay_tx_size_feeSymbolListToPayTxSizeFeeTransaction fee token information.

token.GetAllowanceInput

FieldTypeDescriptionLabel
symbolstringThe symbol of token.
owneraelf.AddressThe address of the token owner.
spenderaelf.AddressThe address of the spender.

token.GetAllowanceOutput

FieldTypeDescriptionLabel
symbolstringThe symbol of token.
owneraelf.AddressThe address of the token owner.
spenderaelf.AddressThe address of the spender.
allowanceint64The amount of allowance.

token.GetBalanceInput

FieldTypeDescriptionLabel
symbolstringThe symbol of token.
owneraelf.AddressThe target address of the query.

token.GetBalanceOutput

FieldTypeDescriptionLabel
symbolstringThe symbol of token.
owneraelf.AddressThe target address of the query.
balanceint64The balance of the owner.

token.GetCrossChainTransferTokenContractAddressInput

FieldTypeDescriptionLabel
chainIdint32The chain id.

token.GetLockedAmountInput

FieldTypeDescriptionLabel
addressaelf.AddressThe address of the lock.
symbolstringThe token symbol.
lock_idaelf.HashThe id of the lock.

token.GetLockedAmountOutput

FieldTypeDescriptionLabel
addressaelf.AddressThe address of the lock.
symbolstringThe token symbol.
lock_idaelf.HashThe id of the lock.
amountint64The locked amount.

token.GetTokenInfoInput

FieldTypeDescriptionLabel
symbolstringThe symbol of token.

token.GetTransactionFeeDelegateesInput

FieldTypeDescriptionLabel
delegator_addressaelf.AddressThe address of delegator.

token.GetTransactionFeeDelegateeListInput

FieldTypeDescriptionLabel
delegator_addressaelf.AddressThe address of delegator.
contract_addressaelf.AddressThe contract address.
method_namestringThe method name.

token.GetTransactionFeeDelegateeListOutput

FieldTypeDescriptionLabel
delegatee_addressesaelf.AddressThe address list of delegatee.repeated

token.GetTransactionFeeDelegateInfoInput

FieldTypeDescriptionLabel
delegator_addressaelf.AddressThe address of delegator.
delegatee_addressaelf.AddressThe address of delegatee.
contract_addressaelf.AddressThe contract address.
method_namestringThe method name.

token.GetTransactionFeeFreeAllowancesConfigOutput

FieldTypeDescriptionLabel
valuetoken.TransactionFeeFreeAllowanceConfigsThe configuration of transaction fee free allowance.repeated

token.InitializeFromParentChainInput

FieldTypeDescriptionLabel
resource_amountInitializeFromParentChainInput.ResourceAmountEntryThe amount of resource.repeated
registered_other_token_contract_addressesInitializeFromParentChainInput.RegisteredOtherTokenContractAddressesEntryThe token contract addresses.repeated
creatoraelf.AddressThe creator of the side chain.

token.InitializeFromParentChainInput.RegisteredOtherTokenContractAddressesEntry

FieldTypeDescriptionLabel
keyint32
valueaelf.Address

token.InitializeFromParentChainInput.ResourceAmountEntry

FieldTypeDescriptionLabel
keystring
valueint32

token.IsInWhiteListInput

FieldTypeDescriptionLabel
symbolstringThe symbol of token.
addressaelf.AddressThe address to check.

token.IssueInput

FieldTypeDescriptionLabel
symbolstringThe token/collection/nft symbol to issue.
amountint64The token/collection/nft amount to issue.
memostringThe memo.
toaelf.AddressThe target address to issue.

token.Issued

FieldTypeDescriptionLabel
symbolstringThe symbol of issued token.
amountint64The amount of issued token.
memostringThe memo.
toaelf.AddressThe issued target address.

token.LockInput

FieldTypeDescriptionLabel
addressaelf.AddressThe one who wants to lock their token.
lock_idaelf.HashThe id of the lock.
symbolstringThe symbol of the token to lock.
usagestringA memo.
amountint64The amount of tokens to lock.

token.RemoveTransactionFeeDelegatorInfosInput

FieldTypeDescriptionLabel
delegator_addressaelf.AddressThe address of delegator.
delegate_transaction_listtoken.DelegateTransactionThe transaction list of delegate.repeated

token.RemoveTransactionFeeDelegateeInfosInput

FieldTypeDescriptionLabel
delegator_addressaelf.AddressThe address of delegatee.
delegate_transaction_listtoken.DelegateTransactionThe transaction list of delegate.repeated

token.DelegateTransaction

FieldTypeDescriptionLabel
contract_addressaelf.Address The contract address.
method_namestring The method name.

token.RentalAccountBalanceInsufficient

FieldTypeDescriptionLabel
symbolstring The symbol of insufficient rental account balance.
amountint64 The balance of the account.

token.RentalCharged

FieldTypeDescriptionLabel
symbolstring The symbol of rental fee charged.
amountint64 The amount of rental fee charged.
payeraelf.Address The payer of rental fee.
receiveraelf.Address The receiver of rental fee.

token.RemoveTransactionFeeFreeAllowancesConfigInput

FieldTypeDescriptionLabel
symbolsstring List of symbols to remove from configuration of transaction fee free allowance.repeated

token.ResourceTokenClaimed

FieldTypeDescriptionLabel
symbolstring The symbol of fee claimed.
amountint64 The amount of fee claimed.
payeraelf.Address The payer of fee.
receiveraelf.Address The receiver of fee.

token.SetTransactionFeeDelegateInfos

FieldTypeDescriptionLabel
delegator_addressaelf.Address The address of delegator.
delegate_info_listtoken.DelegateInfo The delegate information for the transaction.repeated

token.DelegateInfo

FieldTypeDescriptionLabel
delegationsmap<string int64> token symbol amount
contract_addressaelf.Address The contract address.
method_namestring The method name.
isUnlimitedDelegatebool Whether to pay transaction fee continuously without limitation.

token.SetPrimaryTokenSymbolInput

FieldTypeDescriptionLabel
symbolstring The symbol of the token.

token.SymbolListToPayTxSizeFee

FieldTypeDescriptionLabel
symbols_to_pay_tx_size_feeSymbolToPayTxSizeFee Transaction fee token information.repeated

token.SymbolToPayTxSizeFee

FieldTypeDescriptionLabel
token_symbolstring The symbol of token.
base_token_weightint32 The charge weight of primary token.
added_token_weightint32 The new added token charge weight.

token.TransactionFeeClaimed

FieldTypeDescriptionLabel
symbolstring The symbol of fee claimed.
amountint64 The amount of fee claimed.
receiveraelf.Address The receiver of fee.

token.TransactionFeeFreeAllowancesMap

FieldTypeDescriptionLabel
mapmap<string TransactionFeeFreeAllowanceMap> threshold symbol free allowances

token.TokenCreated

FieldTypeDescriptionLabel
symbolstring The symbol of the token.
token_namestring The full name of the token.
total_supplyint64 The total supply of the token.
decimalsint32 The precision of the token.
issueraelf.Address The address that created the token.
is_burnablebool A flag indicating if this token is burnable.
issue_chain_idint32 The chain id of the token.

token.TokenInfo

FieldTypeDescriptionLabel
symbolstring The symbol of the token.
token_namestring The full name of the token.
supplyint64 The current supply of the token.
total_supplyint64 The total supply of the token.
decimalsint32 The precision of the token.
issueraelf.Address The address that created the token.
is_burnablebool A flag indicating if this token is burnable.
issue_chain_idint32 The chain id of the token.
issuedint64 The amount of issued tokens.

token.TokenInfoList

FieldTypeDescriptionLabel
valueTokenInfo List of token information.repeated

token.TotalResourceTokensMap

FieldTypeDescriptionLabel
valueTotalResourceTokensMap.ValueEntry Resource token dictionary Symbol->Amount.repeated

token.TotalResourceTokensMap.ValueEntry

FieldTypeDescriptionLabel
keystring
valueint64

token.TotalResourceTokensMaps

FieldTypeDescriptionLabel
valueContractTotalResourceTokens Resource tokens to charge.repeated
block_hashaelf.Hash The hash of the block processing the transaction.
block_heightint64 The height of the block processing the transaction.

token.TotalTransactionFeesMap

FieldTypeDescriptionLabel
valueTotalTransactionFeesMap.ValueEntry Token dictionary that charge transaction fee Symbol->Amount.repeated
block_hashaelf.Hash The hash of the block processing the transaction.
block_heightint64 The height of the block processing the transaction.

token.TransactionFeeCharged

FieldTypeDescriptionLabel
symbolstring Resource tokens to charge.repeated
amountint64 The hash of the block processing the transaction.
chargingAddressaelf.Hash The height of the block processing the transaction.

token.TotalTransactionFeesMap.ValueEntry

FieldTypeDescriptionLabel
keystring
valueint64

token.TransactionFeeBill

FieldTypeDescriptionLabel
fees_mapTransactionFeeBill.FeesMapEntry The transaction fee dictionary Symbol->fee.repeated

token.TransactionFeeBill.FeesMapEntry

FieldTypeDescriptionLabel
keystring
valueint64

token.TransferFromInput

FieldTypeDescriptionLabel
fromaelf.Address The source address of the token.
toaelf.Address The destination address of the token.
symbolstring The symbol of the token to transfer.
amountint64 The amount to transfer.
memostring The memo.

token.TransferInput

FieldTypeDescriptionLabel
toaelf.Address The receiver of the token.
symbolstring The token symbol to transfer.
amountint64 The amount to transfer.
memostring The memo.

token.Transferred

FieldTypeDescriptionLabel
fromaelf.Address The source address of the transferred token.
toaelf.Address The destination address of the transferred token.
symbolstring The symbol of the transferred token.
amountint64 The amount of the transferred token.
memostring The memo.

token.UnApproveInput

FieldTypeDescriptionLabel
spenderaelf.Address The address that allowance will be decreased.
symbolstring The symbol of token to un-approve.
amountint64 The amount of token to un-approve.

token.UnApproved

FieldTypeDescriptionLabel
owneraelf.Address The address of the token owner.
spenderaelf.Address The address that allowance be decreased.
symbolstring The symbol of un-approved token.
amountint64 The amount of un-approved token.

token.UnlockInput

FieldTypeDescriptionLabel
addressaelf.Address The one want to un-lock his token.
lock_idaelf.Hash Id of the lock.
symbolstring The symbol of the token to un-lock.
usagestring **A memo.
amountint64 **The amount of tokens to un-lock.

token.UpdateCoefficientsInput

FieldTypeDescriptionLabel
piece_numbersint32 The specify pieces gonna update.repeated
coefficientsCalculateFeeCoefficients Coefficients of one single type.

token.FeeTypeEnum

NameNumberDescription
READ0
STORAGE1
WRITE2
TRAFFIC3
TX4

token.SetTransactionFeeDelegationsInput

FieldTypeDescriptionLabel
delegator_addressaelf.Addresss The address of delegator.
delegationsmap<string int64> <token symbol delegation>

token.SetTransactionFeeDelegationsOutput

FieldTypeDescriptionLabel
successbool Whether set delegation success.

token.RemoveTransactionFeeDelegatorInput

FieldTypeDescriptionLabel
delegator_addressaelf.Addresss The address of delegator.

token.RemoveTransactionFeeDelegateeInput

FieldTypeDescriptionLabel
delegatee_addressaelf.Addresss The address of delegatee.

token.MethodFeeFreeAllowance

FieldTypeDescriptionLabel
symbolstring Token symbol
amountint64 The amount of fee free allowance

token.GetTransactionFeeDelegationsOfADelegateeInput

FieldTypeDescriptionLabel
delegatee_addressaelf.Addresss The address of delegatee.
delegator_addressaelf.Addresss The address of delegator.

token.TransactionFeeDelegations

FieldTypeDescriptionLabel
delegationsmap<string int64> The number of tokens allowed to be delegated
block_heightint64 The block height when the information of delegation is added

AElf.Standards.ACS1

acs1.MethodFee

FieldTypeDescriptionLabel
symbolstring The token symbol of the method fee.
basic_feeint64 The amount of fees to be charged.

acs1.MethodFees

FieldTypeDescriptionLabel
method_namestring The name of the method to be charged.
feesMethodFee List of fees to be charged.repeated
is_size_fee_freebool Optional based on the implementation of SetMethodFee method.

AElf.Standards.ACS2

acs2.ResourceInfo

FieldTypeDescriptionLabel
write_pathsaelf.ScopedStatePath The state path that depends on when writing.repeated
read_pathsaelf.ScopedStatePath The state path that depends on when reading.repeated
non_parallelizablebool Whether the transaction is not executed in parallel.

AElf.Types

aelf.Address

FieldTypeDescriptionLabel
valuebytes

aelf.BinaryMerkleTree

FieldTypeDescriptionLabel
nodesHash The leaf nodes.repeated
rootHash The root node hash.
leaf_countint32 The count of leaf node.

aelf.Hash

FieldTypeDescriptionLabel
valuebytes

aelf.LogEvent

FieldTypeDescriptionLabel
addressAddress The contract address.
namestring The name of the log event.
indexedbytes The indexed data used to calculate bloom.repeated
non_indexedbytes The non indexed data.

aelf.MerklePath

FieldTypeDescriptionLabel
merkle_path_nodesMerklePathNode The merkle path nodes.repeated

aelf.MerklePathNode

FieldTypeDescriptionLabel
hashHash The node hash.
is_left_child_nodebool Whether it is a left child node.

aelf.SInt32Value

FieldTypeDescriptionLabel
valuesint32

aelf.SInt64Value

FieldTypeDescriptionLabel
valuesint64

aelf.ScopedStatePath

FieldTypeDescriptionLabel
addressAddress The scope address which will be the contract address.
pathStatePath The path of contract state.

aelf.SmartContractRegistration

FieldTypeDescriptionLabel
categorysint32 The category of contract code(0: C#).
codebytes The byte array of the contract code.
code_hashHash The hash of the contract code.
is_system_contractbool Whether it is a system contract.
versionint32 The version of the current contract.

aelf.StatePath

FieldTypeDescriptionLabel
partsstring The partial path of the state path.repeated

aelf.Transaction

FieldTypeDescriptionLabel
fromAddress The address of the sender of the transaction.
toAddress The address of the contract when calling a contract.
ref_block_numberint64 The height of the referenced block hash.
ref_block_prefixbytes The first four bytes of the referenced block hash.
method_namestring The name of a method in the smart contract at the To address.
paramsbytes The parameters to pass to the smart contract method.
signaturebytes When signing a transaction it’s actually a subset of the fields: from/to and the target method as well as the parameter that were given. It also contains the reference block number and prefix.

aelf.TransactionExecutingStateSet

FieldTypeDescriptionLabel
writesTransactionExecutingStateSet.WritesEntry The changed states.repeated
readsTransactionExecutingStateSet.ReadsEntry The read states.repeated
deletesTransactionExecutingStateSet.DeletesEntry >The deleted states.repeated

aelf.TransactionExecutingStateSet.DeletesEntry

FieldTypeDescriptionLabel
keystring
valuebool

aelf.TransactionExecutingStateSet.ReadsEntry

FieldTypeDescriptionLabel
keystring
valuebool

aelf.TransactionExecutingStateSet.WritesEntry

FieldTypeDescriptionLabel
keystring
valuebytes

aelf.TransactionResult

FieldTypeDescriptionLabel
transaction_idHash The transaction id.
statusTransactionResultStatus The transaction result status.
logsLogEvent The log events.repeated
bloombytes Bloom filter for transaction logs. A transaction log event can be defined in the contract and stored in the bloom filter after the transaction is executed. Through this filter we can quickly search for and determine whether a log exists in the transaction result.
return_valuebytes The return value of the transaction execution.
block_numberint64 The height of the block that packages the transaction.
block_hashHash The hash of the block that packages the transaction.
errorstring Failed execution error message.

aelf.TransactionResultStatus

NameNumberDescription
NOT_EXISTED0The execution result of the transaction does not exist.
PENDING1The transaction is in the transaction pool waiting to be packaged.
FAILED2Transaction execution failed.
MINED3The transaction was successfully executed and successfully packaged into a block.
CONFLICT4When executed in parallel there are conflicts with other transactions.
PENDING_VALIDATION5The transaction is waiting for validation.
NODE_VALIDATION_FAILED6Transaction validation failed.

AuthorityInfo

FieldTypeDescriptionLabel
contract_addressaelf.Address The contract address of the controller.
owner_addressaelf.Address The address of the owner of the contract.