stdlib

package
v0.33.21-fix-get-highe... Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: AGPL-3.0 Imports: 19 Imported by: 3

Documentation

Index

Constants

View Source
const ContractName = "EVM"
View Source
const InternalEVMContractName = "InternalEVM"

Variables

View Source
var EVMTransactionBytesCadenceType = cadence.NewVariableSizedArrayType(cadence.TheUInt8Type)
View Source
var InternalEVMContractType = func() *sema.CompositeType {
	ty := &sema.CompositeType{
		Identifier: InternalEVMContractName,
		Kind:       common.CompositeKindContract,
	}

	ty.Members = sema.MembersAsMap([]*sema.Member{
		sema.NewUnmeteredPublicFunctionMember(
			ty,
			internalEVMTypeRunFunctionName,
			internalEVMTypeRunFunctionType,
			"",
		),
		sema.NewUnmeteredPublicFunctionMember(
			ty,
			internalEVMTypeCreateBridgedAccountFunctionName,
			internalEVMTypeCreateBridgedAccountFunctionType,
			"",
		),
		sema.NewUnmeteredPublicFunctionMember(
			ty,
			internalEVMTypeCallFunctionName,
			internalEVMTypeCallFunctionType,
			"",
		),
		sema.NewUnmeteredPublicFunctionMember(
			ty,
			internalEVMTypeDepositFunctionName,
			internalEVMTypeDepositFunctionType,
			"",
		),
		sema.NewUnmeteredPublicFunctionMember(
			ty,
			internalEVMTypeWithdrawFunctionName,
			internalEVMTypeWithdrawFunctionType,
			"",
		),
		sema.NewUnmeteredPublicFunctionMember(
			ty,
			internalEVMTypeDeployFunctionName,
			internalEVMTypeDeployFunctionType,
			"",
		),
		sema.NewUnmeteredPublicFunctionMember(
			ty,
			internalEVMTypeBalanceFunctionName,
			internalEVMTypeBalanceFunctionType,
			"",
		),
		sema.NewUnmeteredPublicFunctionMember(
			ty,
			internalEVMTypeEncodeABIFunctionName,
			internalEVMTypeEncodeABIFunctionType,
			"",
		),
		sema.NewUnmeteredPublicFunctionMember(
			ty,
			internalEVMTypeDecodeABIFunctionName,
			internalEVMTypeDecodeABIFunctionType,
			"",
		),
	})
	return ty
}()

Functions

func AddressBytesArrayValueToEVMAddress

func AddressBytesArrayValueToEVMAddress(
	inter *interpreter.Interpreter,
	locationRange interpreter.LocationRange,
	addressBytesValue *interpreter.ArrayValue,
) (
	result types.Address,
	err error,
)

func ContractCode

func ContractCode(flowTokenAddress flow.Address, evmAbiOnly bool) []byte

func EVMAddressToAddressBytesArrayValue

func EVMAddressToAddressBytesArrayValue(
	inter *interpreter.Interpreter,
	address types.Address,
) *interpreter.ArrayValue

func NewBalanceCadenceType

func NewBalanceCadenceType(address common.Address) *cadence.StructType

func NewEVMAddress

func NewEVMAddress(
	inter *interpreter.Interpreter,
	locationRange interpreter.LocationRange,
	location common.AddressLocation,
	address types.Address,
) *interpreter.CompositeValue

func NewEVMAddressCadenceType

func NewEVMAddressCadenceType(address common.Address) *cadence.StructType

func NewInternalEVMContractValue

func NewInternalEVMContractValue(
	gauge common.MemoryGauge,
	handler types.ContractHandler,
	location common.AddressLocation,
) *interpreter.SimpleCompositeValue

func SetupEnvironment

func SetupEnvironment(env runtime.Environment, handler types.ContractHandler, service flow.Address)

Types

This section is empty.

Jump to

Keyboard shortcuts

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