ape.types

Submodules

Package Contents

Classes:

ABI

Bytecode

Checksum

Compiler

ContractType

Source

PackageManifest

PackageMeta

MessageSignature

TransactionSignature


class ape.types.ABI

Bases: ape.types.abstract.SerializableType

name :str =
inputs :List[ABIType] = []
outputs :List[ABIType] = []
stateMutability :Optional[str]
anonymous :Optional[bool]
type :str
property signature(self)str

String representing the function/event signature, which includes the arg names and types, and output names (if any) and type(s)

property selector(self)str

String representing the function selector, used to compute method_id and event_id.

property is_event(self)bool
property is_payable(self)bool
property is_stateful(self)bool
classmethod from_dict(cls, params: Dict)
class ape.types.Bytecode

Bases: ape.types.abstract.SerializableType

bytecode :Optional[str]
linkReferences :Optional[List[LinkReference]]
linkDependencies :Optional[List[LinkDependency]]
__repr__(self)str

Return repr(self).

classmethod from_dict(cls, params: Dict)
class ape.types.Checksum

Bases: ape.types.abstract.SerializableType

algorithm :str
hash :str
class ape.types.Compiler

Bases: ape.types.abstract.SerializableType

name :str
version :str
settings :Optional[str]
contractTypes :Optional[List[str]]
class ape.types.ContractType

Bases: ape.types.abstract.FileMixin, ape.types.abstract.SerializableType

_keep_fields_ :Set[str]
_skip_fields_ :Set[str]
contractName :str
sourceId :Optional[str]
deploymentBytecode :Optional[Bytecode]
runtimeBytecode :Optional[Bytecode]
abi :List[ABI] = []
userdoc :Optional[str]
devdoc :Optional[str]
property constructor(self)Optional[ABI]
property fallback(self)Optional[ABI]
property events(self)List[ABI]
property calls(self)List[ABI]
property transactions(self)List[ABI]
classmethod from_dict(cls, params: Dict)
class ape.types.Source

Bases: ape.types.abstract.SerializableType

checksum :Optional[Checksum]
urls :List[str] = []
content :Optional[str]
installPath :Optional[str]
type :Optional[str]
license :Optional[str]
load_content(self)

Loads resource at urls into content.

compute_checksum(self, algorithm: str = 'md5', force: bool = False)

Compute the checksum if content exists but checksum doesn’t exist yet. Or compute the checksum regardless if force is True.

classmethod from_dict(cls, params: Dict)
class ape.types.PackageManifest

Bases: ape.types.abstract.FileMixin, ape.types.abstract.SerializableType

manifest :str = ethpm/3
name :Optional[str]
version :Optional[str]
meta :Optional[PackageMeta]
sources :Optional[Dict[str, ape.types.contract.Source]]
contractTypes :Optional[Dict[str, ape.types.contract.ContractType]]
compilers :Optional[List[ape.types.contract.Compiler]]
deployments :Optional[Dict[str, Dict[str, ape.types.contract.ContractInstance]]]
buildDependencies :Optional[Dict[str, str]]
__getattr__(self, attr_name: str)
classmethod from_dict(cls, params: Dict)
class ape.types.PackageMeta

Bases: ape.types.abstract.SerializableType

authors :Optional[List[str]]
license :Optional[str]
description :Optional[str]
keywords :Optional[List[str]]
class ape.types.MessageSignature

Bases: _Signature

class ape.types.TransactionSignature

Bases: _Signature