Get the entire architecture of a smart contract system from any address in the architecture
Project description
EVM_Architect
There's a handful of optimizations still to be had. Speed has been increased by using a rpc provider rather than etherscan for getCode, and the multicheck function is now multithreaded so that all the checks occur simultaneaously. The following is an example of how to get a flat list of entities in an architecture, given a single address.
To use this, make sure you're using python 3.9.0. You can install using pip.
pip install evm-architect
Most of the time you'll probably just want to use getArch(), these are the arguments:
getArch(
address-string,
transaction_limit-int,
flatten-bool)
If flatten==True, then you will get a list of addresses (EOAs and contracts).
#Example:
['0xd1c24f50d05946b3fabefbae3cd0a7e9938c63f2', '0xc0a47dfe034b400b47bdad5fecda2621de6c4d95', '0xa087b7351c24082ac7ef7ca79b4f4c5d2e82be84', '0x2157a7894439191e520825fe9399ab8655e0f708', '0x2c4bd064b998838076fa341a83d007fc2fa50957', '0xddee242662323a3cff3f9aa139ffa496ac3c73b0',...]
If flatten==False, then you will get a dictionnary in the format below. Keep in mind that created1 may also be a creator somewhere else in the dictionnary.
{creator:[created1,created2,created3,...]}
#Example:
{'0xd1c24f50d05946b3fabefbae3cd0a7e9938c63f2': ['0xa087b7351c24082ac7ef7ca79b4f4c5d2e82be84', '0x2157a7894439191e520825fe9399ab8655e0f708', '0xc0a47dfe034b400b47bdad5fecda2621de6c4d95'],...}
Here are some code examples:
from evm_architect import architect
arch=architect.Arch()
architecture=arch.getArch("0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95",50,False)
architecture=arch.getArch("0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95",50,True)
uarch=arch.uniqueContracts(architecture,{})
#returns a dictionary of {address: hash of opcode stack} using every address in the creationdict (unflattened architecture)
highest=arch.getHighest(architecture)
#returns the highest position creator in the creationdict (unflattened architecture)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file evm_architect-1.0.0.tar.gz
.
File metadata
- Download URL: evm_architect-1.0.0.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0df5bfd7657c5470184e71d6db854b02e8261118d42873c25dc2d14ec6b5ee4 |
|
MD5 | 43215e762061beeb65ae3b63a491ce4e |
|
BLAKE2b-256 | 4aa7e368ee1d3b9261e772a9ea35584b55cbc45b6b42975c846cfcf7ec300970 |
File details
Details for the file evm_architect-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: evm_architect-1.0.0-py3-none-any.whl
- Upload date:
- Size: 17.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43352f3c37c489a11faaf9adacad79b62a7c4afbf200352f8d4860f62a19858a |
|
MD5 | 516a3cf90b21d24c223db4117bc0e32f |
|
BLAKE2b-256 | f5cbe370bd0873e58eb834113fd219abd7312ea082df1197bc4890e5f4c95975 |