logo

Multi Token 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.Emptytokenimpl.ResourceUsageQuery the amount of resources usage currently.
GetSymbolsToPayTXSizeFeeControllergoogle.protobuf.EmptyAuthorityInfoQuery the governance organization for tokens to pay transaction fees.
GetCrossChainTokenContractRegistrationControllergoogle.protobuf.EmptyAuthorityInfoQuery the governance organization of the
GetUserFeeControllergoogle.protobuf.Emptytokenimpl.UserFeeControllerQuery the governance organization that calculates the formula coefficient for the transaction cost the user sends the contract.
GetDeveloperFeeControllergoogle.protobuf.Emptytokenimpl.DeveloperFeeControllerQuery the governing organization of the formula coefficients for calculating developer contract transaction fee.
GetSideChainRentalControllerCreateInfogoogle.protobuf.EmptyAuthorityInfoQuery the organization that governs the side chain rental fee.
GetTransactionFeeFreeAllowancesaelf.Addresstoken.TransactionFeeFreeAllowancesMap >Get the allowances for transaction fee exemption.
GetTransactionFeeFreeAllowancesConfiggoogle.protobuf.Emptytoken.GetTransactionFeeFreeAllowancesConfigOutputQuery allowance configurations for transaction fee exemption.
GetTransactionFeeDelegateestoken.GetTransactionFeeDelegateesInputtoken.GetTransactionFeeDelegateesOutputRetrieve a list of proxy addresses corresponding to a given address.
GetVirtualAddressForLockingtokenimpl.GetVirtualAddressForLockingInputaelf.AddressCompute the virtual address for locking.
GetOwningRentalgoogle.protobuf.Emptytokenimpl.OwningRentalQuery how much resource tokens should be paid currently.
GetOwningRentalUnitValuegoogle.protobuf.Emptytokenimpl.OwningRentalUnitValueQuery the unit price of the side chain resource cost resource cost = unit price * quantity the quantity can be queried through GetResourceUsage.
Createtoken.CreateInputgoogle.protobuf.EmptyCreate a new token/collection/nft.
Issuetoken.IssueInputgoogle.protobuf.EmptyIssuing 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.TransferInputgoogle.protobuf.EmptyTransferring 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.TransferFromInputgoogle.protobuf.EmptyThe 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.ApproveInputgoogle.protobuf.EmptyThe approve action increases the allowance from the Sender to the Spender address enabling the Spender to call TransferFrom.
UnApprovetoken.UnApproveInputgoogle.protobuf.EmptyThis is the reverse operation for Approve it will decrease the allowance.
Locktoken.LockInputgoogle.protobuf.EmptyThis method can be used to lock tokens.
Unlocktoken.UnlockInputgoogle.protobuf.EmptyThis is the reverse operation of locking it un-locks some previously locked tokens.
Burntoken.BurnInputgoogle.protobuf.EmptyThis action will burn the specified amount of tokens removing them from the token’s Supply.
SetPrimaryTokenSymboltoken.SetPrimaryTokenSymbolInputgoogle.protobuf.EmptySet the primary token of side chain.
CrossChainTransfertoken.CrossChainTransferInputgoogle.protobuf.EmptyThis interface is used for cross-chain transfer.
CrossChainReceiveTokentoken.CrossChainReceiveTokenInputgoogle.protobuf.EmptyThis method is used to receive cross-chain transfers.
CrossChainCreateTokentoken.CrossChainCreateTokenInputgoogle.protobuf.EmptyCreate token/collection/nft on the other chain. Collection must be created before creating nft.
InitializeFromParentChaintoken.InitializeFromParentChainInputgoogle.protobuf.EmptyWhen the side chain is started the side chain is initialized with the parent chain information.
ClaimTransactionFeestoken.TotalTransactionFeesMapgoogle.protobuf.EmptyHandle the transaction fees charged by ChargeTransactionFees.
ChargeTransactionFeestoken.ChargeTransactionFeesInputtoken.ChargeTransactionFeesOutputUsed to collect transaction fees.
ChargeUserContractTransactionFeestoken.ChargeTransactionFeesInputtoken.ChargeTransactionFeesOutputUsed to collect transaction fees of user contract .
CheckThresholdtoken.CheckThresholdInputgoogle.protobuf.EmptyCheck the token threshold.
InitialCoefficientsgoogle.protobuf.Emptygoogle.protobuf.EmptyInitialize coefficients of every type of tokens supporting charging fee.
DonateResourceTokentoken.TotalResourceTokensMapsgoogle.protobuf.EmptyProcessing resource token received.
ChargeResourceTokentoken.ChargeResourceTokenInputgoogle.protobuf.EmptyA transaction resource fee is charged to implement the ACS8 standards.
CheckResourceTokengoogle.protobuf.Emptygoogle.protobuf.EmptyVerify that the resource token are sufficient.
SetSymbolsToPayTxSizeFeetoken.SymbolListToPayTxSizeFeegoogle.protobuf.EmptySet the list of tokens to pay transaction fees.
UpdateCoefficientsForSendertoken.UpdateCoefficientsInputgoogle.protobuf.EmptyUpdate the coefficient of the transaction fee calculation formula.
UpdateCoefficientsForContracttoken.UpdateCoefficientsInputgoogle.protobuf.EmptyUpdate the coefficient of the transaction fee calculation formula.
InitializeAuthorizedControllergoogle.protobuf.Emptygoogle.protobuf.EmptyThis 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.GetTokenInfoInputtoken.TokenInfoQuery token information.
GetNativeTokenInfogoogle.protobuf.Emptytoken.TokenInfoQuery native token information.
GetResourceTokenInfogoogle.protobuf.Emptytoken.TokenInfoList <#token.TokenInfoList>Query resource token information.
GetBalancetoken.GetBalanceInputtoken.GetBalanceOutputQuery the balance at the specified address.
GetAllowancetoken.GetAllowanceInputtoken.GetAllowanceOutputQuery the account's allowance for other addresses
IsInWhiteListtoken.IsInWhiteListInputgoogle.protobuf.BoolValueCheck 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.GetLockedAmountInputtoken.GetLockedAmountOutput <#token.GetLockedAmountOutput>Query the information for a lock.
GetCrossChainTransferTokenContractAddresstoken.GetCrossChainTransferTokenContractAddressInput <#token.GetCrossChainTransferTokenContractAddressInput>aelf.AddressQuery the address of receiving token in cross-chain transfer.
GetPrimaryTokenSymbolgoogle.protobuf.Emptygoogle.protobuf.StringValueQuery the name of the primary Token.
GetCalculateFeeCoefficientsForContractgoogle.protobuf.Int32Valuetoken.CalculateFeeCoefficientsQuery the coefficient of the transaction fee calculation formula.
UpdateCoefficientsForContracttoken.UpdateCoefficientsInputgoogle.protobuf.EmptyUpdate the coefficient of the transaction fee calculation formula.
InitializeAuthorizedControllergoogle.protobuf.Emptygoogle.protobuf.EmptyThis 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.GetTokenInfoInputtoken.TokenInfoQuery token information.
GetNativeTokenInfogoogle.protobuf.Emptytoken.TokenInfoQuery native token information.
GetResourceTokenInfogoogle.protobuf.Emptytoken.TokenInfoListQuery resource token information.
GetBalancetoken.GetBalanceInputtoken.GetBalanceOutputQuery the balance at the specified address.
GetAllowancetoken.GetAllowanceInputtoken.GetAllowanceOutputQuery the account's allowance for other addresses
IsInWhiteListtoken.IsInWhiteListInputgoogle.protobuf.BoolValueCheck 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.GetLockedAmountInputtoken.GetLockedAmountOutputQuery the information for a lock.
GetCrossChainTransferTokenContractAddresstoken.GetCrossChainTransferTokenContractAddressInputaelf.AddressQuery the address of receiving token in cross-chain transfer.
GetPrimaryTokenSymbolgoogle.protobuf.Emptygoogle.protobuf.StringValueQuery the name of the primary Token.
GetCalculateFeeCoefficientsForContractgoogle.protobuf.Int32Valuetoken.CalculateFeeCoefficientsQuery the coefficient of the transaction fee calculation formula.
GetCalculateFeeCoefficientsForSendergoogle.protobuf.Emptytoken.CalculateFeeCoefficientsQuery the coefficient of the transaction fee calculation formula.
GetSymbolsToPayTxSizeFeegoogle.protobuf.Emptytoken.SymbolListToPayTxSizeFeeQuery tokens that can pay transaction fees.
GetLatestTotalTransactionFeesMapHashgoogle.protobuf.Emptyaelf.HashQuery the hash of the last input of ClaimTransactionFees.
GetLatestTotalResourceTokensMapsHashgoogle.protobuf.Emptyaelf.HashQuery the hash of the last input of DonateResourceToken.
IsTokenAvailableForMethodFeegoogle.protobuf.StringValuegoogle.protobuf.BoolValue
SetTransactionFeeDelegationstoken.SetTransactionFeeDelegationsInputtoken.SetTransactionFeeDelegationsOutput <#token.SetTransactionFeeDelegationsOutput>Set delegation of transaction fee payment.
SetTransactionFeeDelegateInfostoken.SetTransactionFeeDelegateInfosInputgoogle.protobuf.EmptySet delegate info to pay transaction fee.
RemoveTransactionFeeFreeAllowancesConfigtoken.RemoveTransactionFeeFreeAllowancesConfigInputgoogle.protobuf.EmptyRemove allowance configurations for transaction fee exemption.
RemoveTransactionFeeDelegatortoken.RemoveTransactionFeeDelegatorInputgoogle.protobuf.EmptyRemove transaction fee delegator.
RemoveTransactionFeeDelegatorInfostoken.RemoveTransactionFeeDelegatorInfosInputgoogle.protobuf.EmptyRemove delegator info of the delegatee.
RemoveTransactionFeeDelegateetoken.RemoveTransactionFeeDelegateeInputgoogle.protobuf.EmptyRemove transaction fee delegatee.
RemoveTransactionFeeDelegateeInfostoken.RemoveTransactionFeeDelegateeInfosInputgoogle.protobuf.EmptyRemove delegatee info of the delegator.
GetTransactionFeeDelegationsOfADelegateetoken.GetTransactionFeeDelegationsOfADelegateeInputtoken.TransactionFeeDelegationsGet the delegation of transaction fee payment of a delegatee.
GetTransactionFeeDelegateeListtoken.GetTransactionFeeDelegateeListInputtoken.GetTransactionFeeDelegateeListOutputGet all delegatee list of a delegator.
GetTransactionFeeDelegateInfotoken.GetTransactionFeeDelegateInfoInputtoken.TransactionFeeDelegationsGet delegate info for transaction fee.

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.Transaction <#aelf.Transaction>acs2.ResourceInfoGets the resource information that the transaction execution depends on.

