-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
Copy pathrevert_contract.py
58 lines (57 loc) · 4.24 KB
/
revert_contract.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
"""
Generated by `compile_contracts.py` script.
Compiled with Solidity v0.8.17.
"""
# source: web3/_utils/contract_sources/RevertContract.sol:RevertContract
REVERT_CONTRACT_BYTECODE = "0x608060405234801561001057600080fd5b506102ad806100206000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c8063185c38a41461005c578063bc53eca814610066578063c06a97cb14610070578063d67e4b841461007a578063e766d49814610098575b600080fd5b6100646100a2565b005b61006e6100dd565b005b610078610118565b005b61008261011d565b60405161008f9190610173565b60405180910390f35b6100a0610126565b005b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100d4906101eb565b60405180910390fd5b6040517f9553947a00000000000000000000000000000000000000000000000000000000815260040161010f90610257565b60405180910390fd5b600080fd5b60006001905090565b6040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008115159050919050565b61016d81610158565b82525050565b60006020820190506101886000830184610164565b92915050565b600082825260208201905092915050565b7f46756e6374696f6e20686173206265656e2072657665727465642e0000000000600082015250565b60006101d5601b8361018e565b91506101e08261019f565b602082019050919050565b60006020820190508181036000830152610204816101c8565b9050919050565b7f596f7520617265206e6f7420617574686f72697a656400000000000000000000600082015250565b600061024160168361018e565b915061024c8261020b565b602082019050919050565b6000602082019050818103600083015261027081610234565b905091905056fea2646970667358221220c90b36e5aeee601ff5cbcb4c09ca883f8fb491dcd68715bfe22db08d2cd76bd064736f6c63430008110033" # noqa: E501
REVERT_CONTRACT_RUNTIME = "0x608060405234801561001057600080fd5b50600436106100575760003560e01c8063185c38a41461005c578063bc53eca814610066578063c06a97cb14610070578063d67e4b841461007a578063e766d49814610098575b600080fd5b6100646100a2565b005b61006e6100dd565b005b610078610118565b005b61008261011d565b60405161008f9190610173565b60405180910390f35b6100a0610126565b005b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100d4906101eb565b60405180910390fd5b6040517f9553947a00000000000000000000000000000000000000000000000000000000815260040161010f90610257565b60405180910390fd5b600080fd5b60006001905090565b6040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008115159050919050565b61016d81610158565b82525050565b60006020820190506101886000830184610164565b92915050565b600082825260208201905092915050565b7f46756e6374696f6e20686173206265656e2072657665727465642e0000000000600082015250565b60006101d5601b8361018e565b91506101e08261019f565b602082019050919050565b60006020820190508181036000830152610204816101c8565b9050919050565b7f596f7520617265206e6f7420617574686f72697a656400000000000000000000600082015250565b600061024160168361018e565b915061024c8261020b565b602082019050919050565b6000602082019050818103600083015261027081610234565b905091905056fea2646970667358221220c90b36e5aeee601ff5cbcb4c09ca883f8fb491dcd68715bfe22db08d2cd76bd064736f6c63430008110033" # noqa: E501
REVERT_CONTRACT_ABI = [
{"inputs": [], "name": "Unauthorized", "type": "error"},
{
"inputs": [
{"internalType": "string", "name": "errorMessage", "type": "string"}
],
"name": "UnauthorizedWithMessage",
"type": "error",
},
{
"inputs": [],
"name": "customErrorWithMessage",
"outputs": [],
"stateMutability": "pure",
"type": "function",
},
{
"inputs": [],
"name": "customErrorWithoutMessage",
"outputs": [],
"stateMutability": "pure",
"type": "function",
},
{
"inputs": [],
"name": "normalFunction",
"outputs": [{"internalType": "bool", "name": "", "type": "bool"}],
"stateMutability": "pure",
"type": "function",
},
{
"inputs": [],
"name": "revertWithMessage",
"outputs": [],
"stateMutability": "pure",
"type": "function",
},
{
"inputs": [],
"name": "revertWithoutMessage",
"outputs": [],
"stateMutability": "pure",
"type": "function",
},
]
REVERT_CONTRACT_DATA = {
"bytecode": REVERT_CONTRACT_BYTECODE,
"bytecode_runtime": REVERT_CONTRACT_RUNTIME,
"abi": REVERT_CONTRACT_ABI,
}