Uses of Class
convex.core.lang.Context
Packages that use Context
Package
Description
Fundamental Convex classes used for the decentralised network
Core CVM implementation
Internal CVM language implementation classes
CVM Operations, effectively the "machine code" of the CVM
Convex network transaction types.
-
Uses of Context in convex.core
Methods in convex.core that return ContextModifier and TypeMethodDescriptionState.applyTransaction
(ATransaction t) Applies a transaction to the State.Peer.executeDryRun
(ATransaction transaction) Executes a "dry run" transaction on the current consensus state of this Peer.Peer.executeQuery
(ACell form) Executes a query in this Peer's current Consensus State, using a default addressPeer.executeQuery
(ACell form, Address address) Compiles and executes a query on the current consensus state of this Peer.Methods in convex.core with parameters of type ContextModifier and TypeMethodDescriptionstatic Result
Result.fromContext
(CVMLong id, Context ctx) Constructs a Result from a Contextstatic Result
Result.fromContext
(Context ctx) Constructs a Result from a Context -
Uses of Context in convex.core.lang
Methods in convex.core.lang that return ContextModifier and TypeMethodDescriptionContext.acceptFunds
(long amount) Accepts offered funds for the given address.Executes a call to an Actor.Executes a call to an Actor.Appends a log entry for the current address.Compile a form in this Context.Context.compileAll
(ASequence<ACell> forms) Compiles a sequence of forms in the current context.Context.completeTransaction
(State initialState, long juicePrice) Performs key actions at the end of a transaction: Refunds juice Accumulates used juice fees in globals Increments sequence numberContext.consumeJuice
(long gulp) Consumes juice, returning an updated context if sufficient juice remains or an exceptional JUICE error.Context.createAccount
(AccountKey key) Create a new Account with a given AccountKey (may be null for actors etc.)static Context
Context.createFake
(State state) Creates an execution context with a default actor address.static Context
Context.createFake
(State state, Address origin) Creates a "fake" execution context for the given address.static Context
Context.createInitial
(State state, Address origin, long juiceLimit) Creates an initial execution context with the specified actor as origin, and reserving the appropriate amount of juice.Context.createPeer
(AccountKey accountKey, long initialStake) Creates a new peer with the specified stake.Defines a value in the environment of the current addressContext.defineWithSyntax
(Syntax syn, ACell value) Defines a value in the environment of the current address, updating the metadataContext.deployActor
(ACell... code) Deploys an Actor in this context.Executes a form in the current context.Evaluates a form as another Address.abstract Context
Executes this op with the given context.Executes an Op within this context, returning an updated context.Context.executeLocalBinding
(ACell bindingForm, AOp<?> op) Execute an op, and bind the result to the given binding form in the lexical environment Binding form may be a destructuring formExpands a form with the default *initial-expander*Context.expandCompile
(ACell form) Expand and compile a form in this Context.Context.fork()
Forks this context, creating a new copy of all local stateContext.forkWithAddress
(Address newAddress) Switches the context to a new address, creating a new execution context.protected Context
Context.handleQueryResult
(Context ctx) Just take result and juice from query.Context.handleStateResults
(Context returnContext, boolean rollback) Handle results at the end of an execution boundary (actor call, transaction etc.)abstract Context
Invokes a function within this context, returning an updated context.Invoke this function in the given context.Looks up a symbol's value in the current execution context, without any effect on the Context (no juice consumed etc.)Context.lookupDynamic
(Address address, Symbol symbol) Looks up a value in the dynamic environment.Context.lookupDynamic
(Symbol symbol) Looks up a value in the dynamic environment.Executes code as if run in the current account, but always discarding state changes.Executes code as if run in the specified account, but always discarding state changes.Executes a form at the top level in a new forked Context.Executes an Op at the top level in a new forked Context.Schedules an operation for the specified future timestamp.Context.setAccountKey
(AccountKey publicKey) Sets the public key for the current accountContext.setController
(Address address) Sets the controller for the current AccountContext.setDelegatedStake
(AccountKey peerKey, long newStake) Sets the delegated stake on a specified peer to the specified level.Context.setHolding
(Address targetAddress, ACell value) Sets the holding for a specified target account.Context.setMemory
(long allowance) Sets the memory allowance for the current account, buying / selling from the pool as necessary to ensure the correct final allowanceContext.setPeerData
(AccountKey peerKey, AHashMap<ACell, ACell> data) Sets peer data.Context.setPeerStake
(AccountKey peerKey, long newStake) Sets the stake for a given Peer, transferring coins from the current address.Transfers funds from the current address to the target.Context.transferMemoryAllowance
(Address target, CVMLong amountToSend) Transfers memory allowance from the current address to the target.Removes a definition mapping in the environment of the current addressContext.updateBindings
(ACell bindingForm, Object args) Updates local bindings with a given binding formprotected Context
Context.withAccountStatus
(Address target, AccountStatus accountStatus) Context.withArgumentError
(String message) Context.withArityError
(String message) Context.withAssertError
(String message) Context.withBoundsError
(long index) Context.withCastError
(int argIndex, ACell[] args, AType klass) Context.withCastError
(int argIndex, AType klass) Context.withCastError
(ACell a, AType klass) Context.withCastError
(ACell a, String message) Context.withCastError
(AType klass) Context.withCompileError
(String message) Context.withCompilerState
(Context.CompilerState comp) Context.withError
(ErrorValue error) Context.withException
(long gulp, AExceptional value) Context.withException
(AExceptional exception) Context.withFundsError
(String message) Context.withJuice
(long newJuice) Context.withJuiceError()
Returns this context with a JUICE error, consuming all juice.Context.withJuiceLimit
(long newJuiceLimit) Context.withLocalBindings
(AVector<ACell> newBindings) Updates this Context with new local bindings.Context.withResult
(long gulp, ACell value) Context.withResult
(ACell value) Returns a context updated with the specified result.Updates this context with a given value, which may either be a normal result or exceptional valueMethods in convex.core.lang with parameters of type ContextModifier and TypeMethodDescriptionabstract Context
Executes this op with the given context.protected Context
Context.handleQueryResult
(Context ctx) Just take result and juice from query.Context.handleStateResults
(Context returnContext, boolean rollback) Handle results at the end of an execution boundary (actor call, transaction etc.)abstract Context
Invoke this function in the given context.static long
Juice.limitString
(Context context) Gets the maximum number of string bytes that can be constructed -
Uses of Context in convex.core.lang.impl
Methods in convex.core.lang.impl that return ContextMethods in convex.core.lang.impl with parameters of type Context -
Uses of Context in convex.core.lang.ops
Methods in convex.core.lang.ops that return ContextMethods in convex.core.lang.ops with parameters of type Context -
Uses of Context in convex.core.transactions
Methods in convex.core.transactions that return ContextModifier and TypeMethodDescriptionabstract Context
Applies the functional effect of this transaction to the current state.Methods in convex.core.transactions with parameters of type Context