Contract Types

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.DeveloperFeeController#

FieldTypeDescriptionLabel
root_controllerAuthorityInfoThe association that governs the organization.
parliament_controllerAuthorityInfoThe parliament organization of members.
developer_controllerAuthorityInfoThe developer organization of members.

tokenimpl.GetVirtualAddressForLockingInput#

FieldTypeDescriptionLabel
addressaelf.AddressThe address of the lock.
lock_idaelf.HashThe id of the lock.

tokenimpl.OwningRental#

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

tokenimpl.OwningRental.ResourceAmountEntry#

FieldTypeDescriptionLabel
keystring
valueint64

tokenimpl.OwningRentalUnitValue#

FieldTypeDescriptionLabel
resource_unit_valueOwningRentalUnitValue.ResourceUnitValueEntryResource 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.AddressThe contract address.
method_namestringThe method name.

token.RentalAccountBalanceInsufficient#

FieldTypeDescriptionLabel
symbolstringThe symbol of insufficient rental account balance.
amountint64The balance of the account.

token.RentalCharged#

FieldTypeDescriptionLabel
symbolstringThe symbol of rental fee charged.
amountint64The amount of rental fee charged.
payeraelf.AddressThe payer of rental fee.
receiveraelf.AddressThe receiver of rental fee.

