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 ConvertEthBlockHeader(header tmproto.Header) *asptypes.EthBlockHeader
- func ConvertEthTransaction(sdkCtx sdk.Context, ethMsg *evmtxs.MsgEthereumTx) *asptypes.EthTransaction
- func ConvertEthTx(msg sdk.Msg) *ethtypes.Transaction
- func ConvertMsgEthereumTx(msg sdk.Msg) *evmtxs.MsgEthereumTx
- func EthTransactionByMsg(sdkCtx sdk.Context, message core.Message, txConfig statedb.TxConfig) *asptypes.EthTransaction
- func GetEthTxsInBlock(clientCtx client.Context, sdkCtx sdk.Context, blockHeight int64, ...) ([]*evmtypes.MsgEthereumTx, error)
- func IsEthTx(msg sdk.Msg) bool
- 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)
- func ProtoToEthBlockHeader(header *tmproto.Header) *asptypes.EthBlockHeader
- func RPCTxToEthTx(tran *rpctypes.RPCTransaction) *asptypes.EthTransaction
- func RPCTxsToEthTxs(trans []*rpctypes.RPCTransaction) []*asptypes.EthTransaction
- func TendermintToEthBlockHeader(header *types.Header) *asptypes.EthBlockHeader
- type AspectContext
- type AspectMeta
- type AspectRuntimeContext
- func (c *AspectRuntimeContext) AspectContext() *AspectContext
- func (c *AspectRuntimeContext) ClearBlockContext()
- func (c *AspectRuntimeContext) ClearContext()
- func (c *AspectRuntimeContext) EthTxContext() *EthTxContext
- func (c *AspectRuntimeContext) ExtBlockContext() *ExtBlockContext
- func (c *AspectRuntimeContext) NewAspectContext()
- func (c *AspectRuntimeContext) SetEthTxContext(newTxCtx *EthTxContext)
- func (c *AspectRuntimeContext) StateDb() vm.StateDB
- type BoundAspectCode
- type EthTxContext
- func (c *EthTxContext) AddExtProperties(key string, value interface{}) *EthTxContext
- func (c *EthTxContext) ClearEvmObject() *EthTxContext
- func (c *EthTxContext) EvmCfg() *statedb.EVMConfig
- func (c *EthTxContext) ExtProperties() map[string]interface{}
- 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) TxTo() string
- func (c *EthTxContext) VmStateDB() vm.StateDB
- func (c *EthTxContext) VmTracer() *vm.Tracer
- func (c *EthTxContext) WithEvmCfg(cfg *statedb.EVMConfig) *EthTxContext
- func (c *EthTxContext) WithFrom(from common.Address) *EthTxContext
- func (c *EthTxContext) WithLastEvm(lastEvm *vm.EVM) *EthTxContext
- func (c *EthTxContext) WithMessage(msg *core.Message) *EthTxContext
- func (c *EthTxContext) WithReceipt(receipt *ethtypes.Receipt) *EthTxContext
- func (c *EthTxContext) WithStateDB(db vm.StateDB) *EthTxContext
- func (c *EthTxContext) WithVmMonitor(monitor *vm.Tracer) *EthTxContext
- type ExtBlockContext
- func (c *ExtBlockContext) EvidenceList() []abci.Misbehavior
- func (c *ExtBlockContext) LastCommitInfo() abci.CommitInfo
- func (c *ExtBlockContext) RpcClient() client.Context
- func (c *ExtBlockContext) WithEvidenceList(cfg []abci.Misbehavior) *ExtBlockContext
- func (c *ExtBlockContext) WithLastCommit(cfg abci.CommitInfo) *ExtBlockContext
- func (c *ExtBlockContext) WithRpcClient(cfg client.Context) *ExtBlockContext
- 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/" AspectIdMapKey = "aspectId" VersionMapKey = "version" PriorityMapKey = "priority" AspectAccountKey = "Aspect_@Acount@_" AspectProofKey = "Aspect_@Proof@_" )
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: "string"},
})
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 ConvertEthBlockHeader ¶
func ConvertEthBlockHeader(header tmproto.Header) *asptypes.EthBlockHeader
func ConvertEthTransaction ¶
func ConvertEthTransaction(sdkCtx sdk.Context, ethMsg *evmtxs.MsgEthereumTx) *asptypes.EthTransaction
func ConvertEthTx ¶
func ConvertEthTx(msg sdk.Msg) *ethtypes.Transaction
func ConvertMsgEthereumTx ¶
func ConvertMsgEthereumTx(msg sdk.Msg) *evmtxs.MsgEthereumTx
func EthTransactionByMsg ¶
func GetEthTxsInBlock ¶
func NewBindingAspectPriorityComparator ¶
func NewBindingAspectPriorityComparator(x []*artela.AspectCode) func(i, j int) bool
func NewBindingPriorityComparator ¶
func NewBindingPriorityComparator(x []*AspectMeta) func(i, j int) bool
func ProtoToEthBlockHeader ¶
func ProtoToEthBlockHeader(header *tmproto.Header) *asptypes.EthBlockHeader
func RPCTxToEthTx ¶
func RPCTxToEthTx(tran *rpctypes.RPCTransaction) *asptypes.EthTransaction
func RPCTxsToEthTxs ¶
func RPCTxsToEthTxs(trans []*rpctypes.RPCTransaction) []*asptypes.EthTransaction
func TendermintToEthBlockHeader ¶
func TendermintToEthBlockHeader(header *types.Header) *asptypes.EthBlockHeader
Types ¶
type AspectContext ¶
type AspectContext struct {
// contains filtered or unexported fields
}
func NewAspectContext ¶
func NewAspectContext() *AspectContext
func (*AspectContext) Clear ¶
func (c *AspectContext) Clear(contractAddr string)
type AspectMeta ¶
type AspectRuntimeContext ¶
type AspectRuntimeContext struct {
// contains filtered or unexported fields
}
func NewAspectRuntimeContext ¶
func NewAspectRuntimeContext() *AspectRuntimeContext
func (*AspectRuntimeContext) AspectContext ¶
func (c *AspectRuntimeContext) AspectContext() *AspectContext
func (*AspectRuntimeContext) ClearBlockContext ¶
func (c *AspectRuntimeContext) ClearBlockContext()
func (*AspectRuntimeContext) ClearContext ¶
func (c *AspectRuntimeContext) ClearContext()
func (*AspectRuntimeContext) EthTxContext ¶
func (c *AspectRuntimeContext) EthTxContext() *EthTxContext
func (*AspectRuntimeContext) ExtBlockContext ¶
func (c *AspectRuntimeContext) ExtBlockContext() *ExtBlockContext
func (*AspectRuntimeContext) NewAspectContext ¶
func (c *AspectRuntimeContext) NewAspectContext()
func (*AspectRuntimeContext) SetEthTxContext ¶
func (c *AspectRuntimeContext) SetEthTxContext(newTxCtx *EthTxContext)
func (*AspectRuntimeContext) StateDb ¶
func (c *AspectRuntimeContext) StateDb() vm.StateDB
type BoundAspectCode ¶
type EthTxContext ¶
type EthTxContext struct {
// contains filtered or unexported fields
}
func NewEthTxContext ¶
func NewEthTxContext(ethTx *ethtypes.Transaction) *EthTxContext
func (*EthTxContext) AddExtProperties ¶
func (c *EthTxContext) AddExtProperties(key string, value interface{}) *EthTxContext
func (*EthTxContext) ClearEvmObject ¶
func (c *EthTxContext) ClearEvmObject() *EthTxContext
func (*EthTxContext) EvmCfg ¶
func (c *EthTxContext) EvmCfg() *statedb.EVMConfig
func (*EthTxContext) ExtProperties ¶
func (c *EthTxContext) ExtProperties() map[string]interface{}
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) 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) WithEvmCfg ¶
func (c *EthTxContext) WithEvmCfg(cfg *statedb.EVMConfig) *EthTxContext
func (*EthTxContext) WithFrom ¶
func (c *EthTxContext) WithFrom(from common.Address) *EthTxContext
func (*EthTxContext) WithLastEvm ¶
func (c *EthTxContext) WithLastEvm(lastEvm *vm.EVM) *EthTxContext
func (*EthTxContext) WithMessage ¶
func (c *EthTxContext) WithMessage(msg *core.Message) *EthTxContext
func (*EthTxContext) WithReceipt ¶
func (c *EthTxContext) WithReceipt(receipt *ethtypes.Receipt) *EthTxContext
func (*EthTxContext) WithStateDB ¶
func (c *EthTxContext) WithStateDB(db vm.StateDB) *EthTxContext
func (*EthTxContext) WithVmMonitor ¶
func (c *EthTxContext) WithVmMonitor(monitor *vm.Tracer) *EthTxContext
type ExtBlockContext ¶
type ExtBlockContext struct {
// contains filtered or unexported fields
}
func NewExtBlockContext ¶
func NewExtBlockContext() *ExtBlockContext
func (*ExtBlockContext) EvidenceList ¶
func (c *ExtBlockContext) EvidenceList() []abci.Misbehavior
func (*ExtBlockContext) LastCommitInfo ¶
func (c *ExtBlockContext) LastCommitInfo() abci.CommitInfo
func (*ExtBlockContext) RpcClient ¶
func (c *ExtBlockContext) RpcClient() client.Context
func (*ExtBlockContext) WithEvidenceList ¶
func (c *ExtBlockContext) WithEvidenceList(cfg []abci.Misbehavior) *ExtBlockContext
func (*ExtBlockContext) WithLastCommit ¶
func (c *ExtBlockContext) WithLastCommit(cfg abci.CommitInfo) *ExtBlockContext
func (*ExtBlockContext) WithRpcClient ¶
func (c *ExtBlockContext) WithRpcClient(cfg client.Context) *ExtBlockContext
Click to show internal directories.
Click to hide internal directories.