Documentation ¶
Index ¶
- Constants
- Variables
- func AccountKey(account []byte) []byte
- func AspectArrayKey(keys ...[]byte) []byte
- func AspectBlockKey() []byte
- func AspectIdKey(aspectId []byte) []byte
- func AspectPropertyKey(aspectId []byte, propertyKey []byte) []byte
- func AspectVersionKey(aspectId []byte, version []byte) []byte
- func ByMapKeyPriority(a, b interface{}) int
- func GetAspectStatePoint(point string) string
- func NewBindingAspectPriorityComparator(x []*artela.AspectCode) func(i, j int) bool
- func NewBindingPriorityComparator(x []*AspectMeta) func(i, j int) bool
- func ParseInput(tx []byte) (*abi.Method, map[string]interface{}, error)
- func ParseMethod(callData []byte) (*abi.Method, map[string]interface{}, error)
- type AspectContext
- type AspectInfo
- type AspectMeta
- type AspectRuntimeContext
- func (c *AspectRuntimeContext) AspectContext() *AspectContext
- func (c *AspectRuntimeContext) AspectState() *AspectState
- func (c *AspectRuntimeContext) ClearBlockContext()
- func (c *AspectRuntimeContext) CosmosContext() cosmos.Context
- func (c *AspectRuntimeContext) CreateStateObject()
- func (c *AspectRuntimeContext) Deadline() (deadline time.Time, ok bool)
- func (c *AspectRuntimeContext) Debug(msg string, keyvals ...interface{})
- func (c *AspectRuntimeContext) Destroy()
- func (c *AspectRuntimeContext) Done() <-chan struct{}
- func (c *AspectRuntimeContext) Err() error
- func (c *AspectRuntimeContext) EthBlockContext() *EthBlockContext
- func (c *AspectRuntimeContext) EthTxContext() *EthTxContext
- func (c *AspectRuntimeContext) GetAspectState(ctx *artelatypes.RunnerContext, key string) []byte
- func (c *AspectRuntimeContext) Init(storeKey storetypes.StoreKey)
- func (c *AspectRuntimeContext) JITManager() *inherent.Manager
- func (c *AspectRuntimeContext) Logger() log.Logger
- func (c *AspectRuntimeContext) SetAspectState(ctx *artelatypes.RunnerContext, key string, value []byte)
- func (c *AspectRuntimeContext) SetEthBlockContext(newBlockCtx *EthBlockContext)
- func (c *AspectRuntimeContext) SetEthTxContext(newTxCtx *EthTxContext, jitManager *inherent.Manager)
- func (c *AspectRuntimeContext) StateDb() vm.StateDB
- func (c *AspectRuntimeContext) StoreKey() storetypes.StoreKey
- func (c *AspectRuntimeContext) Value(key interface{}) interface{}
- func (c *AspectRuntimeContext) WithCosmosContext(newTxCtx cosmos.Context)
- type AspectState
- type BoundAspectCode
- type ContextBuilder
- type EthBlockContext
- type EthTxContext
- func (c *EthTxContext) ClearEvmObject() *EthTxContext
- func (c *EthTxContext) Commit() bool
- func (c *EthTxContext) EvmCfg() *statedb.EVMConfig
- func (c *EthTxContext) LastEvm() *vm.EVM
- func (c *EthTxContext) Message() *core.Message
- func (c *EthTxContext) Receipt() *ethtypes.Receipt
- func (c *EthTxContext) TxContent() *ethtypes.Transaction
- func (c *EthTxContext) TxFrom() common.Address
- func (c *EthTxContext) TxIndex() uint64
- func (c *EthTxContext) TxTo() string
- func (c *EthTxContext) VmStateDB() vm.StateDB
- func (c *EthTxContext) VmTracer() *vm.Tracer
- func (c *EthTxContext) WithCommit(commit bool) *EthTxContext
- func (c *EthTxContext) WithEVM(from common.Address, msg *core.Message, lastEvm *vm.EVM, monitor *vm.Tracer, ...) *EthTxContext
- func (c *EthTxContext) WithEVMConfig(cfg *statedb.EVMConfig) *EthTxContext
- func (c *EthTxContext) WithReceipt(receipt *ethtypes.Receipt) *EthTxContext
- func (c *EthTxContext) WithStateDB(stateDb vm.StateDB) *EthTxContext
- func (c *EthTxContext) WithTxIndex(index uint64) *EthTxContext
- type GetLastBlockHeight
- type HistoryStoreBuilder
- type Property
Constants ¶
View Source
const ( // AspectCodeKeyPrefix is the prefix to retrieve all AspectCodeStore AspectCodeKeyPrefix = "AspectStore/Code/" AspectCodeVersionKeyPrefix = "AspectStore/Version/" AspectPropertyKeyPrefix = "AspectStore/Property/" ContractBindKeyPrefix = "AspectStore/ContractBind/" VerifierBindingKeyPrefix = "AspectStore/VerifierBind/" AspectRefKeyPrefix = "AspectStore/AspectRef/" AspectBlockKeyPrefix = "AspectStore/Block/" AspectStateKeyPrefix = "AspectStore/State/" AspectJoinPointRunKeyPrefix = "AspectStore/JoinPointRun/" AspectIdMapKey = "aspectId" VersionMapKey = "version" PriorityMapKey = "priority" AspectStateBeginBlock = "State/BeginBlock" AspectStateDeliverTxState = "State/DeliverTx" AspectStateEndBlock = "State/EndBlock" AspectAccountKey = "Aspect_@Acount@_" AspectProofKey = "Aspect_@Proof@_" AspectRunJoinPointKey = "Aspect_@Run@JoinPoint@_" AspectPropertyAllKeyPrefix = "Aspect_@Property@AllKey@_" AspectPropertyAllKeySplit = "^^^" AspectPropertyLimit = math.MaxUint8 )
View Source
const ( AspectContextKey cosmos.ContextKey = "aspect-ctx" AspectModuleName = "aspect" )
Variables ¶
View Source
var (
Uint256, _ = abi.NewType("uint256", "", nil)
Uint64, _ = abi.NewType("uint64", "", nil)
Uint32, _ = abi.NewType("uint32", "", nil)
Uint16, _ = abi.NewType("uint16", "", nil)
Uint8, _ = abi.NewType("uint8", "", nil)
String, _ = abi.NewType("string", "", nil)
Bool, _ = abi.NewType("bool", "", nil)
Bytes, _ = abi.NewType("bytes", "", nil)
Bytes32, _ = abi.NewType("bytes32", "", nil)
Address, _ = abi.NewType("address", "", nil)
Uint64Arr, _ = abi.NewType("uint64[]", "", nil)
AddressArr, _ = abi.NewType("address[]", "", nil)
Int8, _ = abi.NewType("int8", "", nil)
// Special types for testing
Uint32Arr2, _ = abi.NewType("uint32[2]", "", nil)
Uint64Arr2, _ = abi.NewType("uint64[2]", "", nil)
Uint256Arr, _ = abi.NewType("uint256[]", "", nil)
Uint256Arr2, _ = abi.NewType("uint256[2]", "", nil)
Uint256Arr3, _ = abi.NewType("uint256[3]", "", nil)
Uint256ArrNested, _ = abi.NewType("uint256[2][2]", "", nil)
Uint8ArrNested, _ = abi.NewType("uint8[][2]", "", nil)
Uint8SliceNested, _ = abi.NewType("uint8[][]", "", nil)
KvPair, _ = abi.NewType("tuple", "struct Overloader.F", []abi.ArgumentMarshaling{
{Name: "key", Type: "bytes"},
{Name: "value", Type: "bytes"},
})
KvPairArr, _ = abi.NewType("tuple[]", "struct Overloader.F", []abi.ArgumentMarshaling{
{Name: "key", Type: "string"},
{Name: "value", Type: "bytes"},
})
AspectBoundInfoArr, _ = abi.NewType("tuple[]", "struct Overloader.F", []abi.ArgumentMarshaling{
{Name: "aspectId", Type: "address"},
{Name: "version", Type: "uint64"},
{Name: "priority", Type: "int8"},
})
)
View Source
var ( PathSeparator = []byte("/") PathSeparatorLen = len(PathSeparator) )
View Source
var AbiMap = func() map[string]string { abiIndex := make(map[string]string) for name, expM := range methods { abiIndex[hex.EncodeToString(expM.ID)] = name } return abiIndex }
View Source
var AspectOwnableMethod = map[string]abi.Method{ "isOwner": abi.NewMethod("isOwner", "isOwner", abi.Function, "", false, false, []abi.Argument{{"sender", Address, false}}, []abi.Argument{{"result", Bool, false}}), }
nolint
Functions ¶
func AccountKey ¶
func AspectArrayKey ¶
func AspectBlockKey ¶
func AspectBlockKey() []byte
func AspectIdKey ¶
func AspectPropertyKey ¶
AspectCodeStoreKey returns the store key to retrieve a AspectCodeStore from the index fields
func AspectVersionKey ¶
func ByMapKeyPriority ¶
func ByMapKeyPriority(a, b interface{}) int
func GetAspectStatePoint ¶
func NewBindingAspectPriorityComparator ¶
func NewBindingAspectPriorityComparator(x []*artela.AspectCode) func(i, j int) bool
func NewBindingPriorityComparator ¶
func NewBindingPriorityComparator(x []*AspectMeta) func(i, j int) bool
Types ¶
type AspectContext ¶
type AspectContext struct {
// contains filtered or unexported fields
}
func NewAspectContext ¶
func NewAspectContext() *AspectContext
func (*AspectContext) Add ¶
func (c *AspectContext) Add(address common.Address, key string, value []byte)
func (*AspectContext) Clear ¶
func (c *AspectContext) Clear()
type AspectInfo ¶
type AspectMeta ¶
type AspectRuntimeContext ¶
type AspectRuntimeContext struct {
// contains filtered or unexported fields
}
6. destory: After each transaction execution, destroy the AspectRuntimeContext.
func NewAspectRuntimeContext ¶
func NewAspectRuntimeContext() *AspectRuntimeContext
func (*AspectRuntimeContext) AspectContext ¶
func (c *AspectRuntimeContext) AspectContext() *AspectContext
func (*AspectRuntimeContext) AspectState ¶
func (c *AspectRuntimeContext) AspectState() *AspectState
func (*AspectRuntimeContext) ClearBlockContext ¶
func (c *AspectRuntimeContext) ClearBlockContext()
func (*AspectRuntimeContext) CosmosContext ¶
func (c *AspectRuntimeContext) CosmosContext() cosmos.Context
func (*AspectRuntimeContext) CreateStateObject ¶
func (c *AspectRuntimeContext) CreateStateObject()
func (*AspectRuntimeContext) Deadline ¶
func (c *AspectRuntimeContext) Deadline() (deadline time.Time, ok bool)
func (*AspectRuntimeContext) Debug ¶
func (c *AspectRuntimeContext) Debug(msg string, keyvals ...interface{})
func (*AspectRuntimeContext) Destroy ¶
func (c *AspectRuntimeContext) Destroy()
func (*AspectRuntimeContext) Done ¶
func (c *AspectRuntimeContext) Done() <-chan struct{}
func (*AspectRuntimeContext) Err ¶
func (c *AspectRuntimeContext) Err() error
func (*AspectRuntimeContext) EthBlockContext ¶
func (c *AspectRuntimeContext) EthBlockContext() *EthBlockContext
func (*AspectRuntimeContext) EthTxContext ¶
func (c *AspectRuntimeContext) EthTxContext() *EthTxContext
func (*AspectRuntimeContext) GetAspectState ¶
func (c *AspectRuntimeContext) GetAspectState(ctx *artelatypes.RunnerContext, key string) []byte
func (*AspectRuntimeContext) Init ¶
func (c *AspectRuntimeContext) Init(storeKey storetypes.StoreKey)
func (*AspectRuntimeContext) JITManager ¶
func (c *AspectRuntimeContext) JITManager() *inherent.Manager
func (*AspectRuntimeContext) Logger ¶
func (c *AspectRuntimeContext) Logger() log.Logger
func (*AspectRuntimeContext) SetAspectState ¶
func (c *AspectRuntimeContext) SetAspectState(ctx *artelatypes.RunnerContext, key string, value []byte)
func (*AspectRuntimeContext) SetEthBlockContext ¶
func (c *AspectRuntimeContext) SetEthBlockContext(newBlockCtx *EthBlockContext)
func (*AspectRuntimeContext) SetEthTxContext ¶
func (c *AspectRuntimeContext) SetEthTxContext(newTxCtx *EthTxContext, jitManager *inherent.Manager)
func (*AspectRuntimeContext) StateDb ¶
func (c *AspectRuntimeContext) StateDb() vm.StateDB
func (*AspectRuntimeContext) StoreKey ¶
func (c *AspectRuntimeContext) StoreKey() storetypes.StoreKey
func (*AspectRuntimeContext) Value ¶
func (c *AspectRuntimeContext) Value(key interface{}) interface{}
func (*AspectRuntimeContext) WithCosmosContext ¶
func (c *AspectRuntimeContext) WithCosmosContext(newTxCtx cosmos.Context)
type AspectState ¶
type AspectState struct {
// contains filtered or unexported fields
}
func NewAspectState ¶
func NewAspectState(ctx cosmos.Context, storeKey storetypes.StoreKey, fixKey string, logger log.Logger) *AspectState
func (*AspectState) Get ¶
func (k *AspectState) Get(key []byte) []byte
func (*AspectState) Set ¶
func (k *AspectState) Set(key, value []byte)
type BoundAspectCode ¶
type EthBlockContext ¶
type EthBlockContext struct {
// contains filtered or unexported fields
}
func NewEthBlockContextFromABCIBeginBlockReq ¶
func NewEthBlockContextFromABCIBeginBlockReq(req abci.RequestBeginBlock) *EthBlockContext
func NewEthBlockContextFromHeight ¶
func NewEthBlockContextFromHeight(height int64) *EthBlockContext
func NewEthBlockContextFromQuery ¶
func NewEthBlockContextFromQuery(sdkCtx cosmos.Context, queryCtx client.Context) *EthBlockContext
func (*EthBlockContext) BlockHeader ¶
func (c *EthBlockContext) BlockHeader() *ethtypes.Header
type EthTxContext ¶
type EthTxContext struct {
// contains filtered or unexported fields
}
func NewEthTxContext ¶
func NewEthTxContext(ethTx *ethtypes.Transaction) *EthTxContext
func (*EthTxContext) ClearEvmObject ¶
func (c *EthTxContext) ClearEvmObject() *EthTxContext
func (*EthTxContext) Commit ¶
func (c *EthTxContext) Commit() bool
func (*EthTxContext) EvmCfg ¶
func (c *EthTxContext) EvmCfg() *statedb.EVMConfig
func (*EthTxContext) LastEvm ¶
func (c *EthTxContext) LastEvm() *vm.EVM
func (*EthTxContext) Message ¶
func (c *EthTxContext) Message() *core.Message
func (*EthTxContext) Receipt ¶
func (c *EthTxContext) Receipt() *ethtypes.Receipt
func (*EthTxContext) TxContent ¶
func (c *EthTxContext) TxContent() *ethtypes.Transaction
func (*EthTxContext) TxFrom ¶
func (c *EthTxContext) TxFrom() common.Address
func (*EthTxContext) TxIndex ¶
func (c *EthTxContext) TxIndex() uint64
func (*EthTxContext) TxTo ¶
func (c *EthTxContext) TxTo() string
func (*EthTxContext) VmStateDB ¶
func (c *EthTxContext) VmStateDB() vm.StateDB
func (*EthTxContext) VmTracer ¶
func (c *EthTxContext) VmTracer() *vm.Tracer
func (*EthTxContext) WithCommit ¶
func (c *EthTxContext) WithCommit(commit bool) *EthTxContext
func (*EthTxContext) WithEVMConfig ¶
func (c *EthTxContext) WithEVMConfig(cfg *statedb.EVMConfig) *EthTxContext
func (*EthTxContext) WithReceipt ¶
func (c *EthTxContext) WithReceipt(receipt *ethtypes.Receipt) *EthTxContext
func (*EthTxContext) WithStateDB ¶
func (c *EthTxContext) WithStateDB(stateDb vm.StateDB) *EthTxContext
func (*EthTxContext) WithTxIndex ¶
func (c *EthTxContext) WithTxIndex(index uint64) *EthTxContext
type GetLastBlockHeight ¶
type GetLastBlockHeight func() int64
type HistoryStoreBuilder ¶
Click to show internal directories.
Click to hide internal directories.