token.RemoveTransactionFeeFreeAllowancesConfigInput#

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

token.ResourceTokenClaimed#

FieldTypeDescriptionLabel
symbolstringThe symbol of fee claimed.
amountint64The amount of fee claimed.
payeraelf.AddressThe payer of fee.
receiveraelf.AddressThe receiver of fee.

token.SetTransactionFeeDelegateInfos#

FieldTypeDescriptionLabel
delegator_addressaelf.AddressThe address of delegator.
delegate_info_listtoken.DelegateInfoThe delegate information for the transaction.repeated

token.DelegateInfo#

FieldTypeDescriptionLabel
delegationsmap<string int64>token symbol amount
contract_addressaelf.AddressThe contract address.
method_namestringThe method name.
isUnlimitedDelegateboolWhether to pay transaction fee continuously without limitation.

token.SetPrimaryTokenSymbolInput#

FieldTypeDescriptionLabel
symbolstringThe symbol of the token.

token.SymbolListToPayTxSizeFee#

FieldTypeDescriptionLabel
symbols_to_pay_tx_size_feeSymbolToPayTxSizeFeeTransaction fee token information.repeated

token.SymbolToPayTxSizeFee#

FieldTypeDescriptionLabel
token_symbolstringThe symbol of token.
base_token_weightint32The charge weight of primary token.
added_token_weightint32The new added token charge weight.

