Versions in this module Expand all Collapse all v0 v0.0.2 Oct 5, 2022 v0.0.1 Oct 1, 2022 Changes in this version + const BurnRoleForAll + const MetadataFrozen + const MetadataLimitedTransfer + const MetadataPaused + var ErrAccountNotPayable = errors.New("sending value to non payable contract") + var ErrActionNotAllowed = errors.New("action is not allowed") + var ErrAddressIsNotAllowed = errors.New("address is not allowed to do the action") + var ErrAddressIsNotMECTSystemSC = errors.New("destination is not system sc address") + var ErrBuiltInFunctionCalledWithValue = errors.New("built in function called with tx value is not allowed") + var ErrCallerIsNotTheDNSAddress = errors.New("not a dns address") + var ErrCannotWipeAccountNotFrozen = errors.New("cannot wipe because the account is not frozen for this mect token") + var ErrContainerKeyAlreadyExists = errors.New("provided key already exists in container") + var ErrEmptyFunctionName = errors.New("empty function name") + var ErrInsufficientFunds = errors.New("insufficient funds") + var ErrInsufficientQuantityMECT = errors.New("insufficient quantity") + var ErrInvalidAddressLength = errors.New("invalid address length") + var ErrInvalidArguments = errors.New("invalid arguments to process built-in function") + var ErrInvalidContainerKey = errors.New("element does not exist in container") + var ErrInvalidLiquidityForMECT = errors.New("invalid liquidity for MECT") + var ErrInvalidMaxNumAddresses = errors.New("invalid max number of addresses") + var ErrInvalidMetadata = errors.New("invalid metadata") + var ErrInvalidNFTQuantity = errors.New("invalid NFT quantity") + var ErrInvalidNonce = errors.New("invalid nonce for mect") + var ErrInvalidNumOfArgs = errors.New("invalid number of arguments") + var ErrInvalidRcvAddr = errors.New("invalid receiver address") + var ErrInvalidTokenID = errors.New("invalid tokenID") + var ErrMECTIsFrozenForAccount = errors.New("account is frozen for this mect token") + var ErrMECTTokenIsPaused = errors.New("mect token is paused") + var ErrNFTDoesNotHaveMetadata = errors.New("NFT does not have metadata") + var ErrNFTTokenDoesNotExist = errors.New("NFT token does not exist") + var ErrNegativeValue = errors.New("negative value") + var ErrNewNFTDataOnSenderAddress = errors.New("new NFT data on sender") + var ErrNilAccountsAdapter = errors.New("nil AccountsAdapter") + var ErrNilContainerElement = errors.New("element cannot be nil") + var ErrNilDnsAddresses = errors.New("nil dns addresses map") + var ErrNilEpochHandler = errors.New("nil epoch handler") + var ErrNilGlobalSettingsHandler = errors.New("nil pause handler") + var ErrNilMECTData = errors.New("nil mect data") + var ErrNilMECTNFTStorageHandler = errors.New("nil mect nft storage handler") + var ErrNilMarshalizer = errors.New("nil Marshalizer") + var ErrNilPayableHandler = errors.New("nil payableHandler was provided") + var ErrNilRolesHandler = errors.New("nil roles handler") + var ErrNilSCDestAccount = errors.New("nil destination SC account") + var ErrNilShardCoordinator = errors.New("nil shard coordinator") + var ErrNilTransactionHandler = errors.New("nil transaction handler") + var ErrNilUserAccount = errors.New("nil user account") + var ErrNilValue = errors.New("nil value") + var ErrNilVmInput = errors.New("nil vm input") + var ErrNotEnoughGas = errors.New("not enough gas was sent in the transaction") + var ErrOnlyFungibleTokensHaveBalanceTransfer = errors.New("only fungible tokens have balance transfer") + var ErrOnlySystemAccountAccepted = errors.New("only system account is accepted") + var ErrOperationNotPermitted = errors.New("operation in account not permitted") + var ErrTokenHasValidMetadata = errors.New("token has valid metadata") + var ErrTooManyTransferAddresses = errors.New("too many transfer addresses") + var ErrUserNameChangeIsDisabled = errors.New("user name change is disabled") + var ErrWrongTypeAssertion = errors.New("wrong type assertion") + var ErrWrongTypeInContainer = errors.New("wrong type of object inside container") + func NewBuiltInFunctionContainer() *functionContainer + func NewBuiltInFunctionsCreator(args ArgsCreateBuiltInFunctionContainer) (*builtInFuncCreator, error) + func NewChangeOwnerAddressFunc(gasCost uint64) *changeOwnerAddress + func NewClaimDeveloperRewardsFunc(gasCost uint64) *claimDeveloperRewards + func NewMECTBurnFunc(funcGasCost uint64, marshaller vmcommon.Marshalizer, ...) (*mectBurn, error) + func NewMECTDataStorage(args ArgsNewMECTDataStorage) (*mectDataStorage, error) + func NewMECTDeleteMetadataFunc(args ArgsNewMECTDeleteMetadata) (*mectDeleteMetaData, error) + func NewMECTFreezeWipeFunc(marshaller vmcommon.Marshalizer, freeze bool, wipe bool) (*mectFreezeWipe, error) + func NewMECTGlobalSettingsFunc(accounts vmcommon.AccountsAdapter, marshaller marshal.Marshalizer, set bool, ...) (*mectGlobalSettings, error) + func NewMECTLocalBurnFunc(funcGasCost uint64, marshaller vmcommon.Marshalizer, ...) (*mectLocalBurn, error) + func NewMECTLocalMintFunc(funcGasCost uint64, marshaller vmcommon.Marshalizer, ...) (*mectLocalMint, error) + func NewMECTNFTAddQuantityFunc(funcGasCost uint64, mectStorageHandler vmcommon.MECTNFTStorageHandler, ...) (*mectNFTAddQuantity, error) + func NewMECTNFTAddUriFunc(funcGasCost uint64, gasConfig vmcommon.BaseOperationCost, ...) (*mectNFTAddUri, error) + func NewMECTNFTBurnFunc(funcGasCost uint64, mectStorageHandler vmcommon.MECTNFTStorageHandler, ...) (*mectNFTBurn, error) + func NewMECTNFTCreateFunc(funcGasCost uint64, gasConfig vmcommon.BaseOperationCost, ...) (*mectNFTCreate, error) + func NewMECTNFTCreateRoleTransfer(marshaller vmcommon.Marshalizer, accounts vmcommon.AccountsAdapter, ...) (*mectNFTCreateRoleTransfer, error) + func NewMECTNFTMultiTransferFunc(funcGasCost uint64, marshaller vmcommon.Marshalizer, ...) (*mectNFTMultiTransfer, error) + func NewMECTNFTTransferFunc(funcGasCost uint64, marshaller vmcommon.Marshalizer, ...) (*mectNFTTransfer, error) + func NewMECTNFTUpdateAttributesFunc(funcGasCost uint64, gasConfig vmcommon.BaseOperationCost, ...) (*mectNFTupdate, error) + func NewMECTRolesFunc(marshaller vmcommon.Marshalizer, set bool) (*mectRoles, error) + func NewMECTTransferFunc(funcGasCost uint64, marshaller vmcommon.Marshalizer, ...) (*mectTransfer, error) + func NewMECTTransferRoleAddressFunc(accounts vmcommon.AccountsAdapter, marshaller marshal.Marshalizer, ...) (*mectTransferAddress, error) + func NewPayableCheckFunc(payable vmcommon.PayableHandler, checkFunctionArgumentsEnableEpoch uint32, ...) (*payableCheck, error) + func NewSaveKeyValueStorageFunc(gasConfig vmcommon.BaseOperationCost, funcGasCost uint64) (*saveKeyValueStorage, error) + func NewSaveUserNameFunc(gasCost uint64, mapDnsAddresses map[string]struct{}, enableChange bool) (*saveUserName, error) + type ArgsCreateBuiltInFunctionContainer struct + Accounts vmcommon.AccountsAdapter + CheckCorrectTokenIDEnableEpoch uint32 + CheckFunctionArgumentEnableEpoch uint32 + ConfigAddress []byte + EnableUserNameChange bool + EpochNotifier vmcommon.EpochNotifier + FixAsyncCallbackCheckEnableEpoch uint32 + GasMap map[string]map[string]uint64 + GlobalMintBurnDisableEpoch uint32 + MECTNFTImprovementV1ActivationEpoch uint32 + MECTTransferRoleEnableEpoch uint32 + MECTTransferToMetaEnableEpoch uint32 + MapDNSAddresses map[string]struct{} + Marshalizer vmcommon.Marshalizer + MaxNumOfAddressesForTransferRole uint32 + NFTCreateMultiShardEnableEpoch uint32 + SaveNFTToSystemAccountEnableEpoch uint32 + SendMECTMetadataAlwaysEnableEpoch uint32 + ShardCoordinator vmcommon.Coordinator + type ArgsNewMECTDataStorage struct + Accounts vmcommon.AccountsAdapter + EpochNotifier vmcommon.EpochNotifier + GlobalSettingsHandler vmcommon.MECTGlobalSettingsHandler + Marshalizer vmcommon.Marshalizer + SaveToSystemEnableEpoch uint32 + SendAlwaysEnableEpoch uint32 + ShardCoordinator vmcommon.Coordinator + type ArgsNewMECTDeleteMetadata struct + Accounts vmcommon.AccountsAdapter + ActivationEpoch uint32 + AllowedAddress []byte + Delete bool + EpochNotifier vmcommon.EpochNotifier + FuncGasCost uint64 + Marshalizer vmcommon.Marshalizer + type MECTGlobalMetadata struct + BurnRoleForAll bool + LimitedTransfer bool + Paused bool + func MECTGlobalMetadataFromBytes(bytes []byte) MECTGlobalMetadata + func (metadata *MECTGlobalMetadata) ToBytes() []byte + type MECTUserMetadata struct + Frozen bool + func MECTUserMetadataFromBytes(bytes []byte) MECTUserMetadata + func (metadata *MECTUserMetadata) ToBytes() []byte