Documentation ¶
Index ¶
- Constants
- Variables
- func NewBuiltInFunctionContainer() *functionContainer
- func NewBuiltInFunctionsCreator(args ArgsCreateBuiltInFunctionContainer) (*builtInFuncCreator, error)
- func NewChangeOwnerAddressFunc(gasCost uint64, enableEpochsHandler vmcommon.EnableEpochsHandler) (*changeOwnerAddress, error)
- func NewClaimDeveloperRewardsFunc(gasCost uint64) *claimDeveloperRewards
- func NewDCDTBurnFunc(funcGasCost uint64, marshaller vmcommon.Marshalizer, ...) (*dcdtBurn, error)
- func NewDCDTDataStorage(args ArgsNewDCDTDataStorage) (*dcdtDataStorage, error)
- func NewDCDTDeleteMetadataFunc(args ArgsNewDCDTDeleteMetadata) (*dcdtDeleteMetaData, error)
- func NewDCDTFreezeWipeFunc(dcdtStorageHandler vmcommon.DCDTNFTStorageHandler, ...) (*dcdtFreezeWipe, error)
- func NewDCDTGlobalSettingsFunc(accounts vmcommon.AccountsAdapter, marshaller marshal.Marshalizer, set bool, ...) (*dcdtGlobalSettings, error)
- func NewDCDTLocalBurnFunc(funcGasCost uint64, marshaller vmcommon.Marshalizer, ...) (*dcdtLocalBurn, error)
- func NewDCDTLocalMintFunc(funcGasCost uint64, marshaller vmcommon.Marshalizer, ...) (*dcdtLocalMint, error)
- func NewDCDTNFTAddQuantityFunc(funcGasCost uint64, dcdtStorageHandler vmcommon.DCDTNFTStorageHandler, ...) (*dcdtNFTAddQuantity, error)
- func NewDCDTNFTAddUriFunc(funcGasCost uint64, gasConfig vmcommon.BaseOperationCost, ...) (*dcdtNFTAddUri, error)
- func NewDCDTNFTBurnFunc(funcGasCost uint64, dcdtStorageHandler vmcommon.DCDTNFTStorageHandler, ...) (*dcdtNFTBurn, error)
- func NewDCDTNFTCreateFunc(funcGasCost uint64, gasConfig vmcommon.BaseOperationCost, ...) (*dcdtNFTCreate, error)
- func NewDCDTNFTCreateRoleTransfer(marshaller vmcommon.Marshalizer, accounts vmcommon.AccountsAdapter, ...) (*dcdtNFTCreateRoleTransfer, error)
- func NewDCDTNFTMultiTransferFunc(funcGasCost uint64, marshaller vmcommon.Marshalizer, ...) (*dcdtNFTMultiTransfer, error)
- func NewDCDTNFTTransferFunc(funcGasCost uint64, marshaller vmcommon.Marshalizer, ...) (*dcdtNFTTransfer, error)
- func NewDCDTNFTUpdateAttributesFunc(funcGasCost uint64, gasConfig vmcommon.BaseOperationCost, ...) (*dcdtNFTupdate, error)
- func NewDCDTRolesFunc(marshaller vmcommon.Marshalizer, set bool) (*dcdtRoles, error)
- func NewDCDTTransferFunc(funcGasCost uint64, marshaller vmcommon.Marshalizer, ...) (*dcdtTransfer, error)
- func NewDCDTTransferRoleAddressFunc(accounts vmcommon.AccountsAdapter, marshaller marshal.Marshalizer, ...) (*dcdtTransferAddress, error)
- func NewDeleteUserNameFunc(gasCost uint64, mapDnsAddresses map[string]struct{}, ...) (*deleteUserName, error)
- func NewGuardAccountFunc(args GuardAccountArgs) (*guardAccountFunc, error)
- func NewMigrateDataTrieFunc(builtInCost vmcommon.BuiltInCost, ...) (*migrateDataTrie, error)
- func NewPayableCheckFunc(payable vmcommon.PayableHandler, ...) (*payableCheck, error)
- func NewSaveKeyValueStorageFunc(gasConfig vmcommon.BaseOperationCost, funcGasCost uint64, ...) (*saveKeyValueStorage, error)
- func NewSaveUserNameFunc(gasCost uint64, mapDnsAddresses map[string]struct{}, ...) (*saveUserName, error)
- func NewSetGuardianFunc(args SetGuardianArgs) (*setGuardian, error)
- func NewUnGuardAccountFunc(args GuardAccountArgs) (*unGuardAccountFunc, error)
- type ArgsCreateBuiltInFunctionContainer
- type ArgsNewDCDTDataStorage
- type ArgsNewDCDTDeleteMetadata
- type BaseAccountGuarderArgs
- type DCDTGlobalMetadata
- type DCDTUserMetadata
- type GuardAccountArgs
- type SetGuardianArgs
- type TopicTokenData
Constants ¶
const ( // MetadataPaused is the location of paused flag in the dcdt global meta data MetadataPaused = 1 // MetadataLimitedTransfer is the location of limited transfer flag in the dcdt global meta data MetadataLimitedTransfer = 2 // BurnRoleForAll is the location of burn role for all flag in the dcdt global meta data BurnRoleForAll = 4 )
const ( GlobalMintBurnFlag core.EnableEpochFlag = "GlobalMintBurnFlag" DCDTTransferRoleFlag core.EnableEpochFlag = "DCDTTransferRoleFlag" CheckFunctionArgumentFlag core.EnableEpochFlag = "CheckFunctionArgumentFlag" CheckCorrectTokenIDForTransferRoleFlag core.EnableEpochFlag = "CheckCorrectTokenIDForTransferRoleFlag" FixAsyncCallbackCheckFlag core.EnableEpochFlag = "FixAsyncCallbackCheckFlag" SaveToSystemAccountFlag core.EnableEpochFlag = "SaveToSystemAccountFlag" CheckFrozenCollectionFlag core.EnableEpochFlag = "CheckFrozenCollectionFlag" SendAlwaysFlag core.EnableEpochFlag = "SendAlwaysFlag" ValueLengthCheckFlag core.EnableEpochFlag = "ValueLengthCheckFlag" CheckTransferFlag core.EnableEpochFlag = "CheckTransferFlag" DCDTNFTImprovementV1Flag core.EnableEpochFlag = "DCDTNFTImprovementV1Flag" FixOldTokenLiquidityFlag core.EnableEpochFlag = "FixOldTokenLiquidityFlag" WipeSingleNFTLiquidityDecreaseFlag core.EnableEpochFlag = "WipeSingleNFTLiquidityDecreaseFlag" AlwaysSaveTokenMetaDataFlag core.EnableEpochFlag = "AlwaysSaveTokenMetaDataFlag" SetGuardianFlag core.EnableEpochFlag = "SetGuardianFlag" ConsistentTokensValuesLengthCheckFlag core.EnableEpochFlag = "ConsistentTokensValuesLengthCheckFlag" ChangeUsernameFlag core.EnableEpochFlag = "ChangeUsernameFlag" AutoBalanceDataTriesFlag core.EnableEpochFlag = "AutoBalanceDataTriesFlag" ScToScLogEventFlag core.EnableEpochFlag = "ScToScLogEventFlag" FixGasRemainingForSaveKeyValueFlag core.EnableEpochFlag = "FixGasRemainingForSaveKeyValueFlag" IsChangeOwnerAddressCrossShardThroughSCFlag core.EnableEpochFlag = "IsChangeOwnerAddressCrossShardThroughSCFlag" MigrateDataTrieFlag core.EnableEpochFlag = "MigrateDataTrieFlag" )
Enable epoch flags definitions
const (
// MetadataFrozen is the location of frozen flag in the dcdt user meta data
MetadataFrozen = 1
)
Variables ¶
var ErrAccountNotPayable = errors.New("sending value to non payable contract")
ErrAccountNotPayable will be sent when trying to send tokens to a non-payableCheck account
var ErrActionNotAllowed = errors.New("action is not allowed")
ErrActionNotAllowed signals that action is not allowed
var ErrAddressIsNotAllowed = errors.New("address is not allowed to do the action")
ErrAddressIsNotAllowed signals that sender is not allowed to do the action
var ErrAddressIsNotDCDTSystemSC = errors.New("destination is not system sc address")
ErrAddressIsNotDCDTSystemSC signals that destination is not a system sc address
var ErrBuiltInFunctionCalledWithValue = errors.New("built in function called with tx value is not allowed")
ErrBuiltInFunctionCalledWithValue signals that builtin function was called with value that is not allowed
var ErrCallerIsNotTheDNSAddress = errors.New("not a dns address")
ErrCallerIsNotTheDNSAddress signals that called address is not the DNS address
var ErrCannotMigrateNilUserName = errors.New("cannot migrate nil username")
ErrCannotMigrateNilUserName signals that a nil username is migrated
var ErrCannotSetOwnAddressAsGuardian = errors.New("cannot set own address as guardian")
ErrCannotSetOwnAddressAsGuardian signals that an owner cannot set its own address as guardian
var ErrCannotWipeAccountNotFrozen = errors.New("cannot wipe because the account is not frozen for this dcdt token")
ErrCannotWipeAccountNotFrozen signals that account isn't frozen so the wipe is not possible
var ErrContainerKeyAlreadyExists = errors.New("provided key already exists in container")
ErrContainerKeyAlreadyExists signals that an element was already set in the container's map
var ErrDCDTIsFrozenForAccount = errors.New("account is frozen for this dcdt token")
ErrDCDTIsFrozenForAccount signals that account is frozen for given dcdt token
var ErrDCDTTokenIsPaused = errors.New("dcdt token is paused")
ErrDCDTTokenIsPaused signals that dcdt token is paused
var ErrEmptyFunctionName = errors.New("empty function name")
ErrEmptyFunctionName signals that an empty function name has been provided
var ErrGuardianAlreadyExists = errors.New("a guardian with the same address already exists")
ErrGuardianAlreadyExists signals that a guardian with the same address already exists
var ErrInsufficientFunds = errors.New("insufficient funds")
ErrInsufficientFunds signals the funds are insufficient for the move balance operation but the transaction fee is covered by the current balance
var ErrInsufficientQuantityDCDT = errors.New("insufficient quantity")
ErrInsufficientQuantityDCDT signals the funds are insufficient for the DCDT transfer
var ErrInvalidAddress = errors.New("invalid address")
ErrInvalidAddress signals that an invalid address has been provided
var ErrInvalidAddressLength = errors.New("invalid address length")
ErrInvalidAddressLength signals that address length is invalid
var ErrInvalidArguments = errors.New("invalid arguments to process built-in function")
ErrInvalidArguments signals that invalid arguments were given to process built-in function
var ErrInvalidContainerKey = errors.New("element does not exist in container")
ErrInvalidContainerKey signals that an element does not exist in the container's map
var ErrInvalidLiquidityForDCDT = errors.New("invalid liquidity for DCDT")
ErrInvalidLiquidityForDCDT signals that liquidity is invalid for DCDT
var ErrInvalidMaxNumAddresses = errors.New("invalid max number of addresses")
ErrInvalidMaxNumAddresses signals that there is an invalid max number of addresses
var ErrInvalidMetadata = errors.New("invalid metadata")
ErrInvalidMetadata signals that invalid metadata was provided
var ErrInvalidNFTQuantity = errors.New("invalid NFT quantity")
ErrInvalidNFTQuantity signals that invalid NFT quantity was provided
var ErrInvalidNonce = errors.New("invalid nonce for dcdt")
ErrInvalidNonce signals that invalid nonce for dcdt
var ErrInvalidNumOfArgs = errors.New("invalid number of arguments")
ErrInvalidNumOfArgs signals that the number of arguments is invalid
var ErrInvalidNumberOfArguments = errors.New("invalid number of arguments")
ErrInvalidNumberOfArguments signals that an invalid number of arguments has been provided
var ErrInvalidRcvAddr = errors.New("invalid receiver address")
ErrInvalidRcvAddr signals that an invalid receiver address was provided
var ErrInvalidServiceUID = errors.New("service UID is invalid")
ErrInvalidServiceUID signals that an invalid service UID was provided
var ErrInvalidTokenID = errors.New("invalid tokenID")
ErrInvalidTokenID signals that invalid tokenID was provided
var ErrNFTDoesNotHaveMetadata = errors.New("NFT does not have metadata")
ErrNFTDoesNotHaveMetadata signals that NFT does not have metadata
var ErrNFTTokenDoesNotExist = errors.New("NFT token does not exist")
ErrNFTTokenDoesNotExist signals that NFT token does not exist
var ErrNegativeValue = errors.New("negative value")
ErrNegativeValue signals that a negative value has been detected and it is not allowed
var ErrNewNFTDataOnSenderAddress = errors.New("new NFT data on sender")
ErrNewNFTDataOnSenderAddress signals that a new NFT data was found on the sender address
var ErrNilAccountHandler = errors.New("nil account handler provided")
ErrNilAccountHandler signals that a nil account handler has been provided
var ErrNilAccountsAdapter = errors.New("nil AccountsAdapter")
ErrNilAccountsAdapter defines the error when trying to use a nil AccountsAddapter
var ErrNilActiveHandler = errors.New("nil active handler")
ErrNilActiveHandler signals that a nil active handler has been provided
var ErrNilContainerElement = errors.New("element cannot be nil")
ErrNilContainerElement signals when trying to add a nil element in the container
var ErrNilDCDTData = errors.New("nil dcdt data")
ErrNilDCDTData signals that DCDT data does not exist
var ErrNilDCDTNFTStorageHandler = errors.New("nil dcdt nft storage handler")
ErrNilDCDTNFTStorageHandler signals that a nil nft storage handler has been provided
var ErrNilDnsAddresses = errors.New("nil dns addresses map")
ErrNilDnsAddresses signals that nil dns addresses map was provided
var ErrNilEnableEpochsHandler = errors.New("nil enable epochs handler")
ErrNilEnableEpochsHandler signals that a nil enable epochs handler was provided
var ErrNilGlobalSettingsHandler = errors.New("nil pause handler")
ErrNilGlobalSettingsHandler signals that nil pause handler has been provided
var ErrNilGuardedAccountHandler = errors.New("nil guarded account handler")
ErrNilGuardedAccountHandler signals that a nil guarded account handler was provided
var ErrNilMarshalizer = errors.New("nil Marshalizer")
ErrNilMarshalizer signals that an operation has been attempted to or with a nil Marshalizer implementation
var ErrNilPayableHandler = errors.New("nil payableHandler was provided")
ErrNilPayableHandler signals that nil payableHandler was provided
var ErrNilRolesHandler = errors.New("nil roles handler")
ErrNilRolesHandler signals that nil roles handler has been provided
var ErrNilSCDestAccount = errors.New("nil destination SC account")
ErrNilSCDestAccount signals that destination account is nil
var ErrNilShardCoordinator = errors.New("nil shard coordinator")
ErrNilShardCoordinator signals that an operation has been attempted to or with a nil shard coordinator
var ErrNilTransactionHandler = errors.New("nil transaction handler")
ErrNilTransactionHandler signals that a nil transaction handler has been provided
var ErrNilUserAccount = errors.New("nil user account")
ErrNilUserAccount signals that nil user account was provided
var ErrNilValue = errors.New("nil value")
ErrNilValue signals the value is nil
var ErrNilVmInput = errors.New("nil vm input")
ErrNilVmInput signals that provided vm input is nil
var ErrNoGuardianEnabled = errors.New("account has no guardian enabled")
ErrNoGuardianEnabled signals that account has no guardian enabled
var ErrNotEnoughGas = errors.New("not enough gas was sent in the transaction")
ErrNotEnoughGas signals that not enough gas has been provided
var ErrOnlyFungibleTokensHaveBalanceTransfer = errors.New("only fungible tokens have balance transfer")
ErrOnlyFungibleTokensHaveBalanceTransfer signals that only fungible tokens have balance transfer
var ErrOnlySystemAccountAccepted = errors.New("only system account is accepted")
ErrOnlySystemAccountAccepted signals that only system account is accepted
var ErrOperationNotPermitted = errors.New("operation in account not permitted")
ErrOperationNotPermitted signals that operation is not permitted
var ErrOwnerAlreadyHasOneGuardianPending = errors.New("owner already has one guardian pending")
ErrOwnerAlreadyHasOneGuardianPending signals that an owner already has one guardian pending
var ErrSetGuardAccountFlag = errors.New("cannot guard account, it is already guarded")
ErrSetGuardAccountFlag signals that an account is already guarded when trying to guard it
var ErrSetUnGuardAccount = errors.New("cannot un-guard account, it is not guarded")
ErrSetUnGuardAccount signals that an account is already unguarded when trying to un-guard it
var ErrTokenHasValidMetadata = errors.New("token has valid metadata")
ErrTokenHasValidMetadata signals that token has a valid metadata
var ErrTooManyTransferAddresses = errors.New("too many transfer addresses")
ErrTooManyTransferAddresses signals that too many transfer address roles has been added
var ErrUserNameChangeIsDisabled = errors.New("user name change is disabled")
ErrUserNameChangeIsDisabled signals the user name change is not allowed
var ErrUserNamePrefixNotEqual = errors.New("user name prefix is not equal")
ErrUserNamePrefixNotEqual signals that user name prefix is not equal
var ErrWrongTypeAssertion = errors.New("wrong type assertion")
ErrWrongTypeAssertion signals that an type assertion failed
var ErrWrongTypeInContainer = errors.New("wrong type of object inside container")
ErrWrongTypeInContainer signals that a wrong type of object was found in container
var ErrWrongUserNameSplit = errors.New("wrong user name split")
ErrWrongUserNameSplit signals that user name split is wrong
Functions ¶
func NewBuiltInFunctionContainer ¶
func NewBuiltInFunctionContainer() *functionContainer
NewBuiltInFunctionContainer will create a new instance of a container
func NewBuiltInFunctionsCreator ¶
func NewBuiltInFunctionsCreator(args ArgsCreateBuiltInFunctionContainer) (*builtInFuncCreator, error)
NewBuiltInFunctionsCreator creates a component which will instantiate the built in functions contracts
func NewChangeOwnerAddressFunc ¶
func NewChangeOwnerAddressFunc(gasCost uint64, enableEpochsHandler vmcommon.EnableEpochsHandler) (*changeOwnerAddress, error)
NewChangeOwnerAddressFunc create a new change owner built-in function
func NewClaimDeveloperRewardsFunc ¶
func NewClaimDeveloperRewardsFunc(gasCost uint64) *claimDeveloperRewards
NewClaimDeveloperRewardsFunc returns a new developer rewards implementation
func NewDCDTBurnFunc ¶ added in v0.0.2
func NewDCDTBurnFunc( funcGasCost uint64, marshaller vmcommon.Marshalizer, globalSettingsHandler vmcommon.DCDTGlobalSettingsHandler, enableEpochsHandler vmcommon.EnableEpochsHandler, ) (*dcdtBurn, error)
NewDCDTBurnFunc returns the dcdt burn built-in function component
func NewDCDTDataStorage ¶ added in v0.0.2
func NewDCDTDataStorage(args ArgsNewDCDTDataStorage) (*dcdtDataStorage, error)
NewDCDTDataStorage creates a new dcdt data storage handler
func NewDCDTDeleteMetadataFunc ¶ added in v0.0.2
func NewDCDTDeleteMetadataFunc( args ArgsNewDCDTDeleteMetadata, ) (*dcdtDeleteMetaData, error)
NewDCDTDeleteMetadataFunc returns the dcdt metadata deletion built-in function component
func NewDCDTFreezeWipeFunc ¶ added in v0.0.2
func NewDCDTFreezeWipeFunc( dcdtStorageHandler vmcommon.DCDTNFTStorageHandler, enableEpochsHandler vmcommon.EnableEpochsHandler, marshaller vmcommon.Marshalizer, freeze bool, wipe bool, ) (*dcdtFreezeWipe, error)
NewDCDTFreezeWipeFunc returns the dcdt freeze/un-freeze/wipe built-in function component
func NewDCDTGlobalSettingsFunc ¶ added in v0.0.2
func NewDCDTGlobalSettingsFunc( accounts vmcommon.AccountsAdapter, marshaller marshal.Marshalizer, set bool, function string, activeHandler func() bool, ) (*dcdtGlobalSettings, error)
NewDCDTGlobalSettingsFunc returns the dcdt pause/un-pause built-in function component
func NewDCDTLocalBurnFunc ¶ added in v0.0.2
func NewDCDTLocalBurnFunc( funcGasCost uint64, marshaller vmcommon.Marshalizer, globalSettingsHandler vmcommon.ExtendedDCDTGlobalSettingsHandler, rolesHandler vmcommon.DCDTRoleHandler, enableEpochsHandler vmcommon.EnableEpochsHandler, ) (*dcdtLocalBurn, error)
NewDCDTLocalBurnFunc returns the dcdt local burn built-in function component
func NewDCDTLocalMintFunc ¶ added in v0.0.2
func NewDCDTLocalMintFunc( funcGasCost uint64, marshaller vmcommon.Marshalizer, globalSettingsHandler vmcommon.DCDTGlobalSettingsHandler, rolesHandler vmcommon.DCDTRoleHandler, enableEpochsHandler vmcommon.EnableEpochsHandler, ) (*dcdtLocalMint, error)
NewDCDTLocalMintFunc returns the dcdt local mint built-in function component
func NewDCDTNFTAddQuantityFunc ¶ added in v0.0.2
func NewDCDTNFTAddQuantityFunc( funcGasCost uint64, dcdtStorageHandler vmcommon.DCDTNFTStorageHandler, globalSettingsHandler vmcommon.DCDTGlobalSettingsHandler, rolesHandler vmcommon.DCDTRoleHandler, enableEpochsHandler vmcommon.EnableEpochsHandler, ) (*dcdtNFTAddQuantity, error)
NewDCDTNFTAddQuantityFunc returns the dcdt NFT add quantity built-in function component
func NewDCDTNFTAddUriFunc ¶ added in v0.0.2
func NewDCDTNFTAddUriFunc( funcGasCost uint64, gasConfig vmcommon.BaseOperationCost, dcdtStorageHandler vmcommon.DCDTNFTStorageHandler, globalSettingsHandler vmcommon.DCDTGlobalSettingsHandler, rolesHandler vmcommon.DCDTRoleHandler, enableEpochsHandler vmcommon.EnableEpochsHandler, ) (*dcdtNFTAddUri, error)
NewDCDTNFTAddUriFunc returns the dcdt NFT add URI built-in function component
func NewDCDTNFTBurnFunc ¶ added in v0.0.2
func NewDCDTNFTBurnFunc( funcGasCost uint64, dcdtStorageHandler vmcommon.DCDTNFTStorageHandler, globalSettingsHandler vmcommon.ExtendedDCDTGlobalSettingsHandler, rolesHandler vmcommon.DCDTRoleHandler, ) (*dcdtNFTBurn, error)
NewDCDTNFTBurnFunc returns the dcdt NFT burn built-in function component
func NewDCDTNFTCreateFunc ¶ added in v0.0.2
func NewDCDTNFTCreateFunc( funcGasCost uint64, gasConfig vmcommon.BaseOperationCost, marshaller vmcommon.Marshalizer, globalSettingsHandler vmcommon.DCDTGlobalSettingsHandler, rolesHandler vmcommon.DCDTRoleHandler, dcdtStorageHandler vmcommon.DCDTNFTStorageHandler, accounts vmcommon.AccountsAdapter, enableEpochsHandler vmcommon.EnableEpochsHandler, ) (*dcdtNFTCreate, error)
NewDCDTNFTCreateFunc returns the dcdt NFT create built-in function component
func NewDCDTNFTCreateRoleTransfer ¶ added in v0.0.2
func NewDCDTNFTCreateRoleTransfer( marshaller vmcommon.Marshalizer, accounts vmcommon.AccountsAdapter, shardCoordinator vmcommon.Coordinator, ) (*dcdtNFTCreateRoleTransfer, error)
NewDCDTNFTCreateRoleTransfer returns the dcdt NFT create role transfer built-in function component
func NewDCDTNFTMultiTransferFunc ¶ added in v0.0.2
func NewDCDTNFTMultiTransferFunc( funcGasCost uint64, marshaller vmcommon.Marshalizer, globalSettingsHandler vmcommon.ExtendedDCDTGlobalSettingsHandler, accounts vmcommon.AccountsAdapter, shardCoordinator vmcommon.Coordinator, gasConfig vmcommon.BaseOperationCost, enableEpochsHandler vmcommon.EnableEpochsHandler, roleHandler vmcommon.DCDTRoleHandler, dcdtStorageHandler vmcommon.DCDTNFTStorageHandler, ) (*dcdtNFTMultiTransfer, error)
NewDCDTNFTMultiTransferFunc returns the dcdt NFT multi transfer built-in function component
func NewDCDTNFTTransferFunc ¶ added in v0.0.2
func NewDCDTNFTTransferFunc( funcGasCost uint64, marshaller vmcommon.Marshalizer, globalSettingsHandler vmcommon.ExtendedDCDTGlobalSettingsHandler, accounts vmcommon.AccountsAdapter, shardCoordinator vmcommon.Coordinator, gasConfig vmcommon.BaseOperationCost, rolesHandler vmcommon.DCDTRoleHandler, dcdtStorageHandler vmcommon.DCDTNFTStorageHandler, enableEpochsHandler vmcommon.EnableEpochsHandler, ) (*dcdtNFTTransfer, error)
NewDCDTNFTTransferFunc returns the dcdt NFT transfer built-in function component
func NewDCDTNFTUpdateAttributesFunc ¶ added in v0.0.2
func NewDCDTNFTUpdateAttributesFunc( funcGasCost uint64, gasConfig vmcommon.BaseOperationCost, dcdtStorageHandler vmcommon.DCDTNFTStorageHandler, globalSettingsHandler vmcommon.DCDTGlobalSettingsHandler, rolesHandler vmcommon.DCDTRoleHandler, enableEpochsHandler vmcommon.EnableEpochsHandler, ) (*dcdtNFTupdate, error)
NewDCDTNFTUpdateAttributesFunc returns the dcdt NFT update attribute built-in function component
func NewDCDTRolesFunc ¶ added in v0.0.2
func NewDCDTRolesFunc( marshaller vmcommon.Marshalizer, set bool, ) (*dcdtRoles, error)
NewDCDTRolesFunc returns the dcdt change roles built-in function component
func NewDCDTTransferFunc ¶ added in v0.0.2
func NewDCDTTransferFunc( funcGasCost uint64, marshaller vmcommon.Marshalizer, globalSettingsHandler vmcommon.ExtendedDCDTGlobalSettingsHandler, shardCoordinator vmcommon.Coordinator, rolesHandler vmcommon.DCDTRoleHandler, enableEpochsHandler vmcommon.EnableEpochsHandler, ) (*dcdtTransfer, error)
NewDCDTTransferFunc returns the dcdt transfer built-in function component
func NewDCDTTransferRoleAddressFunc ¶ added in v0.0.2
func NewDCDTTransferRoleAddressFunc( accounts vmcommon.AccountsAdapter, marshaller marshal.Marshalizer, maxNumAddresses uint32, set bool, enableEpochsHandler vmcommon.EnableEpochsHandler, ) (*dcdtTransferAddress, error)
NewDCDTTransferRoleAddressFunc returns the dcdt transfer role address handler built-in function component
func NewDeleteUserNameFunc ¶
func NewDeleteUserNameFunc( gasCost uint64, mapDnsAddresses map[string]struct{}, enableEpochsHandler vmcommon.EnableEpochsHandler, ) (*deleteUserName, error)
NewDeleteUserNameFunc returns a delete username built in function implementation
func NewGuardAccountFunc ¶
func NewGuardAccountFunc(args GuardAccountArgs) (*guardAccountFunc, error)
NewGuardAccountFunc will instantiate a new guard account built-in function
func NewMigrateDataTrieFunc ¶
func NewMigrateDataTrieFunc( builtInCost vmcommon.BuiltInCost, enableEpochsHandler vmcommon.EnableEpochsHandler, accounts vmcommon.AccountsAdapter, ) (*migrateDataTrie, error)
NewMigrateDataTrieFunc creates a new migrateDataTrie built-in function component
func NewPayableCheckFunc ¶
func NewPayableCheckFunc( payable vmcommon.PayableHandler, enableEpochsHandler vmcommon.EnableEpochsHandler, ) (*payableCheck, error)
NewPayableCheckFunc returns a new component which checks if destination is payableCheck when needed
func NewSaveKeyValueStorageFunc ¶
func NewSaveKeyValueStorageFunc( gasConfig vmcommon.BaseOperationCost, funcGasCost uint64, enableEpochsHandler vmcommon.EnableEpochsHandler, ) (*saveKeyValueStorage, error)
NewSaveKeyValueStorageFunc returns the save key-value storage built in function
func NewSaveUserNameFunc ¶
func NewSaveUserNameFunc( gasCost uint64, mapDnsAddresses map[string]struct{}, mapDnsV2Addresses map[string]struct{}, enableEpochsHandler vmcommon.EnableEpochsHandler, ) (*saveUserName, error)
NewSaveUserNameFunc returns a username built in function implementation
func NewSetGuardianFunc ¶
func NewSetGuardianFunc(args SetGuardianArgs) (*setGuardian, error)
NewSetGuardianFunc will instantiate a new set guardian built-in function
func NewUnGuardAccountFunc ¶
func NewUnGuardAccountFunc(args GuardAccountArgs) (*unGuardAccountFunc, error)
NewUnGuardAccountFunc will instantiate a new un-guard account built-in function
Types ¶
type ArgsCreateBuiltInFunctionContainer ¶
type ArgsCreateBuiltInFunctionContainer struct { GasMap map[string]map[string]uint64 MapDNSAddresses map[string]struct{} MapDNSV2Addresses map[string]struct{} EnableUserNameChange bool Marshalizer vmcommon.Marshalizer Accounts vmcommon.AccountsAdapter ShardCoordinator vmcommon.Coordinator EnableEpochsHandler vmcommon.EnableEpochsHandler GuardedAccountHandler vmcommon.GuardedAccountHandler MaxNumOfAddressesForTransferRole uint32 ConfigAddress []byte }
ArgsCreateBuiltInFunctionContainer defines the input arguments to create built in functions container
type ArgsNewDCDTDataStorage ¶ added in v0.0.2
type ArgsNewDCDTDataStorage struct { Accounts vmcommon.AccountsAdapter GlobalSettingsHandler vmcommon.DCDTGlobalSettingsHandler Marshalizer vmcommon.Marshalizer EnableEpochsHandler vmcommon.EnableEpochsHandler ShardCoordinator vmcommon.Coordinator }
ArgsNewDCDTDataStorage defines the argument list for new dcdt data storage handler
type ArgsNewDCDTDeleteMetadata ¶ added in v0.0.2
type ArgsNewDCDTDeleteMetadata struct { FuncGasCost uint64 Marshalizer vmcommon.Marshalizer Accounts vmcommon.AccountsAdapter AllowedAddress []byte Delete bool EnableEpochsHandler vmcommon.EnableEpochsHandler }
ArgsNewDCDTDeleteMetadata defines the argument list for new dcdt delete metadata built in function
type BaseAccountGuarderArgs ¶
type BaseAccountGuarderArgs struct { GuardedAccountHandler vmcommon.GuardedAccountHandler Marshaller marshal.Marshalizer EnableEpochsHandler vmcommon.EnableEpochsHandler FuncGasCost uint64 }
BaseAccountGuarderArgs is a struct placeholder for all necessary args to create a newBaseAccountGuarder
type DCDTGlobalMetadata ¶ added in v0.0.2
DCDTGlobalMetadata represents dcdt global metadata saved on system account
func DCDTGlobalMetadataFromBytes ¶ added in v0.0.2
func DCDTGlobalMetadataFromBytes(bytes []byte) DCDTGlobalMetadata
DCDTGlobalMetadataFromBytes creates a metadata object from bytes
func (*DCDTGlobalMetadata) ToBytes ¶ added in v0.0.2
func (metadata *DCDTGlobalMetadata) ToBytes() []byte
ToBytes converts the metadata to bytes
type DCDTUserMetadata ¶ added in v0.0.2
type DCDTUserMetadata struct {
Frozen bool
}
DCDTUserMetadata represents dcdt user metadata saved on every account
func DCDTUserMetadataFromBytes ¶ added in v0.0.2
func DCDTUserMetadataFromBytes(bytes []byte) DCDTUserMetadata
DCDTUserMetadataFromBytes creates a metadata object from bytes
func (*DCDTUserMetadata) ToBytes ¶ added in v0.0.2
func (metadata *DCDTUserMetadata) ToBytes() []byte
ToBytes converts the metadata to bytes
type GuardAccountArgs ¶
type GuardAccountArgs struct {
BaseAccountGuarderArgs
}
GuardAccountArgs is a struct placeholder for all necessary args to create either a NewGuardAccountFunc or a NewUnGuardAccountFunc
type SetGuardianArgs ¶
type SetGuardianArgs struct {
BaseAccountGuarderArgs
}
SetGuardianArgs is a struct placeholder for all necessary args to create a NewSetGuardianFunc
Source Files ¶
- baseAccountGuarder.go
- baseActiveHandler.go
- baseGuardAccount.go
- changeOwnerAddress.go
- claimDeveloperRewards.go
- container.go
- creator.go
- dcdtBurn.go
- dcdtDataStorage.go
- dcdtDeleteMetadata.go
- dcdtFreezeWipe.go
- dcdtGlobalSettings.go
- dcdtLocalBurn.go
- dcdtLocalMint.go
- dcdtMetaData.go
- dcdtNFTAddQuantity.go
- dcdtNFTAddUri.go
- dcdtNFTBurn.go
- dcdtNFTCreate.go
- dcdtNFTCreateRoleTransfer.go
- dcdtNFTTransfer.go
- dcdtRoles.go
- dcdtTransfer.go
- dcdtTransferRole.go
- deleteUserName.go
- disabledPayable.go
- errors.go
- flags.go
- guardAccount.go
- keyValueStorage.go
- logsAndEvents.go
- migrateDataTrie.go
- multiDCDTNFTTransfer.go
- payable.go
- saveUserName.go
- setGuardian.go
- unGuardAccount.go
- updateNFTAttributes.go