The brownie
package is the main package containing all of Brownie's functionality.
>>> from brownie import *
>>> dir()
['Gui', 'accounts', 'alert', 'brownie', 'check', 'compile_source', 'config', 'history', 'network', 'project', 'rpc', 'web3', 'wei']
The convert
module contains methods relating to data conversion.
The following classes and methods are used to convert arguments supplied to ContractTx
and ContractCall
.
For certain types of contract data, Brownie uses subclasses to assist with conversion and comparison.
The following methods are used to convert multiple values based on a contract ABI specification. Values are formatted via calls to the methods outlined under type conversions<type-conversions>
, and where appropriate type classes<type-classes>
are applied.
The exceptions
module contains all Brownie Exception
classes.
The _config
module handles all Brownie configuration settings. It is not designed to be accessed directly. If you wish to view or modify config settings while Brownie is running, import brownie.config
which will return a ConfigDict
with the active settings:
>>> from brownie import config
>>> type(config)
<class 'brownie._config.ConfigDict'>
>>> config['network_defaults']
{'name': 'development', 'gas_limit': False, 'gas_price': False}
Internal metaclass used to create singleton objects. Instantiating a class derived from this metaclass will always return the same instance, regardless of how the child class was imported.