MetaFile¶
MetaFile is a representation of the metafile.json
file.
Store and retrieve metdata about a contract for this project
Example JSON structure:
{
"contracts": [
{
"name": "ExampleContract",
"networks": {
"1": {
"deployedHash": "0xdeadbeef...",
"deployedInstances": [
{
"hash": "0xdeadbeef...",
"date": "2018-10-21 00:00:00T-7",
"address": "0xdeadbeef...",
}
]
}
}
}
],
"seenAccounts": [
"0xdeadbeef..."
],
"defaultAccount": "0xdeadbeef..."
}
-
class
solidbyte.common.metafile.
MetaFile
(filename_override: Union[pathlib.Path, str] = None, project_dir: Union[pathlib.Path, str] = None, read_only: bool = False)[source]¶ Class representing the project metafile
-
__init__
(filename_override: Union[pathlib.Path, str] = None, project_dir: Union[pathlib.Path, str] = None, read_only: bool = False) → None[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
cleanup
(dry_run: bool = False) → List[Tuple[str, str, str]][source]¶ Cleanup metafile.json of test deployments. In practice, this means any deployments with a network_id > 100, as the last semi-official network_id is 99.
Returns a list of tuple. Tuples are (name, network_id).
-