contract

package
v0.4.7-rc4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AspectNativeContract

type AspectNativeContract struct {
	// contains filtered or unexported fields
}

func NewAspectNativeContract

func NewAspectNativeContract(storeKey storetypes.StoreKey,
	evm *vm.EVM,
	getBlockHeight func() int64,
	evmState *states.StateDB,
	logger log.Logger,
) *AspectNativeContract

func (*AspectNativeContract) ApplyMessage

func (k *AspectNativeContract) ApplyMessage(ctx sdk.Context, msg *core.Message, commit bool) (*evmtxs.MsgEthereumTxResponse, error)

type AspectService

type AspectService struct {
	// contains filtered or unexported fields
}

func NewAspectService

func NewAspectService(storeKey storetypes.StoreKey,
	getHeight evmtypes.GetLastBlockHeight, logger log.Logger) *AspectService

func (*AspectService) GetAccountVerifiers

func (service *AspectService) GetAccountVerifiers(ctx sdk.Context, to common.Address) ([]*artela.AspectCode, error)

GetAccountVerifiers gets the bound Aspect verifier for the account

func (*AspectService) GetAspectAccount

func (service *AspectService) GetAspectAccount(ctx sdk.Context, aspectId common.Address) (*common.Address, error)

func (*AspectService) GetAspectCode

func (service *AspectService) GetAspectCode(ctx sdk.Context, aspectId common.Address, version *uint256.Int) ([]byte, *uint256.Int)

func (*AspectService) GetAspectForBlock

func (service *AspectService) GetAspectForBlock(ctx sdk.Context) ([]*artela.AspectCode, error)

func (*AspectService) GetAspectJoinPoint

func (service *AspectService) GetAspectJoinPoint(ctx sdk.Context, aspectId common.Address, version *uint256.Int) *big.Int

func (*AspectService) GetAspectOf

func (service *AspectService) GetAspectOf(ctx sdk.Context, aspectId common.Address) (*treeset.Set, error)

func (*AspectService) GetAspectProof

func (service *AspectService) GetAspectProof(ctx sdk.Context, aspectId common.Address) ([]byte, error)

func (*AspectService) GetAspectsForJoinPoint

func (service *AspectService) GetAspectsForJoinPoint(ctx sdk.Context, to common.Address, cut artela.PointCut) ([]*artela.AspectCode, error)

GetAspectsForJoinPoint BoundAspects get bound Aspects on previous block

func (*AspectService) GetBlockHeight

func (service *AspectService) GetBlockHeight() int64

func (*AspectService) GetBoundAspectForAddr

func (service *AspectService) GetBoundAspectForAddr(sdkCtx sdk.Context, to common.Address) ([]*artela.AspectCode, error)

type AspectStore

type AspectStore struct {
	// contains filtered or unexported fields
}

func NewAspectStore

func NewAspectStore(storeKey storetypes.StoreKey, logger log.Logger) *AspectStore

func (*AspectStore) BindTxAspect

func (k *AspectStore) BindTxAspect(ctx sdk.Context, account common.Address, aspectId common.Address, aspectVersion *uint256.Int, priority int8) error

func (*AspectStore) BindVerificationAspect

func (k *AspectStore) BindVerificationAspect(ctx sdk.Context, account common.Address, aspectId common.Address, aspectVersion *uint256.Int, priority int8, isContractAccount bool) error

func (*AspectStore) ChangeBoundAspectVersion

func (k *AspectStore) ChangeBoundAspectVersion(ctx sdk.Context, contract common.Address, aspectId common.Address, version uint64) error

func (*AspectStore) GetAspectCode

func (k *AspectStore) GetAspectCode(ctx sdk.Context, aspectId common.Address, version *uint256.Int) ([]byte, *uint256.Int)

func (*AspectStore) GetAspectJP

func (k *AspectStore) GetAspectJP(ctx sdk.Context, aspectId common.Address, version *uint256.Int) *big.Int

GetAspectJP

@Description: get Aspect Join point run
@receiver k
@param ctx
@param aspectId
@param version
@return *big.Int

func (*AspectStore) GetAspectLastVersion

func (k *AspectStore) GetAspectLastVersion(ctx sdk.Context, aspectId common.Address) *uint256.Int

func (*AspectStore) GetAspectPropertyValue

func (k *AspectStore) GetAspectPropertyValue(ctx sdk.Context, aspectId common.Address, propertyKey string) []byte

func (*AspectStore) GetAspectRefValue

func (k *AspectStore) GetAspectRefValue(ctx sdk.Context, aspectId common.Address) (*treeset.Set, error)

func (*AspectStore) GetBlockLevelAspects

func (k *AspectStore) GetBlockLevelAspects(ctx sdk.Context) (map[string]int64, error)

func (*AspectStore) GetTxLevelAspects

func (k *AspectStore) GetTxLevelAspects(ctx sdk.Context, contract common.Address) ([]*types.AspectMeta, error)

func (*AspectStore) GetVerificationAspects

func (k *AspectStore) GetVerificationAspects(ctx sdk.Context, account common.Address) ([]*types.AspectMeta, error)

func (*AspectStore) RemoveBlockLevelAspect

func (k *AspectStore) RemoveBlockLevelAspect(ctx sdk.Context, aspectId common.Address) error

func (*AspectStore) StoreAspectCode

func (k *AspectStore) StoreAspectCode(ctx sdk.Context, aspectId common.Address, code []byte) *uint256.Int

StoreAspectCode aspect code

func (*AspectStore) StoreAspectJP

func (k *AspectStore) StoreAspectJP(ctx sdk.Context, aspectId common.Address, version *uint256.Int, point *big.Int) error

StoreAspectJP

@Description: Stores the execute conditions of the Aspect Join point. {aspectId,version,'AspectRunJoinPointKey'}==>{value}
@receiver k
@param ctx
@param aspectId
@param version: aspect version ,optional,Default Aspect last version
@param point  JoinPointRunType value, @see join_point_type.go
@return bool Execute Result

func (*AspectStore) StoreAspectProperty

func (k *AspectStore) StoreAspectProperty(ctx sdk.Context, aspectId common.Address, prop []types.Property) error

StoreAspectProperty

@Description:  property storage format
 1. {aspectid,key}=>{prperty value}
 2. {aspectid,"AspectPropertyAllKeyPrefix"}=>"key1,key2,key3..."
@receiver k
@param ctx
@param aspectId
@param prop
@return error

func (*AspectStore) StoreAspectRefValue

func (k *AspectStore) StoreAspectRefValue(ctx sdk.Context, account common.Address, aspectId common.Address) error

func (*AspectStore) StoreAspectVersion

func (k *AspectStore) StoreAspectVersion(ctx sdk.Context, aspectId common.Address, version *uint256.Int)

StoreAspectVersion version

func (*AspectStore) StoreBlockLevelAspect

func (k *AspectStore) StoreBlockLevelAspect(ctx sdk.Context, aspectId common.Address) error

StoreBlockLevelAspect key="AspectBlock" value=map[string]int64

func (*AspectStore) UnBindContractAspects

func (k *AspectStore) UnBindContractAspects(ctx sdk.Context, contract common.Address, aspectId common.Address) error

func (*AspectStore) UnBindVerificationAspect

func (k *AspectStore) UnBindVerificationAspect(ctx sdk.Context, account common.Address, aspectId common.Address) error

func (*AspectStore) UnbindAspectRefValue

func (k *AspectStore) UnbindAspectRefValue(ctx sdk.Context, contract common.Address, aspectId common.Address) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL