ape

ape.accounts

Manage accounts. See the AccountManager for more info.

ape.chain

Manage the blockchain. See the ChainManager for more info.

ape.networks

Manage networks. See the NetworkManager for more info.

ape.project

Access the local project. See the ProjectManager for more info.

ape.config

Access the local project config. See the ConfigManager for more info.

ape.Project(path)

Instantiate other projects. See the ProjectManager for more info.

Path:

The path to the project.

ape.Contract(address, contract_type)

Instantiate contract-classes at a given address. See the ContractInstance for more info.

Address:

The address of the instance.

Contract_type:

Optionally provide the ABI or contract type data.

ape.convert(value, to_type)

Conversion utility. See the ConversionManager for more info.

Value:

The value to convert.

To_type:

The destination type.

Example usage:

result = ape.convert("1 ETH", int)
ape.compilers

Access compiler classes. See the CompilerManager for more info.

ape.reverts(expected_message, dev_message)

Catch contract-revert exceptions. Mimics pytest.raises.

Expected_message:

The expected revert message (optional).

Dev_message:

The expected dev-message (optional).