Documentation ¶
Index ¶
- Constants
- func NewBuiltInFunctionContainer() *functionContainer
- func NewBuiltInFunctionsFactory(args ArgsCreateBuiltInFunctionContainer) (*builtInFuncFactory, error)
- func NewChangeOwnerAddressFunc(gasCost uint64) *changeOwnerAddress
- func NewClaimDeveloperRewardsFunc(gasCost uint64) *claimDeveloperRewards
- func NewESDTBurnFunc(funcGasCost uint64, marshalizer marshal.Marshalizer, ...) (*esdtBurn, error)
- func NewESDTFreezeWipeFunc(marshalizer marshal.Marshalizer, freeze bool, wipe bool) (*esdtFreezeWipe, error)
- func NewESDTLocalBurnFunc(funcGasCost uint64, marshalizer marshal.Marshalizer, ...) (*esdtLocalBurn, error)
- func NewESDTLocalMintFunc(funcGasCost uint64, marshalizer marshal.Marshalizer, ...) (*esdtLocalMint, error)
- func NewESDTNFTAddQuantityFunc(funcGasCost uint64, marshalizer marshal.Marshalizer, ...) (*esdtNFTAddQuantity, error)
- func NewESDTNFTBurnFunc(funcGasCost uint64, marshalizer marshal.Marshalizer, ...) (*esdtNFTBurn, error)
- func NewESDTNFTCreateFunc(funcGasCost uint64, gasConfig process.BaseOperationCost, ...) (*esdtNFTCreate, error)
- func NewESDTNFTCreateRoleTransfer(marshalizer marshal.Marshalizer, accounts state.AccountsAdapter, ...) (*esdtNFTCreateRoleTransfer, error)
- func NewESDTNFTTransferFunc(funcGasCost uint64, marshalizer marshal.Marshalizer, ...) (*esdtNFTTransfer, error)
- func NewESDTPauseFunc(accounts state.AccountsAdapter, pause bool) (*esdtPause, error)
- func NewESDTRolesFunc(marshalizer marshal.Marshalizer, set bool) (*esdtRoles, error)
- func NewESDTTransferFunc(funcGasCost uint64, marshalizer marshal.Marshalizer, ...) (*esdtTransfer, error)
- func NewSaveKeyValueStorageFunc(gasConfig process.BaseOperationCost, funcGasCost uint64) (*saveKeyValueStorage, error)
- func NewSaveUserNameFunc(gasCost uint64, mapDnsAddresses map[string]struct{}, enableChange bool) (*saveUserName, error)
- func SetPayableHandler(container process.BuiltInFunctionContainer, ...) error
- type ArgsCreateBuiltInFunctionContainer
- type ESDTGlobalMetadata
- type ESDTUserMetadata
Constants ¶
const (
// MetadataFrozen is the location of frozen flag in the esdt user meta data
MetadataFrozen = 1
)
const (
// MetadataPaused is the location of paused flag in the esdt global meta data
MetadataPaused = 1
)
Variables ¶
This section is empty.
Functions ¶
func NewBuiltInFunctionContainer ¶
func NewBuiltInFunctionContainer() *functionContainer
NewBuiltInFunctionContainer will create a new instance of a container
func NewBuiltInFunctionsFactory ¶
func NewBuiltInFunctionsFactory(args ArgsCreateBuiltInFunctionContainer) (*builtInFuncFactory, error)
NewBuiltInFunctionsFactory creates a factory which will instantiate the built in functions contracts
func NewChangeOwnerAddressFunc ¶
func NewChangeOwnerAddressFunc(gasCost uint64) *changeOwnerAddress
NewChangeOwnerAddressFunc create a new change owner built in function
func NewClaimDeveloperRewardsFunc ¶
func NewClaimDeveloperRewardsFunc(gasCost uint64) *claimDeveloperRewards
NewClaimDeveloperRewardsFunc returns a new developer rewards implementation
func NewESDTBurnFunc ¶
func NewESDTBurnFunc( funcGasCost uint64, marshalizer marshal.Marshalizer, pauseHandler process.ESDTPauseHandler, ) (*esdtBurn, error)
NewESDTBurnFunc returns the esdt burn built-in function component
func NewESDTFreezeWipeFunc ¶
func NewESDTFreezeWipeFunc( marshalizer marshal.Marshalizer, freeze bool, wipe bool, ) (*esdtFreezeWipe, error)
NewESDTFreezeWipeFunc returns the esdt freeze/un-freeze/wipe built-in function component
func NewESDTLocalBurnFunc ¶
func NewESDTLocalBurnFunc( funcGasCost uint64, marshalizer marshal.Marshalizer, pauseHandler process.ESDTPauseHandler, rolesHandler process.ESDTRoleHandler, ) (*esdtLocalBurn, error)
NewESDTLocalBurnFunc returns the esdt local burn built-in function component
func NewESDTLocalMintFunc ¶
func NewESDTLocalMintFunc( funcGasCost uint64, marshalizer marshal.Marshalizer, pauseHandler process.ESDTPauseHandler, rolesHandler process.ESDTRoleHandler, ) (*esdtLocalMint, error)
NewESDTLocalMintFunc returns the esdt local mint built-in function component
func NewESDTNFTAddQuantityFunc ¶
func NewESDTNFTAddQuantityFunc( funcGasCost uint64, marshalizer marshal.Marshalizer, pauseHandler process.ESDTPauseHandler, rolesHandler process.ESDTRoleHandler, ) (*esdtNFTAddQuantity, error)
NewESDTNFTAddQuantityFunc returns the esdt NFT add quantity built-in function component
func NewESDTNFTBurnFunc ¶
func NewESDTNFTBurnFunc( funcGasCost uint64, marshalizer marshal.Marshalizer, pauseHandler process.ESDTPauseHandler, rolesHandler process.ESDTRoleHandler, ) (*esdtNFTBurn, error)
NewESDTNFTBurnFunc returns the esdt NFT burn built-in function component
func NewESDTNFTCreateFunc ¶
func NewESDTNFTCreateFunc( funcGasCost uint64, gasConfig process.BaseOperationCost, marshalizer marshal.Marshalizer, pauseHandler process.ESDTPauseHandler, rolesHandler process.ESDTRoleHandler, ) (*esdtNFTCreate, error)
NewESDTNFTCreateFunc returns the esdt NFT create built-in function component
func NewESDTNFTCreateRoleTransfer ¶
func NewESDTNFTCreateRoleTransfer( marshalizer marshal.Marshalizer, accounts state.AccountsAdapter, shardCoordinator sharding.Coordinator, ) (*esdtNFTCreateRoleTransfer, error)
NewESDTNFTCreateRoleTransfer returns the esdt NFT create role transfer built-in function component
func NewESDTNFTTransferFunc ¶
func NewESDTNFTTransferFunc( funcGasCost uint64, marshalizer marshal.Marshalizer, pauseHandler process.ESDTPauseHandler, accounts state.AccountsAdapter, shardCoordinator sharding.Coordinator, gasConfig process.BaseOperationCost, ) (*esdtNFTTransfer, error)
NewESDTNFTTransferFunc returns the esdt NFT transfer built-in function component
func NewESDTPauseFunc ¶
func NewESDTPauseFunc( accounts state.AccountsAdapter, pause bool, ) (*esdtPause, error)
NewESDTPauseFunc returns the esdt pause/un-pause built-in function component
func NewESDTRolesFunc ¶
func NewESDTRolesFunc( marshalizer marshal.Marshalizer, set bool, ) (*esdtRoles, error)
NewESDTRolesFunc returns the esdt change roles built-in function component
func NewESDTTransferFunc ¶
func NewESDTTransferFunc( funcGasCost uint64, marshalizer marshal.Marshalizer, pauseHandler process.ESDTPauseHandler, shardCoordinator sharding.Coordinator, ) (*esdtTransfer, error)
NewESDTTransferFunc returns the esdt transfer built-in function component
func NewSaveKeyValueStorageFunc ¶
func NewSaveKeyValueStorageFunc( gasConfig process.BaseOperationCost, funcGasCost uint64, ) (*saveKeyValueStorage, error)
NewSaveKeyValueStorageFunc returns the save key-value storage built in function
func NewSaveUserNameFunc ¶
func NewSaveUserNameFunc( gasCost uint64, mapDnsAddresses map[string]struct{}, enableChange bool, ) (*saveUserName, error)
NewSaveUserNameFunc returns a username built in function implementation
func SetPayableHandler ¶
func SetPayableHandler(container process.BuiltInFunctionContainer, payableHandler process.PayableHandler) error
SetPayableHandler sets the payable interface to the needed functions
Types ¶
type ArgsCreateBuiltInFunctionContainer ¶
type ArgsCreateBuiltInFunctionContainer struct { GasSchedule core.GasScheduleNotifier MapDNSAddresses map[string]struct{} EnableUserNameChange bool Marshalizer marshal.Marshalizer Accounts state.AccountsAdapter ShardCoordinator sharding.Coordinator }
ArgsCreateBuiltInFunctionContainer -
type ESDTGlobalMetadata ¶
type ESDTGlobalMetadata struct {
Paused bool
}
ESDTGlobalMetadata represents esdt global metadata saved on system account
func ESDTGlobalMetadataFromBytes ¶
func ESDTGlobalMetadataFromBytes(bytes []byte) ESDTGlobalMetadata
ESDTGlobalMetadataFromBytes creates a metadata object from bytes
func (*ESDTGlobalMetadata) ToBytes ¶
func (metadata *ESDTGlobalMetadata) ToBytes() []byte
ToBytes converts the metadata to bytes
type ESDTUserMetadata ¶
type ESDTUserMetadata struct {
Frozen bool
}
ESDTUserMetadata represents esdt user metadata saved on every account
func ESDTUserMetadataFromBytes ¶
func ESDTUserMetadataFromBytes(bytes []byte) ESDTUserMetadata
ESDTUserMetadataFromBytes creates a metadata object from bytes
func (*ESDTUserMetadata) ToBytes ¶
func (metadata *ESDTUserMetadata) ToBytes() []byte
ToBytes converts the metadata to bytes
Source Files ¶
- changeOwnerAddress.go
- claimDeveloperRewards.go
- container.go
- disabledPayable.go
- esdtBurn.go
- esdtFreezeWipe.go
- esdtLocalBurn.go
- esdtLocalMint.go
- esdtMetaData.go
- esdtNFTAddQuantity.go
- esdtNFTBurn.go
- esdtNFTCreate.go
- esdtNFTCreateRoleTransfer.go
- esdtNFTTransfer.go
- esdtPause.go
- esdtRoles.go
- esdtTransfer.go
- factory.go
- keyValueStorage.go
- saveUserName.go