Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrOverflow = coreerrors.Register("overflow").Create() ErrNotEnoughBaseTokensBalance = coreerrors.Register("not enough base tokens balance").Create() ErrNotEnoughNativeAssetBalance = coreerrors.Register("not enough native tokens balance").Create() ErrNotEnoughFundsForAllowance = coreerrors.Register("not enough funds for allowance").Create() ErrCreateFoundryMaxSupplyMustBePositive = coreerrors.Register("max supply must be positive").Create() ErrCreateFoundryMaxSupplyTooBig = coreerrors.Register("max supply is too big").Create() ErrFoundryDoesNotExist = coreerrors.Register("foundry does not exist").Create() ErrCantModifySupplyOfTheToken = coreerrors.Register("supply of the token is not controlled by the chain").Create() ErrNativeTokenSupplyOutOffBounds = coreerrors.Register("token supply is out of bounds").Create() ErrFatalTxBuilderNotBalanced = coreerrors.Register("fatal: tx builder is not balanced").Create() ErrInconsistentL2LedgerWithL1TxBuilder = coreerrors.Register("fatal: L2 ledger is not consistent with the L1 tx builder").Create() ErrCantDestroyFoundryBeingCreated = coreerrors.Register("can't destroy foundry which is being created").Create() ErrContractNotFound = coreerrors.Register("contract with hname %08x not found") ErrTargetEntryPointNotFound = coreerrors.Register("entry point not found").Create() ErrEntryPointCantBeAView = coreerrors.Register("'init' entry point can't be a view").Create() ErrRepeatingInitCall = coreerrors.Register("repeating init call").Create() ErrTooManyEvents = coreerrors.Register("too many events issued for contract").Create() ErrPrivilegedCallFailed = coreerrors.Register("privileged call failed").Create() ErrExceededPostedOutputLimit = coreerrors.Register("exceeded maximum number of %d posted outputs in one request").Create(42) ErrGasBudgetExceeded = coreerrors.Register("gas budget exceeded").Create() ErrSenderUnknown = coreerrors.Register("sender unknown").Create() ErrNotEnoughTokensLeftForGas = coreerrors.Register("not enough funds left to pay for gas") ErrIllegalCall = coreerrors.Register("illegal call - entrypoint cannot be called from contracts") ErrSendMultipleNFTs = coreerrors.Register("cannot send more than 1 NFT").Create() )
Functions ¶
This section is empty.
Types ¶
type RequestResult ¶ added in v0.3.0
type VMRunner ¶ added in v0.2.0
type VMRunner interface {
Run(task *VMTask) (*VMTaskResult, error)
}
type VMTask ¶
type VMTask struct { Processors *processors.Cache AnchorOutput *iotago.AliasOutput AnchorOutputID iotago.OutputID Store state.Store Requests []isc.Request UnprocessableToRetry []isc.Request TimeAssumption time.Time Entropy hashing.HashValue ValidatorFeeTarget isc.AgentID // If EstimateGasMode is enabled, gas fee will be calculated but not charged EstimateGasMode bool // If EVMTracer is set, all requests will be executed normally up until the EVM // tx with the given index, which will then be executed with the given tracer. EVMTracer *isc.EVMTracer EnableGasBurnLogging bool // for testing and Solo only // If maintenance mode is enabled, only requests to the governance contract will be executed MaintenanceModeEnabled bool Log *logger.Logger }
VMTask is task context (for batch of requests). It is used to pass parameters and take results It is assumed that all requests/inputs are unlock-able by aliasAddress of provided AnchorOutput at timestamp = Timestamp + len(Requests) nanoseconds
func (*VMTask) CreateResult ¶
func (task *VMTask) CreateResult() *VMTaskResult
func (*VMTask) FinalStateTimestamp ¶ added in v1.0.3
func (*VMTask) WillProduceBlock ¶ added in v1.0.3
type VMTaskResult ¶ added in v1.0.3
type VMTaskResult struct { Task *VMTask AnchorOutputStorageDeposit uint64 // the uncommitted state resulting from the execution of the requests StateDraft state.StateDraft // RotationAddress is the next address after a rotation, or nil if there is no rotation RotationAddress iotago.Address // TransactionEssence is the transaction essence for the next block, // or nil if the task does not produce a normal block TransactionEssence *iotago.TransactionEssence // InputsCommitment is the inputs commitment necessary to sign the ResultTransactionEssence InputsCommitment []byte // RequestResults contains one result for each non-skipped request RequestResults []*RequestResult }
Directories ¶
Path | Synopsis |
---|---|
core
|
|
blocklog
in the blocklog core contract the VM keeps indices of blocks and requests in an optimized way for fast checking and timestamp access.
|
in the blocklog core contract the VM keeps indices of blocks and requests in an optimized way for fast checking and timestamp access. |
evm/evmnames
package evmnames provides the names of EVM core contract functions and fields.
|
package evmnames provides the names of EVM core contract functions and fields. |
governance
in the blocklog core contract the VM keeps indices of blocks and requests in an optimized way for fast checking and timestamp access.
|
in the blocklog core contract the VM keeps indices of blocks and requests in an optimized way for fast checking and timestamp access. |
governance/governanceimpl
This file provides implementation for the governance SC, the ChainNode management functions.
|
This file provides implementation for the governance SC, the ChainNode management functions. |
testcore/sbtests/sbtestsc
smart contract for testing
|
smart contract for testing |
vmtxbuilder
Package vmtxbuilder implements AnchorTransactionBuilder, a transaction builder used by the VM to construct anchor transaction.
|
Package vmtxbuilder implements AnchorTransactionBuilder, a transaction builder used by the VM to construct anchor transaction. |
Click to show internal directories.
Click to hide internal directories.