Documentation ¶
Index ¶
- Constants
- Variables
- type ArgumentsParser
- type BaseOperationCost
- type BlockchainHook
- type BuiltInCost
- type ContextHandler
- type EconomicsHandler
- type EpochNotifier
- type GasCost
- type MessageSignVerifier
- type MetaChainSystemSCsCost
- type NodesConfigProvider
- type NodesCoordinator
- type SystemEI
- type SystemSCContainer
- type SystemSCContainerFactory
- type SystemSmartContract
Constants ¶
const ( // InsufficientGasLimit defined constant for return message InsufficientGasLimit = "insufficient gas limit" // StakeNotEnabled defined constant for return message StakeNotEnabled = "stake is not enabled" // UnBondNotEnabled defined constant for return message UnBondNotEnabled = "unBond is not enabled" // UnStakeNotEnabled defined constant for return message UnStakeNotEnabled = "unStake is not enabled" // TransactionValueMustBeZero defined constant for return message TransactionValueMustBeZero = "transaction value must be zero" // CannotGetOrCreateRegistrationData defined constant for return message CannotGetOrCreateRegistrationData = "cannot get or create registration data: error - " // CannotGetAllBlsKeysFromRegistrationData defined constant for return message CannotGetAllBlsKeysFromRegistrationData = "could not get all blsKeys from registration data: error - " )
Variables ¶
var DelegationManagerSCAddress = []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 255, 255}
DelegationManagerSCAddress is the hard-coded address for the delegation manager smart contract
var ESDTSCAddress = []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 255, 255}
ESDTSCAddress is the hard-coded address for esdt issuing smart contract
var EndOfEpochAddress = []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}
EndOfEpochAddress is the hard-coded address which can call system smart contract functions at end of epoch
var ErrBLSPublicKeyAlreadyJailed = errors.New("bls public key already jailed")
ErrBLSPublicKeyAlreadyJailed signals that bls public key was already jailed
var ErrBLSPublicKeyMismatch = errors.New("public key mismatch")
ErrBLSPublicKeyMismatch signals that public keys do not match
var ErrBLSPublicKeyMissmatch = errors.New("public key missmatch")
ErrBLSPublicKeyMissmatch signals that public keys do not match
var ErrCallValueMustBeZero = errors.New("call value must be zero")
ErrCallValueMustBeZero signals that call value must be zero
var ErrCouldNotCreateNewTokenIdentifier = errors.New("token identifier could not be created")
ErrCouldNotCreateNewTokenIdentifier signals that token identifier could not be created
var ErrDataNotFoundUnderKey = errors.New("data was not found under requested key")
ErrDataNotFoundUnderKey signals that data was not found under requested key
var ErrDoubleVote = errors.New("double vote is not allowed")
ErrDoubleVote signals that user is voting for the second time for the same proposal
var ErrDuplicatesFoundInArguments = errors.New("duplicates found in arguments")
ErrDuplicatesFoundInArguments signals that duplicates were found in arguments
var ErrElementNotFound = errors.New("element was not found")
ErrElementNotFound signals that element was not found
var ErrEmptyStorage = errors.New("storage is nil for given key")
ErrEmptyStorage signals that the storage is empty for given key
var ErrIncorrectConfig = errors.New("config incorrect")
ErrIncorrectConfig signals that the config is incorrect
var ErrInputArgsIsNil = errors.New("input system smart contract arguments are nil")
ErrInputArgsIsNil signals that input arguments are nil for system smart contract
var ErrInputAsyncParamsMissing = errors.New("input does not contain async params")
ErrInputAsyncParamsMissing signals that input does not contain async params
var ErrInputCallValueIsNil = errors.New("input value for system smart contract is nil")
ErrInputCallValueIsNil signals that input call value is nil for system smart contract
var ErrInputCallerAddrIsNil = errors.New("input called address for system smart contract is nil")
ErrInputCallerAddrIsNil signals that input caller address is nil for system smart contract
var ErrInputFunctionIsNil = errors.New("input function for system smart contract is nil")
ErrInputFunctionIsNil signals that input function is nil for system smart contract
var ErrInputRecipientAddrIsNil = errors.New("input recipient address for system smart contract is nil")
ErrInputRecipientAddrIsNil signals that input recipient address for system smart contract is nil
var ErrInternalErrorWhileSettingNewOwner = errors.New("internal error when setting new contract owner")
ErrInternalErrorWhileSettingNewOwner signals that an error occurred when setting the new contract owner
var ErrInvalidAddress = errors.New("invalid address")
ErrInvalidAddress signals that invalid address has been provided
var ErrInvalidArgument = errors.New("invalid argument")
ErrInvalidArgument signals that invalid argument has been provided
var ErrInvalidBLSKeys = errors.New("invalid bls keys")
ErrInvalidBLSKeys signals that invalid bls keys has been provided
var ErrInvalidBaseIssuingCost = errors.New("invalid base issuing cost")
ErrInvalidBaseIssuingCost signals that invalid base issuing cost has been provided
var ErrInvalidCaller = errors.New("the function was called by a not authorized user")
ErrInvalidCaller signals that the functions was called by a not authorized user
var ErrInvalidDelegationSCConfig = errors.New("invalid delegation sc config")
ErrInvalidDelegationSCConfig signals that invalid delegation sc config has been provided
var ErrInvalidDelegationTicker = errors.New("invalid delegation ticker name")
ErrInvalidDelegationTicker signals that invalid delegation ticker name was provided
var ErrInvalidEndOfEpochAccessAddress = errors.New("invalid end of epoch access address")
ErrInvalidEndOfEpochAccessAddress signals that end of epoch access address is invalid
var ErrInvalidGenesisTotalSupply = errors.New("invalid genesis total supply cost")
ErrInvalidGenesisTotalSupply signals that provided genesis total supply is invalid
var ErrInvalidJailAccessAddress = errors.New("invalid jailing access address")
ErrInvalidJailAccessAddress signals that invalid jailing access address was provided
var ErrInvalidMaxNumberOfNodes = errors.New("invalid number of max number of nodes")
ErrInvalidMaxNumberOfNodes signals that invalid number of max number of nodes has been provided
var ErrInvalidMinCreationDeposit = errors.New("invalid min creation deposit")
ErrInvalidMinCreationDeposit signals that invalid min creation deposit has been provided
var ErrInvalidMinStakeValue = errors.New("invalid min stake value")
ErrInvalidMinStakeValue signals that an invalid min stake value was provided
var ErrInvalidMinStepValue = errors.New("invalid min step value")
ErrInvalidMinStepValue signals that an invalid min step value was provided
var ErrInvalidMinUnstakeTokensValue = errors.New("invalid min unstake tokens value")
ErrInvalidMinUnstakeTokensValue signals that an invalid min unstake tokens value was provided
var ErrInvalidNodeLimitPercentage = errors.New("invalid node limit percentage")
ErrInvalidNodeLimitPercentage signals the invalid node limit percentage was provided
var ErrInvalidNodePrice = errors.New("invalid node price")
ErrInvalidNodePrice signals that an invalid node price was provided
var ErrInvalidNumOfArguments = errors.New("invalid number of arguments")
ErrInvalidNumOfArguments signals that invalid number of arguments has been provided
var ErrInvalidNumberOfDecimals = errors.New("invalid number of decimals")
ErrInvalidNumberOfDecimals signals that an invalid number of decimals has been provided
var ErrInvalidReturnData = errors.New("invalid return data")
ErrInvalidReturnData signals that invalid return data was provided
var ErrInvalidStakeLimitPercentage = errors.New("invalid stake limit percentage")
ErrInvalidStakeLimitPercentage signals the invalid stake limit percentage was provided
var ErrInvalidStakingAccessAddress = errors.New("invalid staking access address")
ErrInvalidStakingAccessAddress signals that invalid staking access address was provided
var ErrInvalidStartEndVoteEpoch = errors.New("invalid start/end vote epoch")
ErrInvalidStartEndVoteEpoch signals that invalid arguments where passed for start or end vote epoch
var ErrInvalidUnJailCost = errors.New("invalid unjail cost")
ErrInvalidUnJailCost signals that provided unjail cost is invalid
var ErrInvalidWaitingList = errors.New("invalid waiting list")
ErrInvalidWaitingList signals that waiting list is invalid
var ErrKeyAlreadyRegistered = errors.New("bls key already registered")
ErrKeyAlreadyRegistered signals that bls key is already registered
var ErrNFTCreateRoleAlreadyExists = errors.New("NFT create role already exists")
ErrNFTCreateRoleAlreadyExists signals that NFT create role already exists
var ErrNegativeBleedPercentagePerRound = errors.New("negative bleed percentage per round")
ErrNegativeBleedPercentagePerRound signals that negative bleed percentage per round has been provided
var ErrNegativeInitialStakeValue = errors.New("initial stake value is negative")
ErrNegativeInitialStakeValue signals that a negative initial stake value was provided
var ErrNegativeMaximumPercentageToBleed = errors.New("negative maximum percentage to bleed")
ErrNegativeMaximumPercentageToBleed signals that negative maximum percentage to bleed has been provided
var ErrNegativeOrZeroInitialSupply = errors.New("negative initial supply was provided")
ErrNegativeOrZeroInitialSupply signals that negative initial supply has been provided
var ErrNilAddressPubKeyConverter = errors.New("nil address public key converter")
ErrNilAddressPubKeyConverter signals that the provided public key converter is nil
var ErrNilArgumentsParser = errors.New("nil arguments parser")
ErrNilArgumentsParser signals that arguments parses is nil
var ErrNilBlockchainHook = errors.New("blockchain hook is nil")
ErrNilBlockchainHook signals that blockchain hook is nil
var ErrNilChanceComputer = errors.New("nil chance computer")
ErrNilChanceComputer signals that nil chance computer has been provided
var ErrNilCryptoHook = errors.New("crypto hook is nil")
ErrNilCryptoHook signals that crypto hook is nil
var ErrNilEconomicsData = errors.New("nil economics data")
ErrNilEconomicsData signals that nil economics data has been provided
var ErrNilEnableEpochsHandler = errors.New("nil enable epochs handler")
ErrNilEnableEpochsHandler signals that a nil enable epochs handler has been provided
var ErrNilEndOfEpochSmartContractAddress = errors.New("nil end of epoch smart contract address")
ErrNilEndOfEpochSmartContractAddress signals that the end of epoch smart contract address is nil
var ErrNilGasSchedule = errors.New("nil gas schedule")
ErrNilGasSchedule signals that nil gas schedule has been provided
var ErrNilHasher = errors.New("nil Hasher")
ErrNilHasher signals that an operation has been attempted to or with a nil hasher implementation
var ErrNilKeyGenerator = errors.New("nil key generator")
ErrNilKeyGenerator signals that key generator is nil
var ErrNilMarshalizer = errors.New("nil Marshalizer")
ErrNilMarshalizer signals that an operation has been attempted to or with a nil Marshalizer implementation
var ErrNilMessageSignVerifier = errors.New("nil message sign verifier")
ErrNilMessageSignVerifier signals that message sign verifier is nil
var ErrNilNodesConfigProvider = errors.New("nil nodes config provider")
ErrNilNodesConfigProvider signals that an operation has been attempted to or with a nil nodes config provider
var ErrNilNodesCoordinator = errors.New("nil nodes coordinator")
ErrNilNodesCoordinator signals that nil nodes coordinator was provided
var ErrNilOrEmptyKey = errors.New("nil or empty key")
ErrNilOrEmptyKey signals that key is nil or empty
var ErrNilPublicKey = errors.New("nil public key")
ErrNilPublicKey signals that nil public key has been provided
var ErrNilShardCoordinator = errors.New("nil shard coordinator")
ErrNilShardCoordinator signals that a nil shard coordinator was provided
var ErrNilSingleSigner = errors.New("nil single signer")
ErrNilSingleSigner signals that the single signer is nil
var ErrNilStakingSmartContractAddress = errors.New("nil staking smart contract address")
ErrNilStakingSmartContractAddress signals that staking smart contract address is nil
var ErrNilSystemContractsContainer = errors.New("system contract container is nil")
ErrNilSystemContractsContainer signals that the provided system contract container is nil
var ErrNilSystemEnvironmentInterface = errors.New("system environment interface is nil")
ErrNilSystemEnvironmentInterface signals that a nil system environment interface was provided
var ErrNilSystemSCConfig = errors.New("nil system sc config")
ErrNilSystemSCConfig signals that nil system sc config was provided
var ErrNilUserAccountsDB = errors.New("nil user accounts DB")
ErrNilUserAccountsDB signals that nil user accounts DB was provided
var ErrNilVMType = errors.New("vm type is nil")
ErrNilVMType signals that the provided vm type is nil
var ErrNilValidatorAccountsDB = errors.New("nil validator accounts DB")
ErrNilValidatorAccountsDB signals that nil validator accounts DB was provided
var ErrNilValidatorSmartContractAddress = errors.New("nil validator smart contract address")
ErrNilValidatorSmartContractAddress signals that validator smart contract address is nil
var ErrNoTickerWithGivenName = errors.New("no ticker with given name")
ErrNoTickerWithGivenName signals that ticker does not exist with given name
var ErrNotEnoughArgumentsToStake = errors.New("not enough arguments to stake")
ErrNotEnoughArgumentsToStake signals that the arguments provided are not enough
var ErrNotEnoughGas = errors.New("not enough gas")
ErrNotEnoughGas signals that there is not enough gas for execution
var ErrNotEnoughInitialOwnerFunds = errors.New("not enough initial owner funds")
ErrNotEnoughInitialOwnerFunds signals that not enough initial owner funds has been provided
var ErrNotEnoughRemainingFunds = errors.New("not enough remaining funds - do not leave dust behind")
ErrNotEnoughRemainingFunds signals that operation is invalid as remaining funds are below minimum
var ErrNotEnoughStakeToVote = errors.New("not enough stake/delegate to vote")
ErrNotEnoughStakeToVote signals that the stake/delegation is not enough to vote
var ErrNotEnoughVotingPower = errors.New("not enough voting power to cast this vote")
ErrNotEnoughVotingPower signals that there is not enough voting power to cast the vote
var ErrOwnerCannotUnDelegate = errors.New("owner cannot undelegate, contract still active")
ErrOwnerCannotUnDelegate signals that owner cannot undelegate as contract is still active
var ErrProposalNotFound = errors.New("proposal was not found in storage")
ErrProposalNotFound signals that the storage is empty for given key
var ErrRedelegateValueBelowMinimum = errors.New("can not re-delegate as the remaining value will be below the minimum required")
ErrRedelegateValueBelowMinimum signals that the re-delegate added to the remaining value will be below the minimum required
var ErrTickerNameNotValid = errors.New("ticker name is not valid")
ErrTickerNameNotValid signals that ticker name is not valid
var ErrTokenNameNotHumanReadable = errors.New("token name is not human readable")
ErrTokenNameNotHumanReadable signals that token name is not human-readable
var ErrUnknownSystemSmartContract = errors.New("missing system smart contract on selected address")
ErrUnknownSystemSmartContract signals that there is no system smart contract on the provided address
var ErrVotedForAnExpiredProposal = errors.New("voting period is over for this proposal")
ErrVotedForAnExpiredProposal signals that voting was done for an expired proposal
var ErrVotingNotStartedForProposal = errors.New("voting has not yet started for this proposal")
ErrVotingNotStartedForProposal signals that voting was done for a proposal that not begins yet
var ErrWaitingListDisabled = errors.New("waiting list is disabled since staking v4 activation")
ErrWaitingListDisabled signals that waiting list has been disabled, since staking v4 is active
var ErrWrongNewOwnerAddress = errors.New("wrong new owner address")
ErrWrongNewOwnerAddress signals that a wrong new owner address was provided
var ErrWrongRewardAddress = errors.New("wrong reward address")
ErrWrongRewardAddress signals that a wrong reward address was provided
var ErrWrongTypeAssertion = errors.New("wrong type assertion")
ErrWrongTypeAssertion signals that a wrong type assertion occurred.
var FirstDelegationSCAddress = []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 255, 255, 255}
FirstDelegationSCAddress is the hard-coded address for the first delegation contract, the other will follow
var GovernanceSCAddress = []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 255, 255}
GovernanceSCAddress is the hard-coded address for governance smart contract
var JailingAddress = []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}
JailingAddress is the hard-coded address which can call jail function
var StakingSCAddress = []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255}
StakingSCAddress is the hard-coded address for smart contracts
var ValidatorSCAddress = []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 255, 255}
ValidatorSCAddress is the hard-coded address for validator smart contract
Functions ¶
This section is empty.
Types ¶
type ArgumentsParser ¶
type ArgumentsParser interface { ParseData(data string) (string, [][]byte, error) IsInterfaceNil() bool }
ArgumentsParser defines the functionality to parse transaction data into arguments and code for smart contracts
type BaseOperationCost ¶
type BaseOperationCost struct { StorePerByte uint64 ReleasePerByte uint64 DataCopyPerByte uint64 PersistPerByte uint64 CompilePerByte uint64 AoTPreparePerByte uint64 GetCode uint64 }
BaseOperationCost defines cost for base operation cost
type BlockchainHook ¶
type BlockchainHook interface { GetStorageData(accountAddress []byte, index []byte) ([]byte, uint32, error) CurrentNonce() uint64 CurrentRound() uint64 CurrentEpoch() uint32 GetUserAccount(address []byte) (vmcommon.UserAccountHandler, error) GetCode(account vmcommon.UserAccountHandler) []byte GetShardOfAddress(address []byte) uint32 IsSmartContract(address []byte) bool IsPayable(sndAddress []byte, recvAddress []byte) (bool, error) NumberOfShards() uint32 CurrentRandomSeed() []byte Close() error GetSnapshot() int RevertToSnapshot(snapshot int) error IsBuiltinFunctionName(functionName string) bool ProcessBuiltInFunction(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error) }
BlockchainHook is the interface for VM blockchain callbacks
type BuiltInCost ¶
type BuiltInCost struct { ChangeOwnerAddress uint64 ClaimDeveloperRewards uint64 SaveUserName uint64 SaveKeyValue uint64 ESDTTransfer uint64 ESDTBurn uint64 ESDTLocalMint uint64 ESDTLocalBurn uint64 ESDTNFTCreate uint64 ESDTNFTAddQuantity uint64 ESDTNFTBurn uint64 ESDTNFTTransfer uint64 ESDTNFTChangeCreateOwner uint64 ESDTNFTAddUri uint64 ESDTNFTUpdateAttributes uint64 ESDTNFTMultiTransfer uint64 TrieLoadPerNode uint64 TrieStorePerNode uint64 }
BuiltInCost defines cost for built-in methods
type ContextHandler ¶
type ContextHandler interface { SystemEI GetContract(address []byte) (SystemSmartContract, error) SetSystemSCContainer(scContainer SystemSCContainer) error CreateVMOutput() *vmcommon.VMOutput CleanCache() SetSCAddress(addr []byte) AddCode(addr []byte, code []byte) AddTxValueToSmartContract(value *big.Int, scAddress []byte) SetGasProvided(gasProvided uint64) GetReturnMessage() string }
ContextHandler defines the methods needed to execute system smart contracts
type EconomicsHandler ¶
EconomicsHandler defines the methods to get data from the economics component
type EpochNotifier ¶
type EpochNotifier interface { RegisterNotifyHandler(handler vmcommon.EpochSubscriberHandler) CurrentEpoch() uint32 CheckEpoch(header data.HeaderHandler) IsInterfaceNil() bool }
EpochNotifier can notify upon an epoch change and provide the current epoch
type GasCost ¶
type GasCost struct { BaseOperationCost BaseOperationCost MetaChainSystemSCsCost MetaChainSystemSCsCost BuiltInCost BuiltInCost }
GasCost holds all the needed gas costs for system smart contracts
type MessageSignVerifier ¶
type MessageSignVerifier interface { Verify(message []byte, signedMessage []byte, pubKey []byte) error IsInterfaceNil() bool }
MessageSignVerifier is used to verify if message was signed with given public key
type MetaChainSystemSCsCost ¶
type MetaChainSystemSCsCost struct { Stake uint64 UnStake uint64 UnBond uint64 Claim uint64 Get uint64 ChangeRewardAddress uint64 ChangeValidatorKeys uint64 UnJail uint64 ESDTIssue uint64 ESDTOperations uint64 Proposal uint64 Vote uint64 DelegateVote uint64 RevokeVote uint64 CloseProposal uint64 DelegationOps uint64 UnStakeTokens uint64 UnBondTokens uint64 DelegationMgrOps uint64 ValidatorToDelegation uint64 GetAllNodeStates uint64 GetActiveFund uint64 FixWaitingListSize uint64 }
MetaChainSystemSCsCost defines the cost of system staking SCs methods
type NodesConfigProvider ¶
type NodesConfigProvider interface { MinNumberOfNodes() uint32 MinNumberOfNodesWithHysteresis() uint32 IsInterfaceNil() bool }
NodesConfigProvider defines the functionality which is needed for nodes config in system smart contracts
type NodesCoordinator ¶ added in v1.7.0
NodesCoordinator defines the methods needed about nodes in system SCs from nodes coordinator
type SystemEI ¶
type SystemEI interface { ExecuteOnDestContext(destination []byte, sender []byte, value *big.Int, input []byte) (*vmcommon.VMOutput, error) DeploySystemSC(baseContract []byte, newAddress []byte, ownerAddress []byte, initFunction string, value *big.Int, input [][]byte) (vmcommon.ReturnCode, error) Transfer(destination []byte, sender []byte, value *big.Int, input []byte, gasLimit uint64) SendGlobalSettingToAll(sender []byte, input []byte) GetBalance(addr []byte) *big.Int SetStorage(key []byte, value []byte) SetStorageForAddress(address []byte, key []byte, value []byte) AddReturnMessage(msg string) AddLogEntry(entry *vmcommon.LogEntry) GetStorage(key []byte) []byte GetStorageFromAddress(address []byte, key []byte) []byte Finish(value []byte) UseGas(gasToConsume uint64) error GasLeft() uint64 BlockChainHook() BlockchainHook CryptoHook() vmcommon.CryptoHook IsValidator(blsKey []byte) bool StatusFromValidatorStatistics(blsKey []byte) string CanUnJail(blsKey []byte) bool IsBadRating(blsKey []byte) bool CleanStorageUpdates() GetTotalSentToUser(dest []byte) *big.Int GetLogs() []*vmcommon.LogEntry SetOwnerOperatingOnAccount(newOwner []byte) error UpdateCodeDeployerAddress(scAddress string, newOwner []byte) error ProcessBuiltInFunction(sender, destination []byte, function string, arguments [][]byte) (*vmcommon.VMOutput, error) IsInterfaceNil() bool }
SystemEI defines the environment interface system smart contract can use
type SystemSCContainer ¶
type SystemSCContainer interface { Get(key []byte) (SystemSmartContract, error) Add(key []byte, val SystemSmartContract) error Replace(key []byte, val SystemSmartContract) error Remove(key []byte) Len() int Keys() [][]byte IsInterfaceNil() bool }
SystemSCContainer defines a system smart contract holder data type with basic functionality
type SystemSCContainerFactory ¶
type SystemSCContainerFactory interface { CreateForGenesis() (SystemSCContainer, error) Create() (SystemSCContainer, error) IsInterfaceNil() bool }
SystemSCContainerFactory defines the functionality to create a system smart contract container
type SystemSmartContract ¶
type SystemSmartContract interface { Execute(args *vmcommon.ContractCallInput) vmcommon.ReturnCode CanUseContract() bool SetNewGasCost(gasCost GasCost) IsInterfaceNil() bool }
SystemSmartContract interface defines the function a system smart contract should have