token.TransactionFeeClaimed#

token.TransactionFeeFreeAllowancesMap#

FieldTypeDescriptionLabel
mapmap<string TransactionFeeFreeAllowanceMap>threshold symbol free allowances

token.TokenCreated#

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 created the token.
is_burnableboolA flag indicating if this token is burnable.
issue_chain_idint32The chain id of the token.

token.TokenInfo#

token.TokenInfoList#

FieldTypeDescriptionLabel
valueTokenInfoList of token information.repeated

token.TotalResourceTokensMap#

token.TotalResourceTokensMap.ValueEntry#

FieldTypeDescriptionLabel
keystring
valueint64

token.TotalResourceTokensMaps#

FieldTypeDescriptionLabel
valueContractTotalResourceTokensResource tokens to charge.repeated
block_hashaelf.HashThe hash of the block processing the transaction.
block_heightint64The height of the block processing the transaction.

token.TotalTransactionFeesMap#

FieldTypeDescriptionLabel
valueTotalTransactionFeesMap.ValueEntryToken dictionary that charge transaction fee Symbol->Amount.repeated
block_hashaelf.HashThe hash of the block processing the transaction.
block_heightint64The height of the block processing the transaction.

token.TransactionFeeCharged#

FieldTypeDescriptionLabel
symbolstringResource tokens to charge.repeated
amountint64The hash of the block processing the transaction.
chargingAddressaelf.HashThe height of the block processing the transaction.

token.TotalTransactionFeesMap.ValueEntry#

FieldTypeDescriptionLabel
keystring
valueint64

token.TransactionFeeBill#

FieldTypeDescriptionLabel
fees_mapTransactionFeeBill.FeesMapEntryThe transaction fee dictionary Symbol->fee.repeated

token.TransactionFeeBill.FeesMapEntry#

FieldTypeDescriptionLabel
keystring
valueint64

token.TransferFromInput#

token.TransferInput#

FieldTypeDescriptionLabel
toaelf.AddressThe receiver of the token.
symbolstringThe token symbol to transfer.
amountint64The amount to transfer.
memostringThe memo.

token.Transferred#

token.UnApproveInput#

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

token.UnApproved#

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

token.UnlockInput#

FieldTypeDescriptionLabel
addressaelf.AddressThe one want to un-lock his token.
lock_idaelf.HashId of the lock.
symbolstringThe symbol of the token to un-lock.
usagestringA memo.
amountint64The amount of tokens to un-lock.

token.UpdateCoefficientsInput#

FieldTypeDescriptionLabel
piece_numbersint32The specify pieces gonna update.repeated
coefficientsCalculateFeeCoefficientsCoefficients of one single type.

token.FeeTypeEnum#

NameNumberDescription
READ
STORAGE1
WRITE2
TRAFFIC3
TX4

token.SetTransactionFeeDelegationsInput#

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

token.SetTransactionFeeDelegationsOutput#

