Skip to content

Commit 16bb505

Browse files
committed
add get_contract_creator_and_creation_tx_hash
1 parent e059d7c commit 16bb505

File tree

142 files changed

+158905
-62860
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+158905
-62860
lines changed

Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
install:
2+
pip install -e .
3+
4+
.PHONY: test
5+
test:
6+
bash ./run_tests.sh $(API_KEY)
7+
8+
clean:
9+
find . -type d -name __pycache__ -exec rm -rf "{}" +
10+
rm -rf build *.egg-info
11+
rm -f .black .flake8 .errors .coverage
12+
13+
fmt:
14+
black -l 135 etherscan
15+
flake8 --max-line-len 135 etherscan

etherscan/__init__.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,16 @@
88
from .modules.stats import Stats as stats
99
from .modules.tokens import Tokens as tokens
1010
from .modules.transactions import Transactions as transactions
11+
12+
__all__ = [
13+
"Etherscan",
14+
"accounts",
15+
"blocks",
16+
"contracts",
17+
"gastracker",
18+
"pro",
19+
"proxy",
20+
"stats",
21+
"tokens",
22+
"transactions",
23+
]

etherscan/configs/GOERLI-stable.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,12 @@
153153
"address": "0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413"
154154
}
155155
},
156+
"get_contract_creator_and_creation_tx_hash": {
157+
"module": "contracts",
158+
"kwargs": {
159+
"addresses": ["0x7af963cF6D228E564e2A0aA0DdBF06210B38615D"]
160+
}
161+
},
156162
"get_contract_execution_status": {
157163
"module": "transactions",
158164
"kwargs": {
@@ -307,4 +313,4 @@
307313
"offset": 100
308314
}
309315
}
310-
}
316+
}

etherscan/configs/KOVAN-stable.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,12 @@
153153
"address": "0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413"
154154
}
155155
},
156+
"get_contract_creator_and_creation_tx_hash": {
157+
"module": "contracts",
158+
"kwargs": {
159+
"addresses": ["0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413"]
160+
}
161+
},
156162
"get_contract_execution_status": {
157163
"module": "transactions",
158164
"kwargs": {
@@ -307,4 +313,4 @@
307313
"offset": 100
308314
}
309315
}
310-
}
316+
}

etherscan/configs/MAIN-stable.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,12 @@
153153
"address": "0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413"
154154
}
155155
},
156+
"get_contract_creator_and_creation_tx_hash": {
157+
"module": "contracts",
158+
"kwargs": {
159+
"addresses": ["0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413"]
160+
}
161+
},
156162
"get_contract_execution_status": {
157163
"module": "transactions",
158164
"kwargs": {
@@ -463,4 +469,4 @@
463469
"sort": "asc"
464470
}
465471
}
466-
}
472+
}

etherscan/configs/RINKEBY-stable.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,12 @@
153153
"address": "0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413"
154154
}
155155
},
156+
"get_contract_creator_and_creation_tx_hash": {
157+
"module": "contracts",
158+
"kwargs": {
159+
"addresses": ["0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413"]
160+
}
161+
},
156162
"get_contract_execution_status": {
157163
"module": "transactions",
158164
"kwargs": {
@@ -307,4 +313,4 @@
307313
"offset": 100
308314
}
309315
}
310-
}
316+
}

etherscan/configs/ROPSTEN-stable.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,12 @@
153153
"address": "0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413"
154154
}
155155
},
156+
"get_contract_creator_and_creation_tx_hash": {
157+
"module": "contracts",
158+
"kwargs": {
159+
"addresses": ["0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413"]
160+
}
161+
},
156162
"get_contract_execution_status": {
157163
"module": "transactions",
158164
"kwargs": {
@@ -307,4 +313,4 @@
307313
"offset": 100
308314
}
309315
}
310-
}
316+
}

etherscan/enums/actions_enum.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,10 @@ class ActionsEnum:
2828
ETH_ESTIMATE_GAS: str = "eth_estimateGas"
2929
ETH_GAS_PRICE: str = "eth_gasPrice"
3030
ETH_GET_BLOCK_BY_NUMBER: str = "eth_getBlockByNumber"
31-
ETH_GET_BLOCK_TRANSACTION_COUNT_BY_NUMBER: str = (
32-
"eth_getBlockTransactionCountByNumber"
33-
)
31+
ETH_GET_BLOCK_TRANSACTION_COUNT_BY_NUMBER: str = "eth_getBlockTransactionCountByNumber"
3432
ETH_GET_CODE: str = "eth_getCode"
3533
ETH_GET_STORAGE_AT: str = "eth_getStorageAt"
36-
ETH_GET_TRANSACTION_BY_BLOCK_NUMBER_AND_INDEX: str = (
37-
"eth_getTransactionByBlockNumberAndIndex"
38-
)
34+
ETH_GET_TRANSACTION_BY_BLOCK_NUMBER_AND_INDEX: str = "eth_getTransactionByBlockNumberAndIndex"
3935
ETH_GET_TRANSACTION_BY_HASH: str = "eth_getTransactionByHash"
4036
ETH_GET_TRANSACTION_COUNT: str = "eth_getTransactionCount"
4137
ETH_GET_TRANSACTION_RECEIPT: str = "eth_getTransactionReceipt"
@@ -48,6 +44,7 @@ class ActionsEnum:
4844
GET_BLOCK_COUNTDOWN: str = "getblockcountdown"
4945
GET_BLOCK_NUMBER_BY_TIME: str = "getblocknobytime"
5046
GET_BLOCK_REWARD: str = "getblockreward"
47+
GET_CONTRACT_CREATION: str = "getcontractcreation"
5148
GET_MINED_BLOCKS: str = "getminedblocks"
5249
GET_SOURCE_CODE: str = "getsourcecode"
5350
GET_STATUS: str = "getstatus"

etherscan/enums/fields_enum.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class FieldsEnum:
1212
CLIENT_TYPE: str = "&clienttype="
1313
CLOSEST: str = "&closest="
1414
CONTRACT_ADDRESS: str = "&contractaddress="
15+
CONTRACT_ADDRESSES: str = "&contractaddresses="
1516
DATA: str = "&data="
1617
END_BLOCK: str = "&endblock="
1718
END_DATE: str = "&enddate="

etherscan/enums/modules_enum.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@ class ModulesEnum:
1111
STATS: str = "stats"
1212
TOKEN: str = "token"
1313
TRANSACTION: str = "transaction"
14-

0 commit comments

Comments
 (0)