FieldTypeDescriptionLabel
successboolWhether set delegation success.

token.RemoveTransactionFeeDelegatorInput#

token.RemoveTransactionFeeDelegateeInput#

FieldTypeDescriptionLabel
delegatee_addressaelf.AddresssThe address of delegatee.

token.MethodFeeFreeAllowance#

FieldTypeDescriptionLabel
symbolstringToken symbol
amountint64The amount of fee free allowance

token.GetTransactionFeeDelegationsOfADelegateeInput#

FieldTypeDescriptionLabel
delegatee_addressaelf.AddresssThe address of delegatee.
delegator_addressaelf.AddresssThe address of delegator.

token.TransactionFeeDelegations#

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

AElf.Standards.ACS1#

acs1.MethodFee#

FieldTypeDescriptionLabel
symbolstringThe token symbol of the method fee.
basic_feeint64The amount of fees to be charged.

acs1.MethodFees#

FieldTypeDescriptionLabel
method_namestringThe name of the method to be charged.
feesMethodFeeList of fees to be charged.repeated
is_size_fee_freeboolOptional based on the implementation of SetMethodFee method.

AElf.Standards.ACS2#

acs2.ResourceInfo#

FieldTypeDescriptionLabel
write_pathsaelf.ScopedStatePathThe state path that depends on when writing.repeated
read_pathsaelf.ScopedStatePathThe state path that depends on when reading.repeated
non_parallelizableboolWhether the transaction is not executed in parallel.

AElf.Types#

aelf.Address#

FieldType
value bytes

aelf.BinaryMerkleTree#

FieldTypeDescriptionLabel
nodesHashThe leaf nodes.repeated
rootHashThe root node hash.
leaf_countint32The count of leaf node.

aelf.Hash#

FieldTypeDescriptionLabel
valuebytes

aelf.LogEvent#

FieldTypeDescriptionLabel
addressAddressThe contract address.
namestringThe name of the log event.
indexedbytesThe indexed data used to calculate bloom.repeated
non_indexedbytesThe non indexed data.

aelf.MerklePath#

FieldTypeDescriptionLabel
merkle_path_nodesMerklePathNodeThe merkle path nodes.repeated

aelf.MerklePathNode#

FieldTypeDescriptionLabel
hashHashThe node hash.
is_left_child_nodeboolWhether it is a left child node.

aelf.SInt32Value#

FieldTypeDescriptionLabel
valuesint32

aelf.SInt64Value#

FieldTypeDescriptionLabel
valuesint64

aelf.ScopedStatePath#

FieldTypeDescriptionLabel
addressAddressThe scope address which will be the contract address.
pathStatePathThe path of contract state.

aelf.SmartContractRegistration#

FieldTypeDescriptionLabel
categorysint32The category of contract code(0: C#).
codebytesThe byte array of the contract code.
code_hashHashThe hash of the contract code.
is_system_contractboolWhether it is a system contract.
versionint32The version of the current contract.

aelf.StatePath#

FieldTypeDescriptionLabel
partsstringThe partial path of the state path.repeated

aelf.Transaction#

FieldTypeDescriptionLabel
fromAddressThe address of the sender of the transaction.
toAddressThe address of the contract when calling a contract.
ref_block_numberint64The height of the referenced block hash.
ref_block_prefixbytesThe first four bytes of the referenced block hash.
method_namestringThe name of a method in the smart contract at the To address.
paramsbytesThe parameters to pass to the smart contract method.
signaturebytesWhen 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.WritesEntryThe changed states.repeated
readsTransactionExecutingStateSet.ReadsEntryThe 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_idHashThe transaction id.
statusTransactionResultStatusThe transaction result status.
logsLogEventThe log events.repeated
bloombytesBloom 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_valuebytesThe return value of the transaction execution.
block_numberint64The height of the block that packages the transaction.
block_hashHashThe hash of the block that packages the transaction.
errorstringFailed execution error message.

aelf.TransactionResultStatus

NameNumberDescription
NOT_EXISTEDThe 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.AddressThe contract address of the controller.
owner_addressaelf.AddressThe address of the owner of the contract.

Edited on: 16 July 2024 04:51:10 GMT+0