-
Notifications
You must be signed in to change notification settings - Fork 40
/
util_test.go
231 lines (205 loc) · 146 KB
/
util_test.go
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
package seth_test
import (
"context"
"errors"
"math/big"
"sync"
"testing"
"time"
"github.com/stretchr/testify/require"
"github.com/smartcontractkit/chainlink-testing-framework/seth"
network_sub_contract "github.com/smartcontractkit/chainlink-testing-framework/seth/contracts/bind/NetworkDebugSubContract"
)
func TestUtilDecodePragmaVersion(t *testing.T) {
tests := []struct {
name string
bytecode string
expectedResult seth.Pragma
expectedError error
}{
{
name: "Valid Bytecode [NetworkDebugContract]",
bytecode: "60806040523480156200001157600080fd5b50604051620034c2380380620034c28339818101604052810190620000379190620000e9565b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506200011b565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000b18262000084565b9050919050565b620000c381620000a4565b8114620000cf57600080fd5b50565b600081519050620000e381620000b8565b92915050565b6000602082840312156200010257620001016200007f565b5b60006200011284828501620000d2565b91505092915050565b613397806200012b6000396000f3fe60806040526004361061028c5760003560e01c80637f12881c1161015a578063b600141f116100c1578063e8116e281161007a578063e8116e2814610a2f578063ec5c3ede14610a6c578063ef8a923514610aa9578063f3396bd914610ad4578063f499af2a14610afd578063fbcb8d0714610b3a576102cc565b8063b600141f1461091e578063c0d06d8914610935578063c2124b2214610960578063d7a8020514610977578063e1111f79146109b5578063e5c19b2d146109f2576102cc565b806395a81a4c1161011357806395a81a4c1461082057806399adad2e146108375780639e09965214610874578063a4c0ed36146108b3578063aa3fdcf4146108dc578063ad3de14c146108f3576102cc565b80637f12881c146107235780637fdc8fe11461076057806381b375a01461079d5780638db611be146107c65780638f856296146107f25780639349d00b14610809576102cc565b80633837a75e116101fe5780635e9c80d6116101b75780635e9c80d61461064a5780636284117d1461066157806362c270e11461069e5780636d4ce63c146106b55780637014c81d146106e0578063788c47721461070c576102cc565b80633837a75e146104db5780633e41f1351461051857806345f0c9e61461055557806348ad9fe81461059357806358379d71146105d05780635921483f1461060d576102cc565b8063235157601161025057806323515760146103a5578063256560d5146103e25780632a1afcd9146103f95780632e49d78b1461042457806330985bcc1461046157806333311ef31461049e576102cc565b806306595f751461030757806311b3c4781461031e57806312d91233146103475780631b9265b8146103845780631e31d0a81461038e576102cc565b366102cc577f59e04c3f0d44b7caf6e8ef854b61d9a51cf1960d7a88ff6356cc5e946b4b583233346040516102c2929190611a20565b60405180910390a1005b7f1e57e3bb474320be3d2c77138f75b7c3941292d647f5f9634e33a8e94e0e069b33346040516102fd929190611a5c565b60405180910390a1005b34801561031357600080fd5b5061031c610b77565b005b34801561032a57600080fd5b5061034560048036038101906103409190611ac5565b610bba565b005b34801561035357600080fd5b5061036e60048036038101906103699190611c5e565b610c4d565b60405161037b9190611d65565b60405180910390f35b61038c610d0c565b005b34801561039a57600080fd5b506103a3610d0e565b005b3480156103b157600080fd5b506103cc60048036038101906103c79190611dbd565b610d55565b6040516103d99190611e0c565b60405180910390f35b3480156103ee57600080fd5b506103f7610d8a565b005b34801561040557600080fd5b5061040e610d9b565b60405161041b9190611e0c565b60405180910390f35b34801561043057600080fd5b5061044b60048036038101906104469190611e4c565b610da1565b6040516104589190611ef0565b60405180910390f35b34801561046d57600080fd5b5061048860048036038101906104839190611dbd565b610e23565b6040516104959190611e0c565b60405180910390f35b3480156104aa57600080fd5b506104c560048036038101906104c09190611f41565b610f05565b6040516104d29190611f7d565b60405180910390f35b3480156104e757600080fd5b5061050260048036038101906104fd9190611dbd565b610f0f565b60405161050f9190611e0c565b60405180910390f35b34801561052457600080fd5b5061053f600480360381019061053a9190611dbd565b61101a565b60405161054c9190611e0c565b60405180910390f35b34801561056157600080fd5b5061057c6004803603810190610577919061204d565b611115565b60405161058a929190612117565b60405180910390f35b34801561059f57600080fd5b506105ba60048036038101906105b59190612173565b611126565b6040516105c79190611e0c565b60405180910390f35b3480156105dc57600080fd5b506105f760048036038101906105f29190611dbd565b61113e565b6040516106049190611e0c565b60405180910390f35b34801561061957600080fd5b50610634600480360381019061062f91906121a0565b611239565b6040516106419190611e0c565b60405180910390f35b34801561065657600080fd5b5061065f611256565b005b34801561066d57600080fd5b50610688600480360381019061068391906121a0565b611297565b6040516106959190611e0c565b60405180910390f35b3480156106aa57600080fd5b506106b36112af565b005b3480156106c157600080fd5b506106ca611343565b6040516106d79190611e0c565b60405180910390f35b3480156106ec57600080fd5b506106f561134c565b604051610703929190612117565b60405180910390f35b34801561071857600080fd5b50610721611391565b005b34801561072f57600080fd5b5061074a600480360381019061074591906121f1565b6113c8565b60405161075791906123d0565b60405180910390f35b34801561076c57600080fd5b5061078760048036038101906107829190612411565b6113e1565b604051610794919061261e565b60405180910390f35b3480156107a957600080fd5b506107c460048036038101906107bf919061204d565b6113ea565b005b3480156107d257600080fd5b506107db6113ee565b6040516107e9929190612117565b60405180910390f35b3480156107fe57600080fd5b50610807611433565b005b34801561081557600080fd5b5061081e611463565b005b34801561082c57600080fd5b5061083561146d565b005b34801561084357600080fd5b5061085e60048036038101906108599190612662565b6114a6565b60405161086b9190612761565b60405180910390f35b34801561088057600080fd5b5061089b600480360381019061089691906127bc565b611551565b6040516108aa9392919061281e565b60405180910390f35b3480156108bf57600080fd5b506108da60048036038101906108d591906128b0565b611568565b005b3480156108e857600080fd5b506108f16115a9565b005b3480156108ff57600080fd5b506109086115f2565b6040516109159190611e0c565b60405180910390f35b34801561092a57600080fd5b50610933611639565b005b34801561094157600080fd5b5061094a61166b565b6040516109579190612983565b60405180910390f35b34801561096c57600080fd5b50610975611691565b005b34801561098357600080fd5b5061099e6004803603810190610999919061204d565b6116e3565b6040516109ac929190612117565b60405180910390f35b3480156109c157600080fd5b506109dc60048036038101906109d79190612a61565b6116f4565b6040516109e99190612b68565b60405180910390f35b3480156109fe57600080fd5b50610a196004803603810190610a1491906121a0565b6116fe565b604051610a269190611e0c565b60405180910390f35b348015610a3b57600080fd5b50610a566004803603810190610a5191906121a0565b61170f565b604051610a639190611e0c565b60405180910390f35b348015610a7857600080fd5b50610a936004803603810190610a8e9190612173565b61175d565b604051610aa09190612b8a565b60405180910390f35b348015610ab557600080fd5b50610abe611767565b604051610acb9190611ef0565b60405180910390f35b348015610ae057600080fd5b50610afb6004803603810190610af691906121a0565b61177a565b005b348015610b0957600080fd5b50610b246004803603810190610b1f9190612411565b611796565b604051610b3191906123d0565b60405180910390f35b348015610b4657600080fd5b50610b616004803603810190610b5c91906121a0565b6118cb565b604051610b6e9190611e0c565b60405180910390f35b6000610bb8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610baf90612bf1565b60405180910390fd5b565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166311abb00283836040518363ffffffff1660e01b8152600401610c17929190612c11565b600060405180830381600087803b158015610c3157600080fd5b505af1158015610c45573d6000803e3d6000fd5b505050505050565b60606000825167ffffffffffffffff811115610c6c57610c6b611b1b565b5b604051908082528060200260200182016040528015610c9a5781602001602082028036833780820191505090505b50905060005b8351811015610d02576001848281518110610cbe57610cbd612c3a565b5b6020026020010151610cd09190612c98565b828281518110610ce357610ce2612c3a565b5b6020026020010181815250508080610cfa90612ccc565b915050610ca0565b5080915050919050565b565b3373ffffffffffffffffffffffffffffffffffffffff1660017f33b47a1cd66813164ec00800d74296f57415217c22505ee380594a712936a0b560405160405180910390a3565b600081600260008581526020019081526020016000206000828254610d7a9190612d14565b9250508190555081905092915050565b6000610d9957610d98612d58565b5b565b60005481565b600081600360146101000a81548160ff02191690836003811115610dc857610dc7611e79565b5b0217905550600360149054906101000a900460ff166003811115610def57610dee611e79565b5b7fbea054406fdf249b05d1aef1b5f848d62d902d94389fca702b2d8337677c359a60405160405180910390a2819050919050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663047c4425836040518263ffffffff1660e01b8152600401610e809190611e0c565b6020604051808303816000875af1158015610e9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec39190612d9c565b50827feace1be0b97ec11f959499c07b9f60f0cc47bf610b28fda8fb0e970339cf3b3560405160405180910390a28183610efd9190612d14565b905092915050565b6000819050919050565b6000600282610f1e9190612d14565b9150600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fa8fca7a84846040518363ffffffff1660e01b8152600401610f7d929190612dc9565b6020604051808303816000875af1158015610f9c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc09190612d9c565b503373ffffffffffffffffffffffffffffffffffffffff1660017f33b47a1cd66813164ec00800d74296f57415217c22505ee380594a712936a0b560405160405180910390a381836110129190612d14565b905092915050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633e41f13584846040518363ffffffff1660e01b8152600401611079929190612dc9565b6020604051808303816000875af1158015611098573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110bc9190612d9c565b503373ffffffffffffffffffffffffffffffffffffffff16827f33b47a1cd66813164ec00800d74296f57415217c22505ee380594a712936a0b560405160405180910390a3818361110d9190612d14565b905092915050565b600060608383915091509250929050565b60016020528060005260406000206000915090505481565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633e41f13584846040518363ffffffff1660e01b815260040161119d929190612dc9565b6020604051808303816000875af11580156111bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111e09190612d9c565b503373ffffffffffffffffffffffffffffffffffffffff16827f33b47a1cd66813164ec00800d74296f57415217c22505ee380594a712936a0b560405160405180910390a381836112319190612d14565b905092915050565b600060026000838152602001908152602001600020549050919050565b600c60156040517f4a2eaf7e00000000000000000000000000000000000000000000000000000000815260040161128e929190612e68565b60405180910390fd5b60026020528060005260406000206000915090505481565b7febe3ff7e2071d351bf2e65b4fccd24e3ae99485f02468f1feecf7d64dc04418860405180606001604052806040518060400160405280600481526020017f4a6f686e000000000000000000000000000000000000000000000000000000008152508152602001600567ffffffffffffffff168152602001600a8152506040516113399190612f04565b60405180910390a1565b60008054905090565b60006060617a696040518060400160405280600a81526020017f6f757470757456616c3100000000000000000000000000000000000000000000815250915091509091565b7f25b7adba1b046a19379db4bc06aa1f2e71604d7b599a0ee8783d58110f00e16a6040516113be90612f72565b60405180910390a1565b6113d0611902565b816113da9061314d565b9050919050565b36819050919050565b5050565b60006060617a696040518060400160405280600a81526020017f6f757470757456616c3100000000000000000000000000000000000000000000815250915091509091565b60537feace1be0b97ec11f959499c07b9f60f0cc47bf610b28fda8fb0e970339cf3b3560405160405180910390a2565b61146b611256565b565b7f33bc9bae48dbe1e057f264b3fc6a1dacdcceacb3ba28d937231c70e068a02f1c3360405161149c9190612b8a565b60405180910390a1565b6114ae611922565b6114b6611922565b826000600381106114ca576114c9612c3a565b5b6020028101906114da919061316f565b6114e390613197565b816000600281106114f7576114f6612c3a565b5b60200201819052508260016003811061151357611512612c3a565b5b602002810190611523919061316f565b61152c90613197565b816001600281106115405761153f612c3a565b5b602002018190525080915050919050565b600080600085858592509250925093509350939050565b606460656040517f4a2eaf7e0000000000000000000000000000000000000000000000000000000081526004016115a0929190613220565b60405180910390fd5b60033373ffffffffffffffffffffffffffffffffffffffff1660017f5660e8f93f0146f45abcd659e026b75995db50053cbbca4d7f365934ade68bf360405160405180910390a4565b6000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905090565b6040517fa0c2d2db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60033373ffffffffffffffffffffffffffffffffffffffff1660027f56c2ea44ba516098cee0c181dd9d8db262657368b6e911e83ae0ccfae806c73d6040516116d990613295565b60405180910390a4565b600060608383915091509250929050565b6060819050919050565b600081600081905550819050919050565b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550819050919050565b6000819050919050565b600360149054906101000a900460ff1681565b6000600260008381526020019081526020016000208190555050565b61179e611902565b60008280600001906117b091906132b5565b6040516020016117c1929190613348565b6040516020818303038152906040528051906020012090506000602067ffffffffffffffff8111156117f6576117f5611b1b565b5b6040519080825280601f01601f1916602001820160405280156118285781602001600182028036833780820191505090505b50905060005b60208110156118a35782816020811061184a57611849612c3a565b5b1a60f81b82828151811061186157611860612c3a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350808061189b90612ccc565b91505061182e565b506040518060400160405280856118b990613197565b81526020018281525092505050919050565b6000817fb16dba9242e1aa07ccc47228094628f72c8cc9699ee45d5bc8d67b84d3038c6860405160405180910390a2819050919050565b604051806040016040528061191561194f565b8152602001606081525090565b60405180604001604052806002905b61193961194f565b8152602001906001900390816119315790505090565b604051806040016040528060608152602001606081525090565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061199482611969565b9050919050565b6119a481611989565b82525050565b6000819050919050565b6119bd816119aa565b82525050565b600082825260208201905092915050565b7f5265636569766564204574686572000000000000000000000000000000000000600082015250565b6000611a0a600e836119c3565b9150611a15826119d4565b602082019050919050565b6000606082019050611a35600083018561199b565b611a4260208301846119b4565b8181036040830152611a53816119fd565b90509392505050565b6000604082019050611a71600083018561199b565b611a7e60208301846119b4565b9392505050565b6000604051905090565b600080fd5b600080fd5b611aa2816119aa565b8114611aad57600080fd5b50565b600081359050611abf81611a99565b92915050565b60008060408385031215611adc57611adb611a8f565b5b6000611aea85828601611ab0565b9250506020611afb85828601611ab0565b9150509250929050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611b5382611b0a565b810181811067ffffffffffffffff82111715611b7257611b71611b1b565b5b80604052505050565b6000611b85611a85565b9050611b918282611b4a565b919050565b600067ffffffffffffffff821115611bb157611bb0611b1b565b5b602082029050602081019050919050565b600080fd5b6000611bda611bd584611b96565b611b7b565b90508083825260208201905060208402830185811115611bfd57611bfc611bc2565b5b835b81811015611c265780611c128882611ab0565b845260208401935050602081019050611bff565b5050509392505050565b600082601f830112611c4557611c44611b05565b5b8135611c55848260208601611bc7565b91505092915050565b600060208284031215611c7457611c73611a8f565b5b600082013567ffffffffffffffff811115611c9257611c91611a94565b5b611c9e84828501611c30565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b611cdc816119aa565b82525050565b6000611cee8383611cd3565b60208301905092915050565b6000602082019050919050565b6000611d1282611ca7565b611d1c8185611cb2565b9350611d2783611cc3565b8060005b83811015611d58578151611d3f8882611ce2565b9750611d4a83611cfa565b925050600181019050611d2b565b5085935050505092915050565b60006020820190508181036000830152611d7f8184611d07565b905092915050565b6000819050919050565b611d9a81611d87565b8114611da557600080fd5b50565b600081359050611db781611d91565b92915050565b60008060408385031215611dd457611dd3611a8f565b5b6000611de285828601611da8565b9250506020611df385828601611da8565b9150509250929050565b611e0681611d87565b82525050565b6000602082019050611e216000830184611dfd565b92915050565b60048110611e3457600080fd5b50565b600081359050611e4681611e27565b92915050565b600060208284031215611e6257611e61611a8f565b5b6000611e7084828501611e37565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60048110611eb957611eb8611e79565b5b50565b6000819050611eca82611ea8565b919050565b6000611eda82611ebc565b9050919050565b611eea81611ecf565b82525050565b6000602082019050611f056000830184611ee1565b92915050565b6000819050919050565b611f1e81611f0b565b8114611f2957600080fd5b50565b600081359050611f3b81611f15565b92915050565b600060208284031215611f5757611f56611a8f565b5b6000611f6584828501611f2c565b91505092915050565b611f7781611f0b565b82525050565b6000602082019050611f926000830184611f6e565b92915050565b600080fd5b600067ffffffffffffffff821115611fb857611fb7611b1b565b5b611fc182611b0a565b9050602081019050919050565b82818337600083830152505050565b6000611ff0611feb84611f9d565b611b7b565b90508281526020810184848401111561200c5761200b611f98565b5b612017848285611fce565b509392505050565b600082601f83011261203457612033611b05565b5b8135612044848260208601611fdd565b91505092915050565b6000806040838503121561206457612063611a8f565b5b600061207285828601611ab0565b925050602083013567ffffffffffffffff81111561209357612092611a94565b5b61209f8582860161201f565b9150509250929050565b600081519050919050565b60005b838110156120d25780820151818401526020810190506120b7565b60008484015250505050565b60006120e9826120a9565b6120f381856119c3565b93506121038185602086016120b4565b61210c81611b0a565b840191505092915050565b600060408201905061212c60008301856119b4565b818103602083015261213e81846120de565b90509392505050565b61215081611989565b811461215b57600080fd5b50565b60008135905061216d81612147565b92915050565b60006020828403121561218957612188611a8f565b5b60006121978482850161215e565b91505092915050565b6000602082840312156121b6576121b5611a8f565b5b60006121c484828501611da8565b91505092915050565b600080fd5b6000604082840312156121e8576121e76121cd565b5b81905092915050565b60006020828403121561220757612206611a8f565b5b600082013567ffffffffffffffff81111561222557612224611a94565b5b612231848285016121d2565b91505092915050565b600082825260208201905092915050565b6000612256826120a9565b612260818561223a565b93506122708185602086016120b4565b61227981611b0a565b840191505092915050565b600082825260208201905092915050565b60006122a082611ca7565b6122aa8185612284565b93506122b583611cc3565b8060005b838110156122e65781516122cd8882611ce2565b97506122d883611cfa565b9250506001810190506122b9565b5085935050505092915050565b60006040830160008301518482036000860152612310828261224b565b9150506020830151848203602086015261232a8282612295565b9150508091505092915050565b600081519050919050565b600082825260208201905092915050565b600061235e82612337565b6123688185612342565b93506123788185602086016120b4565b61238181611b0a565b840191505092915050565b600060408301600083015184820360008601526123a982826122f3565b915050602083015184820360208601526123c38282612353565b9150508091505092915050565b600060208201905081810360008301526123ea818461238c565b905092915050565b600060408284031215612408576124076121cd565b5b81905092915050565b60006020828403121561242757612426611a8f565b5b600082013567ffffffffffffffff81111561244557612444611a94565b5b612451848285016123f2565b91505092915050565b600080fd5b600080fd5b600080fd5b6000808335600160200384360303811261248657612485612464565b5b83810192508235915060208301925067ffffffffffffffff8211156124ae576124ad61245a565b5b6001820236038313156124c4576124c361245f565b5b509250929050565b60006124d8838561223a565b93506124e5838584611fce565b6124ee83611b0a565b840190509392505050565b6000808335600160200384360303811261251657612515612464565b5b83810192508235915060208301925067ffffffffffffffff82111561253e5761253d61245a565b5b6020820236038313156125545761255361245f565b5b509250929050565b600080fd5b82818337505050565b60006125768385612284565b93507f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8311156125a9576125a861255c565b5b6020830292506125ba838584612561565b82840190509392505050565b6000604083016125d96000840184612469565b85830360008701526125ec8382846124cc565b925050506125fd60208401846124f9565b858303602087015261261083828461256a565b925050508091505092915050565b6000602082019050818103600083015261263881846125c6565b905092915050565b60008190508260206003028201111561265c5761265b611bc2565b5b92915050565b60006020828403121561267857612677611a8f565b5b600082013567ffffffffffffffff81111561269657612695611a94565b5b6126a284828501612640565b91505092915050565b600060029050919050565b600081905092915050565b6000819050919050565b60006126d783836122f3565b905092915050565b6000602082019050919050565b60006126f7826126ab565b61270181856126b6565b935083602082028501612713856126c1565b8060005b8581101561274f578484038952815161273085826126cb565b945061273b836126df565b925060208a01995050600181019050612717565b50829750879550505050505092915050565b6000602082019050818103600083015261277b81846126ec565b905092915050565b600081600f0b9050919050565b61279981612783565b81146127a457600080fd5b50565b6000813590506127b681612790565b92915050565b6000806000606084860312156127d5576127d4611a8f565b5b60006127e386828701611da8565b93505060206127f4868287016127a7565b925050604061280586828701611ab0565b9150509250925092565b61281881612783565b82525050565b60006060820190506128336000830186611dfd565b612840602083018561280f565b61284d60408301846119b4565b949350505050565b600080fd5b60008083601f8401126128705761286f611b05565b5b8235905067ffffffffffffffff81111561288d5761288c612855565b5b6020830191508360018202830111156128a9576128a8611bc2565b5b9250929050565b600080600080606085870312156128ca576128c9611a8f565b5b60006128d88782880161215e565b94505060206128e987828801611ab0565b935050604085013567ffffffffffffffff81111561290a57612909611a94565b5b6129168782880161285a565b925092505092959194509250565b6000819050919050565b600061294961294461293f84611969565b612924565b611969565b9050919050565b600061295b8261292e565b9050919050565b600061296d82612950565b9050919050565b61297d81612962565b82525050565b60006020820190506129986000830184612974565b92915050565b600067ffffffffffffffff8211156129b9576129b8611b1b565b5b602082029050602081019050919050565b60006129dd6129d88461299e565b611b7b565b90508083825260208201905060208402830185811115612a00576129ff611bc2565b5b835b81811015612a295780612a15888261215e565b845260208401935050602081019050612a02565b5050509392505050565b600082601f830112612a4857612a47611b05565b5b8135612a588482602086016129ca565b91505092915050565b600060208284031215612a7757612a76611a8f565b5b600082013567ffffffffffffffff811115612a9557612a94611a94565b5b612aa184828501612a33565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612adf81611989565b82525050565b6000612af18383612ad6565b60208301905092915050565b6000602082019050919050565b6000612b1582612aaa565b612b1f8185612ab5565b9350612b2a83612ac6565b8060005b83811015612b5b578151612b428882612ae5565b9750612b4d83612afd565b925050600181019050612b2e565b5085935050505092915050565b60006020820190508181036000830152612b828184612b0a565b905092915050565b6000602082019050612b9f600083018461199b565b92915050565b7f616c7761797320726576657274206572726f7200000000000000000000000000600082015250565b6000612bdb6013836119c3565b9150612be682612ba5565b602082019050919050565b60006020820190508181036000830152612c0a81612bce565b9050919050565b6000604082019050612c2660008301856119b4565b612c3360208301846119b4565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612ca3826119aa565b9150612cae836119aa565b9250828201905080821115612cc657612cc5612c69565b5b92915050565b6000612cd7826119aa565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612d0957612d08612c69565b5b600182019050919050565b6000612d1f82611d87565b9150612d2a83611d87565b925082820190508281121560008312168382126000841215161715612d5257612d51612c69565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b600081519050612d9681611d91565b92915050565b600060208284031215612db257612db1611a8f565b5b6000612dc084828501612d87565b91505092915050565b6000604082019050612dde6000830185611dfd565b612deb6020830184611dfd565b9392505050565b6000819050919050565b6000612e17612e12612e0d84612df2565b612924565b6119aa565b9050919050565b612e2781612dfc565b82525050565b6000819050919050565b6000612e52612e4d612e4884612e2d565b612924565b6119aa565b9050919050565b612e6281612e37565b82525050565b6000604082019050612e7d6000830185612e1e565b612e8a6020830184612e59565b9392505050565b600067ffffffffffffffff82169050919050565b612eae81612e91565b82525050565b60006060830160008301518482036000860152612ed1828261224b565b9150506020830151612ee66020860182612ea5565b506040830151612ef96040860182611cd3565b508091505092915050565b60006020820190508181036000830152612f1e8184612eb4565b905092915050565b7f6d79537472696e67000000000000000000000000000000000000000000000000600082015250565b6000612f5c6008836119c3565b9150612f6782612f26565b602082019050919050565b60006020820190508181036000830152612f8b81612f4f565b9050919050565b600080fd5b600080fd5b600060408284031215612fb257612fb1612f92565b5b612fbc6040611b7b565b9050600082013567ffffffffffffffff811115612fdc57612fdb612f97565b5b612fe88482850161201f565b600083015250602082013567ffffffffffffffff81111561300c5761300b612f97565b5b61301884828501611c30565b60208301525092915050565b600067ffffffffffffffff82111561303f5761303e611b1b565b5b61304882611b0a565b9050602081019050919050565b600061306861306384613024565b611b7b565b90508281526020810184848401111561308457613083611f98565b5b61308f848285611fce565b509392505050565b600082601f8301126130ac576130ab611b05565b5b81356130bc848260208601613055565b91505092915050565b6000604082840312156130db576130da612f92565b5b6130e56040611b7b565b9050600082013567ffffffffffffffff81111561310557613104612f97565b5b61311184828501612f9c565b600083015250602082013567ffffffffffffffff81111561313557613134612f97565b5b61314184828501613097565b60208301525092915050565b600061315936836130c5565b9050919050565b600080fd5b600080fd5b600080fd5b60008235600160400383360303811261318b5761318a613160565b5b80830191505092915050565b60006131a33683612f9c565b9050919050565b6000819050919050565b60006131cf6131ca6131c5846131aa565b612924565b6119aa565b9050919050565b6131df816131b4565b82525050565b6000819050919050565b600061320a613205613200846131e5565b612924565b6119aa565b9050919050565b61321a816131ef565b82525050565b600060408201905061323560008301856131d6565b6132426020830184613211565b9392505050565b7f736f6d6520696400000000000000000000000000000000000000000000000000600082015250565b600061327f6007836119c3565b915061328a82613249565b602082019050919050565b600060208201905081810360008301526132ae81613272565b9050919050565b600080833560016020038436030381126132d2576132d1613160565b5b80840192508235915067ffffffffffffffff8211156132f4576132f3613165565b5b6020830192506001820236038313156133105761330f61316a565b5b509250929050565b600081905092915050565b600061332f8385613318565b935061333c838584611fce565b82840190509392505050565b6000613355828486613323565b9150819050939250505056fea2646970667358221220dc16dcd20c7af4f539a58c96a664274d4c0fc03491d985f587a4b31d25c9774364736f6c63430008130033",
expectedResult: seth.Pragma{Major: 0, Minor: 8, Patch: 19},
expectedError: nil,
},
{
name: "Valid Bytecode [modern LinkToken]",
bytecode: "60c06040523480156200001157600080fd5b506040518060400160405280600f81526020016e21b430b4b72634b735902a37b5b2b760891b815250604051806040016040528060048152602001634c494e4b60e01b81525060126b033b2e3c9fd0803ce8000000338060008686818181600390816200007f91906200028c565b5060046200008e82826200028c565b5050506001600160a01b0384169150620000f190505760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600580546001600160a01b0319166001600160a01b0384811691909117909155811615620001245762000124816200013b565b50505060ff90911660805260a05250620003589050565b336001600160a01b03821603620001955760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401620000e8565b600680546001600160a01b0319166001600160a01b03838116918217909255600554604051919216907fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae127890600090a350565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200021257607f821691505b6020821081036200023357634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200028757600081815260208120601f850160051c81016020861015620002625750805b601f850160051c820191505b8181101562000283578281556001016200026e565b5050505b505050565b81516001600160401b03811115620002a857620002a8620001e7565b620002c081620002b98454620001fd565b8462000239565b602080601f831160018114620002f85760008415620002df5750858301515b600019600386901b1c1916600185901b17855562000283565b600085815260208120601f198616915b82811015620003295788860151825594840194600190910190840162000308565b5085821015620003485787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a051611e4c6200038c60003960008181610447015281816108c301526108ed015260006102710152611e4c6000f3fe608060405234801561001057600080fd5b50600436106101f05760003560e01c806379cc67901161010f578063c2e3273d116100a2578063d73dd62311610071578063d73dd6231461046b578063dd62ed3e1461047e578063f2fde38b146104c4578063f81094f3146104d757600080fd5b8063c2e3273d1461040c578063c630948d1461041f578063c64d0ebc14610432578063d5abeb011461044557600080fd5b80639dc29fac116100de5780639dc29fac146103c0578063a457c2d7146103d3578063a9059cbb146103e6578063aa271e1a146103f957600080fd5b806379cc67901461037557806386fe8b43146103885780638da5cb5b1461039057806395d89b41146103b857600080fd5b806340c10f19116101875780636618846311610156578063661884631461030f5780636b32810b1461032257806370a082311461033757806379ba50971461036d57600080fd5b806340c10f19146102c157806342966c68146102d65780634334614a146102e95780634f5632f8146102fc57600080fd5b806323b872dd116101c357806323b872dd14610257578063313ce5671461026a578063395093511461029b5780634000aea0146102ae57600080fd5b806301ffc9a7146101f557806306fdde031461021d578063095ea7b31461023257806318160ddd14610245575b600080fd5b6102086102033660046119b9565b6104ea565b60405190151581526020015b60405180910390f35b61022561061b565b6040516102149190611a5f565b610208610240366004611a9b565b6106ad565b6002545b604051908152602001610214565b610208610265366004611ac5565b6106c5565b60405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152602001610214565b6102086102a9366004611a9b565b6106e9565b6102086102bc366004611b30565b610735565b6102d46102cf366004611a9b565b610858565b005b6102d46102e4366004611c19565b61097f565b6102086102f7366004611c32565b6109cc565b6102d461030a366004611c32565b6109d9565b61020861031d366004611a9b565b610a35565b61032a610a48565b6040516102149190611c4d565b610249610345366004611c32565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b6102d4610a59565b6102d4610383366004611a9b565b610b5a565b61032a610ba9565b60055460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610214565b610225610bb5565b6102d46103ce366004611a9b565b610bc4565b6102086103e1366004611a9b565b610bce565b6102086103f4366004611a9b565b610c9f565b610208610407366004611c32565b610cad565b6102d461041a366004611c32565b610cba565b6102d461042d366004611c32565b610d16565b6102d4610440366004611c32565b610d24565b7f0000000000000000000000000000000000000000000000000000000000000000610249565b6102d4610479366004611a9b565b610d80565b61024961048c366004611ca7565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b6102d46104d2366004611c32565b610d8a565b6102d46104e5366004611c32565b610d9b565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f36372b0700000000000000000000000000000000000000000000000000000000148061057d57507fffffffff0000000000000000000000000000000000000000000000000000000082167f4000aea000000000000000000000000000000000000000000000000000000000145b806105c957507fffffffff0000000000000000000000000000000000000000000000000000000082167fe6599b4d00000000000000000000000000000000000000000000000000000000145b8061061557507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b60606003805461062a90611cda565b80601f016020809104026020016040519081016040528092919081815260200182805461065690611cda565b80156106a35780601f10610678576101008083540402835291602001916106a3565b820191906000526020600020905b81548152906001019060200180831161068657829003601f168201915b5050505050905090565b6000336106bb818585610df7565b5060019392505050565b6000336106d3858285610e2b565b6106de858585610efc565b506001949350505050565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684529091528120549091906106bb9082908690610730908790611d5c565b610df7565b60006107418484610c9f565b508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c1685856040516107a1929190611d6f565b60405180910390a373ffffffffffffffffffffffffffffffffffffffff84163b156106bb576040517fa4c0ed3600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063a4c0ed369061081c90339087908790600401611d90565b600060405180830381600087803b15801561083657600080fd5b505af115801561084a573d6000803e3d6000fd5b505050505060019392505050565b61086133610cad565b61089e576040517fe2c8c9d50000000000000000000000000000000000000000000000000000000081523360048201526024015b60405180910390fd5b813073ffffffffffffffffffffffffffffffffffffffff8216036108c157600080fd5b7f00000000000000000000000000000000000000000000000000000000000000001580159061092257507f00000000000000000000000000000000000000000000000000000000000000008261091660025490565b6109209190611d5c565b115b15610970578161093160025490565b61093b9190611d5c565b6040517fcbbf111300000000000000000000000000000000000000000000000000000000815260040161089591815260200190565b61097a8383610f2a565b505050565b610988336109cc565b6109c0576040517fc820b10b000000000000000000000000000000000000000000000000000000008152336004820152602401610895565b6109c98161101d565b50565b6000610615600983611027565b6109e1611056565b6109ec6009826110d9565b156109c95760405173ffffffffffffffffffffffffffffffffffffffff8216907f0a675452746933cefe3d74182e78db7afe57ba60eaa4234b5d85e9aa41b0610c90600090a250565b6000610a418383610bce565b9392505050565b6060610a5460076110fb565b905090565b60065473ffffffffffffffffffffffffffffffffffffffff163314610ada576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610895565b600580547fffffffffffffffffffffffff00000000000000000000000000000000000000008082163390811790935560068054909116905560405173ffffffffffffffffffffffffffffffffffffffff909116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350565b610b63336109cc565b610b9b576040517fc820b10b000000000000000000000000000000000000000000000000000000008152336004820152602401610895565b610ba58282611108565b5050565b6060610a5460096110fb565b60606004805461062a90611cda565b610ba58282610b5a565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490919083811015610c92576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610895565b6106de8286868403610df7565b6000336106bb818585610efc565b6000610615600783611027565b610cc2611056565b610ccd60078261111d565b156109c95760405173ffffffffffffffffffffffffffffffffffffffff8216907fe46fef8bbff1389d9010703cf8ebb363fb3daf5bf56edc27080b67bc8d9251ea90600090a250565b610d1f81610cba565b6109c9815b610d2c611056565b610d3760098261111d565b156109c95760405173ffffffffffffffffffffffffffffffffffffffff8216907f92308bb7573b2a3d17ddb868b39d8ebec433f3194421abc22d084f89658c9bad90600090a250565b61097a82826106e9565b610d92611056565b6109c98161113f565b610da3611056565b610dae6007826110d9565b156109c95760405173ffffffffffffffffffffffffffffffffffffffff8216907fed998b960f6340d045f620c119730f7aa7995e7425c2401d3a5b64ff998a59e990600090a250565b813073ffffffffffffffffffffffffffffffffffffffff821603610e1a57600080fd5b610e25848484611235565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610e255781811015610eef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610895565b610e258484848403610df7565b813073ffffffffffffffffffffffffffffffffffffffff821603610f1f57600080fd5b610e258484846113e8565b73ffffffffffffffffffffffffffffffffffffffff8216610fa7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610895565b8060026000828254610fb99190611d5c565b909155505073ffffffffffffffffffffffffffffffffffffffff8216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b6109c93382611657565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001830160205260408120541515610a41565b60055473ffffffffffffffffffffffffffffffffffffffff1633146110d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610895565b565b6000610a418373ffffffffffffffffffffffffffffffffffffffff841661181b565b60606000610a418361190e565b611113823383610e2b565b610ba58282611657565b6000610a418373ffffffffffffffffffffffffffffffffffffffff841661196a565b3373ffffffffffffffffffffffffffffffffffffffff8216036111be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610895565b600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff838116918217909255600554604051919216907fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae127890600090a350565b73ffffffffffffffffffffffffffffffffffffffff83166112d7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610895565b73ffffffffffffffffffffffffffffffffffffffff821661137a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610895565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff831661148b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610895565b73ffffffffffffffffffffffffffffffffffffffff821661152e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610895565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260208190526040902054818110156115e4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610895565b73ffffffffffffffffffffffffffffffffffffffff848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610e25565b73ffffffffffffffffffffffffffffffffffffffff82166116fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610895565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260208190526040902054818110156117b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610895565b73ffffffffffffffffffffffffffffffffffffffff83166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b6000818152600183016020526040812054801561190457600061183f600183611dce565b855490915060009061185390600190611dce565b90508181146118b857600086600001828154811061187357611873611de1565b906000526020600020015490508087600001848154811061189657611896611de1565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806118c9576118c9611e10565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610615565b6000915050610615565b60608160000180548060200260200160405190810160405280929190818152602001828054801561195e57602002820191906000526020600020905b81548152602001906001019080831161194a575b50505050509050919050565b60008181526001830160205260408120546119b157508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610615565b506000610615565b6000602082840312156119cb57600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a4157600080fd5b6000815180845260005b81811015611a2157602081850181015186830182015201611a05565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000610a4160208301846119fb565b803573ffffffffffffffffffffffffffffffffffffffff81168114611a9657600080fd5b919050565b60008060408385031215611aae57600080fd5b611ab783611a72565b946020939093013593505050565b600080600060608486031215611ada57600080fd5b611ae384611a72565b9250611af160208501611a72565b9150604084013590509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080600060608486031215611b4557600080fd5b611b4e84611a72565b925060208401359150604084013567ffffffffffffffff80821115611b7257600080fd5b818601915086601f830112611b8657600080fd5b813581811115611b9857611b98611b01565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715611bde57611bde611b01565b81604052828152896020848701011115611bf757600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b600060208284031215611c2b57600080fd5b5035919050565b600060208284031215611c4457600080fd5b610a4182611a72565b6020808252825182820181905260009190848201906040850190845b81811015611c9b57835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101611c69565b50909695505050505050565b60008060408385031215611cba57600080fd5b611cc383611a72565b9150611cd160208401611a72565b90509250929050565b600181811c90821680611cee57607f821691505b602082108103611d27577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561061557610615611d2d565b828152604060208201526000611d8860408301846119fb565b949350505050565b73ffffffffffffffffffffffffffffffffffffffff84168152826020820152606060408201526000611dc560608301846119fb565b95945050505050565b8181038181111561061557610615611d2d565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea164736f6c6343000813000a",
expectedResult: seth.Pragma{Major: 0, Minor: 8, Patch: 19},
expectedError: nil,
},
{
name: "Valid Bytecode [Automation Registar Wrapper 2_1]",
bytecode: "0x60a06040523480156200001157600080fd5b5060405162002d8238038062002d8283398101604081905262000034916200043b565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be816200017a565b5050506001600160a01b038416608052620000da838362000225565b60005b81518110156200016f576200015a82828151811062000100576200010062000598565b60200260200101516000015183838151811062000121576200012162000598565b60200260200101516020015184848151811062000142576200014262000598565b6020026020010151604001516200029e60201b60201c565b806200016681620005ae565b915050620000dd565b50505050506200062f565b336001600160a01b03821603620001d45760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6200022f6200034c565b6040805180820182526001600160a01b0384168082526001600160601b0384166020928301819052600160a01b810282176004558351918252918101919091527f39ce5d867555f0b0183e358fce5b158e7ca4fecd7c01cb7e0e19f1e23285838a910160405180910390a15050565b620002a86200034c565b60ff83166000908152600360205260409020805483919060ff19166001836002811115620002da57620002da620005d6565b021790555060ff831660009081526003602052604090819020805464ffffffff00191661010063ffffffff851602179055517f830a6d06a4e2caac67eba04323de22bdb04f032dd8b3d6a0c52b503d9a7036a3906200033f90859085908590620005ec565b60405180910390a1505050565b6000546001600160a01b03163314620003a85760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640162000082565b565b80516001600160a01b0381168114620003c257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715620004025762000402620003c7565b60405290565b604051601f8201601f191681016001600160401b0381118282101715620004335762000433620003c7565b604052919050565b600080600080608085870312156200045257600080fd5b6200045d85620003aa565b935060206200046e818701620003aa565b604087810151919550906001600160601b03811681146200048e57600080fd5b606088810151919550906001600160401b0380821115620004ae57600080fd5b818a0191508a601f830112620004c357600080fd5b815181811115620004d857620004d8620003c7565b620004e8868260051b0162000408565b818152868101925090840283018601908c8211156200050657600080fd5b928601925b81841015620005875784848e031215620005255760008081fd5b6200052f620003dd565b845160ff81168114620005425760008081fd5b81528488015160038110620005575760008081fd5b818901528487015163ffffffff81168114620005735760008081fd5b81880152835292840192918601916200050b565b999c989b5096995050505050505050565b634e487b7160e01b600052603260045260246000fd5b600060018201620005cf57634e487b7160e01b600052601160045260246000fd5b5060010190565b634e487b7160e01b600052602160045260246000fd5b60ff8416815260608101600384106200061557634e487b7160e01b600052602160045260246000fd5b83602083015263ffffffff83166040830152949350505050565b6080516127146200066e60003960008181610177015281816105d601528181610887015281816109bd01528181610f0e015261171b01526127146000f3fe608060405234801561001057600080fd5b506004361061011b5760003560e01c8063856853e6116100b2578063b5ff5b4111610081578063c4d252f511610066578063c4d252f5146103e3578063e8d4070d146103f6578063f2fde38b1461040957600080fd5b8063b5ff5b4114610369578063c3f909d41461037c57600080fd5b8063856853e61461027857806388b12d551461028b5780638da5cb5b14610338578063a4c0ed361461035657600080fd5b80633f678e11116100ee5780633f678e11146101f35780636c4cdfc31461021457806379ba5097146102275780637e776f7f1461022f57600080fd5b8063181f5a77146101205780631b6b6d2314610172578063212d0884146101be578063367b9b4f146101de575b600080fd5b61015c6040518060400160405280601981526020017f4175746f6d6174696f6e52656769737472617220322e312e300000000000000081525081565b6040516101699190611a74565b60405180910390f35b6101997f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610169565b6101d16101cc366004611aa4565b61041c565b6040516101699190611b29565b6101f16101ec366004611b9d565b6104a9565b005b610206610201366004611bd6565b61053b565b604051908152602001610169565b6101f1610222366004611c2e565b6106d3565b6101f161076d565b61026861023d366004611c63565b73ffffffffffffffffffffffffffffffffffffffff1660009081526005602052604090205460ff1690565b6040519015158152602001610169565b6101f1610286366004611de1565b61086f565b6102ff610299366004611f40565b60009081526002602090815260409182902082518084019093525473ffffffffffffffffffffffffffffffffffffffff8116808452740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff169290910182905291565b6040805173ffffffffffffffffffffffffffffffffffffffff90931683526bffffffffffffffffffffffff909116602083015201610169565b60005473ffffffffffffffffffffffffffffffffffffffff16610199565b6101f1610364366004611f59565b6109a5565b6101f1610377366004611fb5565b610ce3565b60408051808201825260045473ffffffffffffffffffffffffffffffffffffffff8116808352740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff16602092830181905283519182529181019190915201610169565b6101f16103f1366004611f40565b610dc2565b6101f1610404366004611ffe565b61104c565b6101f1610417366004611c63565b6112d9565b60408051606080820183526000808352602080840182905283850182905260ff86811683526003909152908490208451928301909452835492939192839116600281111561046c5761046c611abf565b600281111561047d5761047d611abf565b8152905463ffffffff610100820481166020840152650100000000009091041660409091015292915050565b6104b16112ed565b73ffffffffffffffffffffffffffffffffffffffff821660008181526005602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527f20c6237dac83526a849285a9f79d08a483291bdd3a056a0ef9ae94ecee1ad356910160405180910390a25050565b6004546000907401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1661057961014084016101208501612109565b6bffffffffffffffffffffffff1610156105bf576040517fcd1c886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166323b872dd333061060f61014087016101208801612109565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff93841660048201529290911660248301526bffffffffffffffffffffffff1660448201526064016020604051808303816000875af1158015610696573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ba9190612124565b506106cd6106c783612141565b33611370565b92915050565b6106db6112ed565b60408051808201825273ffffffffffffffffffffffffffffffffffffffff84168082526bffffffffffffffffffffffff8416602092830181905274010000000000000000000000000000000000000000810282176004558351918252918101919091527f39ce5d867555f0b0183e358fce5b158e7ca4fecd7c01cb7e0e19f1e23285838a910160405180910390a15050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146107f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146108de576040517f018d10be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109966040518061014001604052808e81526020018d8d8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509082525073ffffffffffffffffffffffffffffffffffffffff808d16602083015263ffffffff8c1660408301528a16606082015260ff8916608082015260a0810188905260c0810187905260e081018690526bffffffffffffffffffffffff85166101009091015282611370565b50505050505050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610a14576040517f018d10be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81818080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505060208101517fffffffff0000000000000000000000000000000000000000000000000000000081167f856853e60000000000000000000000000000000000000000000000000000000014610aca576040517fe3d6792100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8484846000610adc8260048186612276565b810190610ae991906122a0565b509950505050505050505050806bffffffffffffffffffffffff168414610b3c576040517f55e97b0d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8988886000610b4e8260048186612276565b810190610b5b91906122a0565b9a50505050505050505050508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614610bcc576040517ff8c5638e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6004547401000000000000000000000000000000000000000090046bffffffffffffffffffffffff168d1015610c2e576040517fcd1c886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60003073ffffffffffffffffffffffffffffffffffffffff168d8d604051610c579291906123dd565b600060405180830381855af49150503d8060008114610c92576040519150601f19603f3d011682016040523d82523d6000602084013e610c97565b606091505b5050905080610cd2576040517f649bf81000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050505050505050505050565b610ceb6112ed565b60ff8316600090815260036020526040902080548391907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001836002811115610d3857610d38611abf565b021790555060ff83166000908152600360205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ff1661010063ffffffff851602179055517f830a6d06a4e2caac67eba04323de22bdb04f032dd8b3d6a0c52b503d9a7036a390610db5908590859085906123ed565b60405180910390a1505050565b60008181526002602090815260409182902082518084019093525473ffffffffffffffffffffffffffffffffffffffff8116808452740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff1691830191909152331480610e49575060005473ffffffffffffffffffffffffffffffffffffffff1633145b610e7f576040517f61685c2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805173ffffffffffffffffffffffffffffffffffffffff16610ecd576040517f4b13b31e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260026020908152604080832083905583519184015190517fa9059cbb0000000000000000000000000000000000000000000000000000000081527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169263a9059cbb92610f859260040173ffffffffffffffffffffffffffffffffffffffff9290921682526bffffffffffffffffffffffff16602082015260400190565b6020604051808303816000875af1158015610fa4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc89190612124565b90508061101c5781516040517fc2e4dce800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016107ea565b60405183907f3663fb28ebc87645eb972c9dad8521bf665c623f287e79f1c56f1eb374b82a2290600090a2505050565b6110546112ed565b60008181526002602090815260409182902082518084019093525473ffffffffffffffffffffffffffffffffffffffff8116808452740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff16918301919091526110ed576040517f4b13b31e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008b8b8b8b8b8b8b8b8b60405160200161111099989796959493929190612461565b604051602081830303815290604052805190602001209050808314611161576040517f3f4d605300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60026000848152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000820160146101000a8154906bffffffffffffffffffffffff021916905550506112c96040518061014001604052808f81526020016040518060200160405280600081525081526020018e73ffffffffffffffffffffffffffffffffffffffff1681526020018d63ffffffff1681526020018c73ffffffffffffffffffffffffffffffffffffffff1681526020018b60ff1681526020018a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509082525060208082018a905260408051601f8a0183900483028101830182528981529201919089908990819084018382808284376000920191909152505050908252506020858101516bffffffffffffffffffffffff1691015282611647565b5050505050505050505050505050565b6112e16112ed565b6112ea81611876565b50565b60005473ffffffffffffffffffffffffffffffffffffffff16331461136e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016107ea565b565b608082015160009073ffffffffffffffffffffffffffffffffffffffff166113c4576040517f05bb467c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008360400151846060015185608001518660a001518760c001518860e0015189610100015160405160200161140097969594939291906124e7565b604051602081830303815290604052805190602001209050836040015173ffffffffffffffffffffffffffffffffffffffff16817f7684390ebb103102f7f48c71439c2408713f8d437782a6fab2756acc0e42c1b786600001518760200151886060015189608001518a60a001518b60e001518c61010001518d60c001518e610120015160405161149999989796959493929190612569565b60405180910390a360a084015160ff9081166000908152600360205260408082208151606081019092528054929361151c9383911660028111156114df576114df611abf565b60028111156114f0576114f0611abf565b8152905463ffffffff61010082048116602084015265010000000000909104166040909101528561196b565b156115845760a085015160ff166000908152600360205260409020805465010000000000900463ffffffff1690600561155483612653565b91906101000a81548163ffffffff021916908363ffffffff1602179055505061157d8583611647565b905061163f565b61012085015160008381526002602052604081205490916115ca917401000000000000000000000000000000000000000090046bffffffffffffffffffffffff16612676565b604080518082018252608089015173ffffffffffffffffffffffffffffffffffffffff90811682526bffffffffffffffffffffffff9384166020808401918252600089815260029091529390932091519251909316740100000000000000000000000000000000000000000291909216179055505b949350505050565b600480546040808501516060860151608087015160a088015160c089015160e08a01516101008b015196517f28f32f3800000000000000000000000000000000000000000000000000000000815260009973ffffffffffffffffffffffffffffffffffffffff909916988a988a986328f32f38986116d29891979096919590949193909291016124e7565b6020604051808303816000875af11580156116f1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061171591906126a2565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16634000aea0848861012001518560405160200161176f91815260200190565b6040516020818303038152906040526040518463ffffffff1660e01b815260040161179c939291906126bb565b6020604051808303816000875af11580156117bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117df9190612124565b905080611830576040517fc2e4dce800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841660048201526024016107ea565b81857fb9a292fb7e3edd920cd2d2829a3615a640c43fd7de0a0820aa0668feb4c37d4b88600001516040516118659190611a74565b60405180910390a350949350505050565b3373ffffffffffffffffffffffffffffffffffffffff8216036118f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016107ea565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000808351600281111561198157611981611abf565b0361198e575060006106cd565b6001835160028111156119a3576119a3611abf565b1480156119d6575073ffffffffffffffffffffffffffffffffffffffff821660009081526005602052604090205460ff16155b156119e3575060006106cd565b826020015163ffffffff16836040015163ffffffff161015611a07575060016106cd565b50600092915050565b6000815180845260005b81811015611a3657602081850181015186830182015201611a1a565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000611a876020830184611a10565b9392505050565b803560ff81168114611a9f57600080fd5b919050565b600060208284031215611ab657600080fd5b611a8782611a8e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60038110611b25577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b6000606082019050611b3c828451611aee565b602083015163ffffffff8082166020850152806040860151166040850152505092915050565b73ffffffffffffffffffffffffffffffffffffffff811681146112ea57600080fd5b8035611a9f81611b62565b80151581146112ea57600080fd5b60008060408385031215611bb057600080fd5b8235611bbb81611b62565b91506020830135611bcb81611b8f565b809150509250929050565b600060208284031215611be857600080fd5b813567ffffffffffffffff811115611bff57600080fd5b82016101408185031215611a8757600080fd5b80356bffffffffffffffffffffffff81168114611a9f57600080fd5b60008060408385031215611c4157600080fd5b8235611c4c81611b62565b9150611c5a60208401611c12565b90509250929050565b600060208284031215611c7557600080fd5b8135611a8781611b62565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610140810167ffffffffffffffff81118282101715611cd357611cd3611c80565b60405290565b600082601f830112611cea57600080fd5b813567ffffffffffffffff80821115611d0557611d05611c80565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715611d4b57611d4b611c80565b81604052838152866020858801011115611d6457600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008083601f840112611d9657600080fd5b50813567ffffffffffffffff811115611dae57600080fd5b602083019150836020828501011115611dc657600080fd5b9250929050565b803563ffffffff81168114611a9f57600080fd5b6000806000806000806000806000806000806101608d8f031215611e0457600080fd5b67ffffffffffffffff8d351115611e1a57600080fd5b611e278e8e358f01611cd9565b9b5067ffffffffffffffff60208e01351115611e4257600080fd5b611e528e60208f01358f01611d84565b909b509950611e6360408e01611b84565b9850611e7160608e01611dcd565b9750611e7f60808e01611b84565b9650611e8d60a08e01611a8e565b955067ffffffffffffffff60c08e01351115611ea857600080fd5b611eb88e60c08f01358f01611cd9565b945067ffffffffffffffff60e08e01351115611ed357600080fd5b611ee38e60e08f01358f01611cd9565b935067ffffffffffffffff6101008e01351115611eff57600080fd5b611f108e6101008f01358f01611cd9565b9250611f1f6101208e01611c12565b9150611f2e6101408e01611b84565b90509295989b509295989b509295989b565b600060208284031215611f5257600080fd5b5035919050565b60008060008060608587031215611f6f57600080fd5b8435611f7a81611b62565b935060208501359250604085013567ffffffffffffffff811115611f9d57600080fd5b611fa987828801611d84565b95989497509550505050565b600080600060608486031215611fca57600080fd5b611fd384611a8e565b9250602084013560038110611fe757600080fd5b9150611ff560408501611dcd565b90509250925092565b60008060008060008060008060008060006101208c8e03121561202057600080fd5b67ffffffffffffffff808d35111561203757600080fd5b6120448e8e358f01611cd9565b9b5061205260208e01611b84565b9a5061206060408e01611dcd565b995061206e60608e01611b84565b985061207c60808e01611a8e565b97508060a08e0135111561208f57600080fd5b61209f8e60a08f01358f01611d84565b909750955060c08d01358110156120b557600080fd5b6120c58e60c08f01358f01611cd9565b94508060e08e013511156120d857600080fd5b506120e98d60e08e01358e01611d84565b81945080935050506101008c013590509295989b509295989b9093969950565b60006020828403121561211b57600080fd5b611a8782611c12565b60006020828403121561213657600080fd5b8151611a8781611b8f565b6000610140823603121561215457600080fd5b61215c611caf565b823567ffffffffffffffff8082111561217457600080fd5b61218036838701611cd9565b8352602085013591508082111561219657600080fd5b6121a236838701611cd9565b60208401526121b360408601611b84565b60408401526121c460608601611dcd565b60608401526121d560808601611b84565b60808401526121e660a08601611a8e565b60a084015260c08501359150808211156121ff57600080fd5b61220b36838701611cd9565b60c084015260e085013591508082111561222457600080fd5b61223036838701611cd9565b60e08401526101009150818501358181111561224b57600080fd5b61225736828801611cd9565b8385015250505061012061226c818501611c12565b9082015292915050565b6000808585111561228657600080fd5b8386111561229357600080fd5b5050820193919092039150565b60008060008060008060008060008060006101608c8e0312156122c257600080fd5b67ffffffffffffffff808d3511156122d957600080fd5b6122e68e8e358f01611cd9565b9b508060208e013511156122f957600080fd5b6123098e60208f01358f01611cd9565b9a5061231760408e01611b84565b995061232560608e01611dcd565b985061233360808e01611b84565b975061234160a08e01611a8e565b96508060c08e0135111561235457600080fd5b6123648e60c08f01358f01611cd9565b95508060e08e0135111561237757600080fd5b6123878e60e08f01358f01611cd9565b9450806101008e0135111561239b57600080fd5b506123ad8d6101008e01358e01611cd9565b92506123bc6101208d01611c12565b91506123cb6101408d01611b84565b90509295989b509295989b9093969950565b8183823760009101908152919050565b60ff84168152606081016124046020830185611aee565b63ffffffff83166040830152949350505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b600073ffffffffffffffffffffffffffffffffffffffff808c16835263ffffffff8b166020840152808a1660408401525060ff8816606083015260e060808301526124b060e083018789612418565b82810360a08401526124c28187611a10565b905082810360c08401526124d7818587612418565b9c9b505050505050505050505050565b600073ffffffffffffffffffffffffffffffffffffffff808a16835263ffffffff8916602084015280881660408401525060ff8616606083015260e0608083015261253560e0830186611a10565b82810360a08401526125478186611a10565b905082810360c084015261255b8185611a10565b9a9950505050505050505050565b600061012080835261257d8184018d611a10565b90508281036020840152612591818c611a10565b905063ffffffff8a16604084015273ffffffffffffffffffffffffffffffffffffffff8916606084015260ff8816608084015282810360a08401526125d68188611a10565b905082810360c08401526125ea8187611a10565b905082810360e08401526125fe8186611a10565b9150506bffffffffffffffffffffffff83166101008301529a9950505050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600063ffffffff80831681810361266c5761266c612624565b6001019392505050565b6bffffffffffffffffffffffff81811683821601908082111561269b5761269b612624565b5092915050565b6000602082840312156126b457600080fd5b5051919050565b73ffffffffffffffffffffffffffffffffffffffff841681526bffffffffffffffffffffffff831660208201526060604082015260006126fe6060830184611a10565b9594505050505056fea164736f6c6343000810000a",
expectedResult: seth.Pragma{Major: 0, Minor: 8, Patch: 16},
expectedError: nil,
},
{
name: "Valid Bytecode, No metadata [Offchain Aggregator v1]",
bytecode: "0x60e06040523480156200001157600080fd5b5060405162005a3a38038062005a3a83398181016040526101808110156200003857600080fd5b815160208301516040808501516060860151608087015160a088015160c089015160e08a01516101008b01516101208c01516101408d01516101608e0180519a519c9e9b9d999c989b979a969995989497939692959194939182019284640100000000821115620000a857600080fd5b908301906020820185811115620000be57600080fd5b8251640100000000811182820188101715620000d957600080fd5b82525081516020918201929091019080838360005b8381101562000108578181015183820152602001620000ee565b50505050905090810190601f168015620001365780820380516001836020036101000a031916815260200191505b506040525050600080546001600160a01b03191633179055508b8b8b8b8b8b89620001658787878787620002ca565b600380546001600160a01b0319166001600160a01b0384169081179091556040516000907f4966a50c93f855342ccf6c5c0d358b85b91335b2acedc7da0932f691f351711a908290a3620001b981620003bc565b620001c362000653565b620001cd62000653565b60005b601f8160ff1610156200021d576001838260ff16601f8110620001ef57fe5b61ffff909216602092909202015260018260ff8316601f81106200020f57fe5b6020020152600101620001d0565b506200022d600583601f62000672565b506200023d600982601f6200070f565b505050505060f887901b7fff000000000000000000000000000000000000000000000000000000000000001660c052505083516200028693506030925060208501915062000740565b50620002928362000435565b6200029f6000806200050d565b50505050601791820b820b604090811b60805290820b90910b901b60a05250620007d9945050505050565b6040805160a0808201835263ffffffff88811680845288821660208086018290528984168688018190528985166060808901829052958a1660809889018190526002805463ffffffff1916871763ffffffff60201b191664010000000087021763ffffffff60401b19166801000000000000000085021763ffffffff60601b19166c0100000000000000000000000084021763ffffffff60801b1916600160801b830217905589519586529285019390935283880152928201529283015291517fd0d9486a2c673e2a4b57fc82e4c8a556b3e2b82dd5db07e2c04a920ca0f469b6929181900390910190a15050505050565b6004546001600160a01b0390811690821681146200043157600480546001600160a01b0319166001600160a01b03848116918217909255604080519284168352602083019190915280517f793cb73064f3c8cde7e187ae515511e6e56d1ee89bf08b82fa60fb70f8d489129281900390910190a15b5050565b6000546001600160a01b0316331462000495576040805162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015290519081900360640190fd5b602f546001600160a01b0390811690821681146200043157602f80546001600160a01b0319166001600160a01b03848116918217909255604080519284168352602083019190915280517f27b89aede8b560578baaa25ee5ce3852c5eecad1e114b941bbd89e1eb4bae6349281900390910190a15050565b6000546001600160a01b031633146200056d576040805162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015290519081900360640190fd5b60408051808201909152602e546001600160a01b03808216808452600160a01b90920463ffffffff1660208401528416141580620005bb57508163ffffffff16816020015163ffffffff1614155b156200064e576040805180820182526001600160a01b0385811680835263ffffffff8681166020948501819052602e80546001600160a01b031916841763ffffffff60a01b1916600160a01b8302179055865187860151875193168352948201528451919493909216927fb04e3a37abe9c0fcdfebdeae019a8e2b12ddf53f5d55ffb0caccc1bedaca1541928290030190a35b505050565b604051806103e00160405280601f906020820280368337509192915050565b600283019183908215620006fd5791602002820160005b83821115620006cb57835183826101000a81548161ffff021916908361ffff160217905550926020019260020160208160010104928301926001030262000689565b8015620006fb5782816101000a81549061ffff0219169055600201602081600101049283019260010302620006cb565b505b506200070b929150620007c2565b5090565b82601f8101928215620006fd579160200282015b82811115620006fd57825182559160200191906001019062000723565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620007785760008555620006fd565b82601f106200079357805160ff1916838001178555620006fd565b82800160010185558215620006fd5791820182811115620006fd57825182559160200191906001019062000723565b5b808211156200070b5760008155600101620007c3565b60805160401c60a05160401c60c05160f81c6152216200081960003980610dbf525080611aaf528061354e525080610d1e528061352152506152216000f3fe608060405234801561001057600080fd5b50600436106102c85760003560e01c806398e5b12a1161017b578063c9807539116100d8578063eb4571631161008c578063f2fde38b11610071578063f2fde38b14610b46578063fbffd2c114610b6c578063feaf968c14610b92576102c8565b8063eb45716314610ae6578063eb5dcd6c14610b18576102c8565b8063e4902f82116100bd578063e4902f8214610a37578063e5fe457714610a74578063e76d516814610ade576102c8565b8063c98075391461091b578063d09dc33914610a2f576102c8565b8063b121e1471161012f578063b633620c11610114578063b633620c1461088d578063bd824706146108aa578063c1075329146108ef576102c8565b8063b121e1471461084a578063b5ab58dc14610870576102c8565b80639a6fc8f5116101605780639a6fc8f5146106ef5780639c849b30146107625780639e3ceeab14610824576102c8565b806398e5b12a146106c0578063996e8298146106e7576102c8565b806370da2f671161022957806381ff7048116101dd5780638ac28d5a116101c25780638ac28d5a146106625780638da5cb5b146106885780638e0566de14610690576102c8565b806381ff7048146106095780638205bf6a1461065a576102c8565b80637284e4161161020e5780637284e416146105a157806379ba5097146105a957806381411834146105b1576102c8565b806370da2f671461057557806370efdf2d1461057d576102c8565b80634fb174701161028057806354fd4d501161026557806354fd4d5014610438578063585aa7de14610440578063668a0f021461056d576102c8565b80634fb174701461040057806350d25bcd14610430576102c8565b806322adbc78116102b157806322adbc781461038257806329937268146103a1578063313ce567146103e2576102c8565b80630eafb25b146102cd578063181f5a7714610305575b600080fd5b6102f3600480360360208110156102e357600080fd5b50356001600160a01b0316610b9a565b60408051918252519081900360200190f35b61030d610ce5565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561034757818101518382015260200161032f565b50505050905090810190601f1680156103745780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61038a610d1c565b6040805160179290920b8252519081900360200190f35b6103a9610d40565b6040805163ffffffff96871681529486166020860152928516848401529084166060840152909216608082015290519081900360a00190f35b6103ea610dbd565b6040805160ff9092168252519081900360200190f35b61042e6004803603604081101561041657600080fd5b506001600160a01b0381358116916020013516610de1565b005b6102f36110c5565b6102f3611101565b61042e600480360360a081101561045657600080fd5b81019060208101813564010000000081111561047157600080fd5b82018360208201111561048357600080fd5b803590602001918460208302840111640100000000831117156104a557600080fd5b9193909290916020810190356401000000008111156104c357600080fd5b8201836020820111156104d557600080fd5b803590602001918460208302840111640100000000831117156104f757600080fd5b9193909260ff8335169267ffffffffffffffff60208201351692919060608101906040013564010000000081111561052e57600080fd5b82018360208201111561054057600080fd5b8035906020019184600183028401116401000000008311171561056257600080fd5b509092509050611106565b6102f3611a87565b61038a611aad565b610585611ad1565b604080516001600160a01b039092168252519081900360200190f35b61030d611ae0565b61042e611b94565b6105b9611c62565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156105f55781810151838201526020016105dd565b505050509050019250505060405180910390f35b610611611cc3565b6040805163ffffffff94851681529290931660208301527fffffffffffffffffffffffffffffffff00000000000000000000000000000000168183015290519081900360600190f35b6102f3611ce4565b61042e6004803603602081101561067857600080fd5b50356001600160a01b0316611d3f565b610585611db9565b610698611dc8565b604080516001600160a01b03909316835263ffffffff90911660208301528051918290030190f35b6106c8611e0c565b6040805169ffffffffffffffffffff9092168252519081900360200190f35b610585612042565b6107186004803603602081101561070557600080fd5b503569ffffffffffffffffffff16612051565b604051808669ffffffffffffffffffff1681526020018581526020018481526020018381526020018269ffffffffffffffffffff1681526020019550505050505060405180910390f35b61042e6004803603604081101561077857600080fd5b81019060208101813564010000000081111561079357600080fd5b8201836020820111156107a557600080fd5b803590602001918460208302840111640100000000831117156107c757600080fd5b9193909290916020810190356401000000008111156107e557600080fd5b8201836020820111156107f757600080fd5b8035906020019184602083028401116401000000008311171561081957600080fd5b50909250905061219c565b61042e6004803603602081101561083a57600080fd5b50356001600160a01b03166123d5565b61042e6004803603602081101561086057600080fd5b50356001600160a01b03166124c3565b6102f36004803603602081101561088657600080fd5b50356125bc565b6102f3600480360360208110156108a357600080fd5b50356125f2565b61042e600480360360a08110156108c057600080fd5b5063ffffffff813581169160208101358216916040820135811691606081013582169160809091013516612647565b61042e6004803603604081101561090557600080fd5b506001600160a01b03813516906020013561278f565b61042e6004803603608081101561093157600080fd5b81019060208101813564010000000081111561094c57600080fd5b82018360208201111561095e57600080fd5b8035906020019184600183028401116401000000008311171561098057600080fd5b91939092909160208101903564010000000081111561099e57600080fd5b8201836020820111156109b057600080fd5b803590602001918460208302840111640100000000831117156109d257600080fd5b9193909290916020810190356401000000008111156109f057600080fd5b820183602082011115610a0257600080fd5b80359060200191846020830284011164010000000083111715610a2457600080fd5b919350915035612a98565b6102f3613983565b610a5d60048036036020811015610a4d57600080fd5b50356001600160a01b0316613a2d565b6040805161ffff9092168252519081900360200190f35b610a7c613ada565b604080517fffffffffffffffffffffffffffffffff00000000000000000000000000000000909616865263ffffffff909416602086015260ff9092168484015260170b606084015267ffffffffffffffff166080830152519081900360a00190f35b610585613bc9565b61042e60048036036040811015610afc57600080fd5b5080356001600160a01b0316906020013563ffffffff16613bd8565b61042e60048036036040811015610b2e57600080fd5b506001600160a01b0381358116916020013516613d6d565b61042e60048036036020811015610b5c57600080fd5b50356001600160a01b0316613ec8565b61042e60048036036020811015610b8257600080fd5b50356001600160a01b0316613f90565b610718613ff8565b6001600160a01b03811660009081526028602090815260408083208151808301909252805460ff808216845285948401916101009004166002811115610bdc57fe5b6002811115610be757fe5b9052509050600081602001516002811115610bfe57fe5b1415610c0e576000915050610ce0565b6040805160a08101825260025463ffffffff80821683526401000000008204811660208401526801000000000000000082048116938301939093526c01000000000000000000000000810483166060830181905270010000000000000000000000000000000090910490921660808201528251909160009160019060059060ff16601f8110610c9957fe5b601091828204019190066002029054906101000a900461ffff160361ffff1602633b9aca0002905060016009846000015160ff16601f8110610cd757fe5b01540301925050505b919050565b60408051808201909152601881527f4f6666636861696e41676772656761746f7220342e302e300000000000000000602082015290565b7f000000000000000000000000000000000000000000000000000000000000000081565b6040805160a08101825260025463ffffffff808216808452640100000000830482166020850181905268010000000000000000840483169585018690526c01000000000000000000000000840483166060860181905270010000000000000000000000000000000090940490921660809094018490529490939290565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b03163314610e40576040805162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015290519081900360640190fd5b6003546001600160a01b03908116908316811415610e5e57506110c1565b604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290516001600160a01b038516916370a08231916024808301926020929190829003018186803b158015610ebd57600080fd5b505afa158015610ed1573d6000803e3d6000fd5b505050506040513d6020811015610ee757600080fd5b50610ef2905061407c565b6000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f4157600080fd5b505afa158015610f55573d6000803e3d6000fd5b505050506040513d6020811015610f6b57600080fd5b5051604080517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301526024820184905291519293509084169163a9059cbb916044808201926020929091908290030181600087803b158015610fdc57600080fd5b505af1158015610ff0573d6000803e3d6000fd5b505050506040513d602081101561100657600080fd5b5051611059576040805162461bcd60e51b815260206004820152601f60248201527f7472616e736665722072656d61696e696e672066756e6473206661696c656400604482015290519081900360640190fd5b600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0386811691821790925560405190918416907f4966a50c93f855342ccf6c5c0d358b85b91335b2acedc7da0932f691f351711a90600090a350505b5050565b602b54760100000000000000000000000000000000000000000000900463ffffffff166000908152602c6020526040902054601790810b900b90565b600481565b868560ff8616601f831115611162576040805162461bcd60e51b815260206004820152601060248201527f746f6f206d616e79207369676e65727300000000000000000000000000000000604482015290519081900360640190fd5b600081116111b7576040805162461bcd60e51b815260206004820152601a60248201527f7468726573686f6c64206d75737420626520706f736974697665000000000000604482015290519081900360640190fd5b8183146111f55760405162461bcd60e51b81526004018080602001828103825260248152602001806151f16024913960400191505060405180910390fd5b80600302831161124c576040805162461bcd60e51b815260206004820181905260248201527f6661756c74792d6f7261636c65207468726573686f6c6420746f6f2068696768604482015290519081900360640190fd5b6000546001600160a01b031633146112ab576040805162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015290519081900360640190fd5b6029541561144f57602980547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810191600091839081106112e857fe5b6000918252602082200154602a80546001600160a01b039092169350908490811061130f57fe5b6000918252602090912001546001600160a01b0316905061132f8161442c565b6001600160a01b0380831660009081526028602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00009081169091559284168252902080549091169055602980548061138b57fe5b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055019055602a8054806113ee57fe5b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055019055506112ab915050565b60005b8a81101561185d576000602860008e8e8581811061146c57fe5b602090810292909201356001600160a01b031683525081019190915260400160002054610100900460ff1660028111156114a257fe5b146114f4576040805162461bcd60e51b815260206004820152601760248201527f7265706561746564207369676e65722061646472657373000000000000000000604482015290519081900360640190fd5b6040805180820190915260ff8216815260016020820152602860008e8e8581811061151b57fe5b602090810292909201356001600160a01b031683525081810192909252604001600020825181547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff9091161780825591830151909182907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101008360028111156115a657fe5b02179055506000915060079050818c8c858181106115c057fe5b6001600160a01b036020918202939093013583168452830193909352604090910160002054169190911415905061163e576040805162461bcd60e51b815260206004820152601160248201527f7061796565206d75737420626520736574000000000000000000000000000000604482015290519081900360640190fd5b6000602860008c8c8581811061165057fe5b602090810292909201356001600160a01b031683525081019190915260400160002054610100900460ff16600281111561168657fe5b146116d8576040805162461bcd60e51b815260206004820152601c60248201527f7265706561746564207472616e736d6974746572206164647265737300000000604482015290519081900360640190fd5b6040805180820190915260ff8216815260026020820152602860008c8c858181106116ff57fe5b602090810292909201356001600160a01b031683525081810192909252604001600020825181547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff9091161780825591830151909182907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010083600281111561178a57fe5b021790555090505060298c8c838181106117a057fe5b835460018101855560009485526020948590200180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b039590920293909301359390931692909217905550602a8a8a8381811061180257fe5b835460018181018655600095865260209586902090910180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0396909302949094013594909416179091555001611452565b50602b805460ff89167501000000000000000000000000000000000000000000027fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff909116179055602d80544363ffffffff9081166401000000009081027fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff84161780831660010183167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000090911617938490559091048116911661192930828f8f8f8f8f8f8f8f614638565b602b60000160006101000a8154816fffffffffffffffffffffffffffffffff021916908360801c02179055506000602b60000160106101000a81548164ffffffffff021916908364ffffffffff1602179055507f25d719d88a4512dd76c7442b910a83360845505894eb444ef299409e180f8fb982828f8f8f8f8f8f8f8f604051808b63ffffffff1681526020018a67ffffffffffffffff16815260200180602001806020018760ff1681526020018667ffffffffffffffff1681526020018060200184810384528c8c82818152602001925060200280828437600083820152601f01601f191690910185810384528a8152602090810191508b908b0280828437600083820152601f01601f191690910185810383528681526020019050868680828437600083820152604051601f909101601f19169092018290039f50909d5050505050505050505050505050a150505050505050505050505050565b602b54760100000000000000000000000000000000000000000000900463ffffffff1690565b7f000000000000000000000000000000000000000000000000000000000000000081565b602f546001600160a01b031690565b60308054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015611b8a5780601f10611b5f57610100808354040283529160200191611b8a565b820191906000526020600020905b815481529060010190602001808311611b6d57829003601f168201915b5050505050905090565b6001546001600160a01b03163314611bf3576040805162461bcd60e51b815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e657200000000000000000000604482015290519081900360640190fd5b60008054337fffffffffffffffffffffffff0000000000000000000000000000000000000000808316821784556001805490911690556040516001600160a01b0390921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6060602a805480602002602001604051908101604052809291908181526020018280548015611b8a57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611c9c575050505050905090565b602d54602b5463ffffffff808316926401000000009004169060801b909192565b602b54760100000000000000000000000000000000000000000000900463ffffffff166000908152602c60205260409020547801000000000000000000000000000000000000000000000000900467ffffffffffffffff1690565b6001600160a01b03818116600090815260076020526040902054163314611dad576040805162461bcd60e51b815260206004820152601760248201527f4f6e6c792070617965652063616e207769746864726177000000000000000000604482015290519081900360640190fd5b611db68161442c565b50565b6000546001600160a01b031681565b60408051808201909152602e546001600160a01b0381168083527401000000000000000000000000000000000000000090910463ffffffff16602090920182905291565b600080546001600160a01b0316331480611ee85750602f54604080517f6b14daf800000000000000000000000000000000000000000000000000000000815233600482018181526024830193845236604484018190526001600160a01b0390951694636b14daf894929360009391929190606401848480828437600083820152604051601f909101601f1916909201965060209550909350505081840390508186803b158015611ebb57600080fd5b505afa158015611ecf573d6000803e3d6000fd5b505050506040513d6020811015611ee557600080fd5b50515b611f39576040805162461bcd60e51b815260206004820152601d60248201527f4f6e6c79206f776e6572267265717565737465722063616e2063616c6c000000604482015290519081900360640190fd5b6040805160808082018352602b549081901b7fffffffffffffffffffffffffffffffff0000000000000000000000000000000016808352700100000000000000000000000000000000820464ffffffffff81166020808601919091527501000000000000000000000000000000000000000000840460ff9081168688015276010000000000000000000000000000000000000000000090940463ffffffff9081166060808801919091528751948552600884901c909116918401919091529216818501529251919233927f3ea16a923ff4b1df6526e854c9e3a995c43385d70e73359e10623c74f0b52037929181900390910190a2806060015160010163ffffffff1691505090565b6004546001600160a01b031690565b600080600080600063ffffffff8669ffffffffffffffffffff1611156040518060400160405280600f81526020017f4e6f20646174612070726573656e7400000000000000000000000000000000008152509061212c5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156120f15781810151838201526020016120d9565b50505050905090810190601f16801561211e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5050505063ffffffff83166000908152602c6020908152604091829020825180840190935254601781810b810b810b808552780100000000000000000000000000000000000000000000000090920467ffffffffffffffff1693909201839052949594900b939092508291508490565b6000546001600160a01b031633146121fb576040805162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015290519081900360640190fd5b82811461224f576040805162461bcd60e51b815260206004820181905260248201527f7472616e736d6974746572732e73697a6520213d207061796565732e73697a65604482015290519081900360640190fd5b60005b838110156123ce57600085858381811061226857fe5b905060200201356001600160a01b03169050600084848481811061228857fe5b6001600160a01b0385811660009081526007602090815260409091205492029390930135831693509091169050801580806122d45750826001600160a01b0316826001600160a01b0316145b612325576040805162461bcd60e51b815260206004820152601160248201527f706179656520616c726561647920736574000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b03848116600090815260076020526040902080547fffffffffffffffffffffffff000000000000000000000000000000000000000016858316908117909155908316146123be57826001600160a01b0316826001600160a01b0316856001600160a01b03167f78af32efdcad432315431e9b03d27e6cd98fb79c405fdc5af7c1714d9c0f75b360405160405180910390a45b5050600190920191506122529050565b5050505050565b6000546001600160a01b03163314612434576040805162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015290519081900360640190fd5b602f546001600160a01b0390811690821681146110c157602f80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03848116918217909255604080519284168352602083019190915280517f27b89aede8b560578baaa25ee5ce3852c5eecad1e114b941bbd89e1eb4bae6349281900390910190a15050565b6001600160a01b03818116600090815260086020526040902054163314612531576040805162461bcd60e51b815260206004820152601f60248201527f6f6e6c792070726f706f736564207061796565732063616e2061636365707400604482015290519081900360640190fd5b6001600160a01b0381811660008181526007602090815260408083208054337fffffffffffffffffffffffff000000000000000000000000000000000000000080831682179093556008909452828520805490921690915590519416939092849290917f78af32efdcad432315431e9b03d27e6cd98fb79c405fdc5af7c1714d9c0f75b39190a45050565b600063ffffffff8211156125d257506000610ce0565b5063ffffffff166000908152602c6020526040902054601790810b900b90565b600063ffffffff82111561260857506000610ce0565b5063ffffffff166000908152602c60205260409020547801000000000000000000000000000000000000000000000000900467ffffffffffffffff1690565b6004546000546001600160a01b0391821691163314806127215750604080517f6b14daf800000000000000000000000000000000000000000000000000000000815233600482018181526024830193845236604484018190526001600160a01b03861694636b14daf8946000939190606401848480828437600083820152604051601f909101601f1916909201965060209550909350505081840390508186803b1580156126f457600080fd5b505afa158015612708573d6000803e3d6000fd5b505050506040513d602081101561271e57600080fd5b50515b612772576040805162461bcd60e51b815260206004820181905260248201527f4f6e6c79206f776e65722662696c6c696e6741646d696e2063616e2063616c6c604482015290519081900360640190fd5b61277a61407c565b612787868686868661473c565b505050505050565b6000546001600160a01b0316331480612869575060048054604080517f6b14daf8000000000000000000000000000000000000000000000000000000008152339381018481526024820192835236604483018190526001600160a01b0390941694636b14daf8949093600093919291606401848480828437600083820152604051601f909101601f1916909201965060209550909350505081840390508186803b15801561283c57600080fd5b505afa158015612850573d6000803e3d6000fd5b505050506040513d602081101561286657600080fd5b50515b6128ba576040805162461bcd60e51b815260206004820181905260248201527f4f6e6c79206f776e65722662696c6c696e6741646d696e2063616e2063616c6c604482015290519081900360640190fd5b60006128c46148b6565b600354604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290519293506000926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561292e57600080fd5b505afa158015612942573d6000803e3d6000fd5b505050506040513d602081101561295857600080fd5b50519050818110156129b1576040805162461bcd60e51b815260206004820152601460248201527f696e73756666696369656e742062616c616e6365000000000000000000000000604482015290519081900360640190fd5b6003546001600160a01b031663a9059cbb856129cf85850387614a86565b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015612a1557600080fd5b505af1158015612a29573d6000803e3d6000fd5b505050506040513d6020811015612a3f57600080fd5b5051612a92576040805162461bcd60e51b815260206004820152601260248201527f696e73756666696369656e742066756e64730000000000000000000000000000604482015290519081900360640190fd5b50505050565b60005a9050612aab888888888888614aa0565b3614612afe576040805162461bcd60e51b815260206004820152601960248201527f7472616e736d6974206d65737361676520746f6f206c6f6e6700000000000000604482015290519081900360640190fd5b612b06615086565b6040805160808082018352602b549081901b7fffffffffffffffffffffffffffffffff00000000000000000000000000000000168252700100000000000000000000000000000000810464ffffffffff1660208301527501000000000000000000000000000000000000000000810460ff169282019290925276010000000000000000000000000000000000000000000090910463ffffffff166060808301919091529082526000908a908a90811015612bbf57600080fd5b813591602081013591810190606081016040820135640100000000811115612be657600080fd5b820183602082011115612bf857600080fd5b80359060200191846020830284011164010000000083111715612c1a57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050505060408801525050506080840182905283515190925060589190911b907fffffffffffffffffffffffffffffffff00000000000000000000000000000000808316911614612ce1576040805162461bcd60e51b815260206004820152601560248201527f636f6e666967446967657374206d69736d617463680000000000000000000000604482015290519081900360640190fd5b608083015183516020015164ffffffffff808316911610612d49576040805162461bcd60e51b815260206004820152600c60248201527f7374616c65207265706f72740000000000000000000000000000000000000000604482015290519081900360640190fd5b83516040015160ff168911612da5576040805162461bcd60e51b815260206004820152601560248201527f6e6f7420656e6f756768207369676e6174757265730000000000000000000000604482015290519081900360640190fd5b601f891115612dfb576040805162461bcd60e51b815260206004820152601360248201527f746f6f206d616e79207369676e61747572657300000000000000000000000000604482015290519081900360640190fd5b868914612e4f576040805162461bcd60e51b815260206004820152601e60248201527f7369676e617475726573206f7574206f6620726567697374726174696f6e0000604482015290519081900360640190fd5b601f8460400151511115612eaa576040805162461bcd60e51b815260206004820152601e60248201527f6e756d206f62736572766174696f6e73206f7574206f6620626f756e64730000604482015290519081900360640190fd5b83600001516040015160020260ff1684604001515111612f11576040805162461bcd60e51b815260206004820152601e60248201527f746f6f206665772076616c75657320746f207472757374206d656469616e0000604482015290519081900360640190fd5b8867ffffffffffffffff81118015612f2857600080fd5b506040519080825280601f01601f191660200182016040528015612f53576020820181803683370190505b50606085015260005b60ff81168a1115612fc457868160ff1660208110612f7657fe5b1a60f81b85606001518260ff1681518110612f8d57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600101612f5c565b5083604001515167ffffffffffffffff81118015612fe157600080fd5b506040519080825280601f01601f19166020018201604052801561300c576020820181803683370190505b50602085015261301a6150ba565b60005b8560400151518160ff161015613120576000858260ff166020811061303e57fe5b1a90508281601f811061304d57fe5b6020020151156130a4576040805162461bcd60e51b815260206004820152601760248201527f6f6273657276657220696e646578207265706561746564000000000000000000604482015290519081900360640190fd5b6001838260ff16601f81106130b557fe5b91151560209283029190910152869060ff84169081106130d157fe5b1a60f81b87602001518360ff16815181106130e857fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505060010161301d565b503360009081526028602090815260408083208151808301909252805460ff8082168452929391929184019161010090910416600281111561315e57fe5b600281111561316957fe5b905250905060028160200151600281111561318057fe5b1480156131b45750602a816000015160ff168154811061319c57fe5b6000918252602090912001546001600160a01b031633145b613205576040805162461bcd60e51b815260206004820152601860248201527f756e617574686f72697a6564207472616e736d69747465720000000000000000604482015290519081900360640190fd5b5050835164ffffffffff90911660209091015250506040516000908a908a90808383808284376040519201829003909120945061324693506150ba92505050565b61324e6150d9565b60005b898110156134475760006001858760600151848151811061326e57fe5b60209101015160f81c601b018e8e8681811061328657fe5b905060200201358d8d8781811061329957fe5b9050602002013560405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156132f4573d6000803e3d6000fd5b505060408051601f198101516001600160a01b03811660009081526028602090815290849020838501909452835460ff8082168552929650929450840191610100900416600281111561334357fe5b600281111561334e57fe5b905250925060018360200151600281111561336557fe5b146133b7576040805162461bcd60e51b815260206004820152601e60248201527f61646472657373206e6f7420617574686f72697a656420746f207369676e0000604482015290519081900360640190fd5b8251849060ff16601f81106133c857fe5b60200201511561341f576040805162461bcd60e51b815260206004820152601460248201527f6e6f6e2d756e69717565207369676e6174757265000000000000000000000000604482015290519081900360640190fd5b600184846000015160ff16601f811061343457fe5b9115156020909202015250600101613251565b5050505060005b6001826040015151038110156134f85760008260400151826001018151811061347357fe5b602002602001015160170b8360400151838151811061348e57fe5b602002602001015160170b13159050806134ef576040805162461bcd60e51b815260206004820152601760248201527f6f62736572766174696f6e73206e6f7420736f72746564000000000000000000604482015290519081900360640190fd5b5060010161344e565b5060408101518051600091906002810490811061351157fe5b602002602001015190508060170b7f000000000000000000000000000000000000000000000000000000000000000060170b1315801561357757507f000000000000000000000000000000000000000000000000000000000000000060170b8160170b13155b6135c8576040805162461bcd60e51b815260206004820152601e60248201527f6d656469616e206973206f7574206f66206d696e2d6d61782072616e67650000604482015290519081900360640190fd5b81516060908101805163ffffffff60019091018116909152604080518082018252601785810b80835267ffffffffffffffff42811660208086019182528a5189015188166000908152602c82528781209651875493519094167801000000000000000000000000000000000000000000000000029390950b77ffffffffffffffffffffffffffffffffffffffffffffffff9081167fffffffffffffffff0000000000000000000000000000000000000000000000009093169290921790911691909117909355875186015184890151848a01516080808c015188519586523386890181905291860181905260a0988601898152845199870199909952835194909916997ff6a97944f31ea060dfde0566e4167c1a1082551e64b60ecb14d599a9d023d451998c999298949793969095909492939185019260c086019289820192909102908190849084905b8381101561372b578181015183820152602001613713565b50505050905001838103825285818151815260200191508051906020019080838360005b8381101561376757818101518382015260200161374f565b50505050905090810190601f1680156137945780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390a281516060015160408051428152905160009263ffffffff16917f0109fc6f55cf40689f02fbaad7af7fe7bbac8a3d2186600afc7d3e10cac60271919081900360200190a381600001516060015163ffffffff168160170b7f0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5f426040518082815260200191505060405180910390a36138498260000151606001518260170b614ab8565b5080518051602b8054602084015160408501516060909501517fffffffffffffffffffffffffffffffff0000000000000000000000000000000090921660809490941c939093177fffffffffffffffffffffff0000000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000064ffffffffff90941693909302929092177fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff16750100000000000000000000000000000000000000000060ff90941693909302929092177fffffffffffff00000000ffffffffffffffffffffffffffffffffffffffffffff1676010000000000000000000000000000000000000000000063ffffffff9283160217909155821061396a57fe5b613978828260200151614c28565b505050505050505050565b600354604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009283926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b1580156139ec57600080fd5b505afa158015613a00573d6000803e3d6000fd5b505050506040513d6020811015613a1657600080fd5b505190506000613a246148b6565b90910391505090565b6001600160a01b03811660009081526028602090815260408083208151808301909252805460ff808216845285948401916101009004166002811115613a6f57fe5b6002811115613a7a57fe5b9052509050600081602001516002811115613a9157fe5b1415613aa1576000915050610ce0565b60016005826000015160ff16601f8110613ab757fe5b601091828204019190066002029054906101000a900461ffff1603915050919050565b600080808080333214613b34576040805162461bcd60e51b815260206004820152601460248201527f4f6e6c792063616c6c61626c6520627920454f41000000000000000000000000604482015290519081900360640190fd5b5050602b5463ffffffff760100000000000000000000000000000000000000000000820481166000908152602c6020526040902054608083901b96700100000000000000000000000000000000909304600881901c909216955064ffffffffff9091169350601781900b92507801000000000000000000000000000000000000000000000000900467ffffffffffffffff1690565b6003546001600160a01b031690565b6000546001600160a01b03163314613c37576040805162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015290519081900360640190fd5b60408051808201909152602e546001600160a01b038082168084527401000000000000000000000000000000000000000090920463ffffffff1660208401528416141580613c9557508163ffffffff16816020015163ffffffff1614155b15613d68576040805180820182526001600160a01b0385811680835263ffffffff8681166020948501819052602e80547fffffffffffffffffffffffff00000000000000000000000000000000000000001684177fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000008302179055865187860151875193168352948201528451919493909216927fb04e3a37abe9c0fcdfebdeae019a8e2b12ddf53f5d55ffb0caccc1bedaca1541928290030190a35b505050565b6001600160a01b03828116600090815260076020526040902054163314613ddb576040805162461bcd60e51b815260206004820152601d60248201527f6f6e6c792063757272656e742070617965652063616e20757064617465000000604482015290519081900360640190fd5b336001600160a01b0382161415613e39576040805162461bcd60e51b815260206004820152601760248201527f63616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015290519081900360640190fd5b6001600160a01b03808316600090815260086020526040902080548383167fffffffffffffffffffffffff000000000000000000000000000000000000000082168117909255909116908114613d68576040516001600160a01b038084169133918616907f84f7c7c80bb8ed2279b4aab5f61cd05e6374073d38f46d7f32de8c30e9e3836790600090a4505050565b6000546001600160a01b03163314613f27576040805162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015290519081900360640190fd5b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000546001600160a01b03163314613fef576040805162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015290519081900360640190fd5b611db681614e75565b602b54760100000000000000000000000000000000000000000000900463ffffffff166000818152602c6020908152604091829020825180840190935254601781810b810b810b808552780100000000000000000000000000000000000000000000000090920467ffffffffffffffff1693909201839052929392900b9181908490565b6040805160a08101825260025463ffffffff80821683526401000000008204811660208401526801000000000000000082048116838501526c0100000000000000000000000082048116606084015270010000000000000000000000000000000090910416608082015260035482516103e081019384905291926001600160a01b0390911691600091600590601f908285855b82829054906101000a900461ffff1661ffff168152602001906002019060208260010104928301926001038202915080841161410f575050604080516103e0810191829052959650600095945060099350601f9250905082845b81548152602001906001019080831161416957505050505090506000602a8054806020026020016040519081016040528092919081815260200182805480156141db57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116141bd575b5050505050905060005b815181101561441057600060018483601f81106141fe57fe5b6020020151039050600060018684601f811061421657fe5b60200201510361ffff169050600082896060015163ffffffff168302633b9aca000201905060008111156144055760006007600087878151811061425657fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160a01b03169050886001600160a01b031663a9059cbb82846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156142eb57600080fd5b505af11580156142ff573d6000803e3d6000fd5b505050506040513d602081101561431557600080fd5b5051614368576040805162461bcd60e51b815260206004820152601260248201527f696e73756666696369656e742066756e64730000000000000000000000000000604482015290519081900360640190fd5b60018886601f811061437657fe5b61ffff909216602092909202015260018786601f811061439257fe5b602002018181525050886001600160a01b0316816001600160a01b03168787815181106143bb57fe5b60200260200101516001600160a01b03167fd0b1dac935d85bd54cf0a33b0d41d39f8cf53a968465fc7ea2377526b8ac712c856040518082815260200191505060405180910390a4505b5050506001016141e5565b5061441e600584601f6150f0565b50612787600983601f615186565b6001600160a01b03811660009081526028602090815260408083208151808301909252805460ff8082168452929391929184019161010090910416600281111561447257fe5b600281111561447d57fe5b9052509050600061448d83610b9a565b90508015613d68576001600160a01b0380841660009081526007602090815260408083205460035482517fa9059cbb000000000000000000000000000000000000000000000000000000008152918616600483018190526024830188905292519295169363a9059cbb9360448084019491939192918390030190829087803b15801561451857600080fd5b505af115801561452c573d6000803e3d6000fd5b505050506040513d602081101561454257600080fd5b5051614595576040805162461bcd60e51b815260206004820152601260248201527f696e73756666696369656e742066756e64730000000000000000000000000000604482015290519081900360640190fd5b60016005846000015160ff16601f81106145ab57fe5b601091828204019190066002026101000a81548161ffff021916908361ffff16021790555060016009846000015160ff16601f81106145e657fe5b01556003546040805184815290516001600160a01b039283169284811692908816917fd0b1dac935d85bd54cf0a33b0d41d39f8cf53a968465fc7ea2377526b8ac712c9181900360200190a450505050565b60008a8a8a8a8a8a8a8a8a8a604051602001808b6001600160a01b031681526020018a67ffffffffffffffff16815260200180602001806020018760ff1681526020018667ffffffffffffffff1681526020018060200184810384528c8c82818152602001925060200280828437600083820152601f01601f191690910185810384528a8152602090810191508b908b0280828437600083820152601f01601f191690910185810383528681526020019050868680828437600081840152601f19601f8201169050808301925050509d50505050505050505050505050506040516020818303038152906040528051906020012090509a9950505050505050505050565b6040805160a0808201835263ffffffff88811680845288821660208086018290528984168688018190528985166060808901829052958a166080988901819052600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001687177fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff166401000000008702177fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff16680100000000000000008502177fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff166c010000000000000000000000008402177fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff16700100000000000000000000000000000000830217905589519586529285019390935283880152928201529283015291517fd0d9486a2c673e2a4b57fc82e4c8a556b3e2b82dd5db07e2c04a920ca0f469b6929181900390910190a15050505050565b604080516103e0810191829052600091829190600590601f908285855b82829054906101000a900461ffff1661ffff16815260200190600201906020826001010492830192600103820291508084116148d35790505050505050905060005b601f8110156149435760018282601f811061492c57fe5b60200201510361ffff169290920191600101614915565b506040805160a08101825260025463ffffffff8082168352640100000000820481166020808501919091526801000000000000000083048216848601526c0100000000000000000000000083048216606085018190527001000000000000000000000000000000009093049091166080840152602a805485518184028101840190965280865296909202633b9aca0002959293600093909291830182828015614a1557602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116149f7575b5050604080516103e0810191829052949550600094935060099250601f915082845b815481526020019060010190808311614a37575050505050905060005b8251811015614a7e5760018282601f8110614a6b57fe5b6020020151039590950194600101614a54565b505050505090565b600081831015614a97575081614a9a565b50805b92915050565b602083810286019082020160e4019695505050505050565b60408051808201909152602e546001600160a01b0381168083527401000000000000000000000000000000000000000090910463ffffffff166020830152614b0057506110c1565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff830163ffffffff8181166000818152602c60209081526040918290205486820151875184516024810196909652601792830b90920b604486018190528a8716606487015260848087018b90528551808803909101815260a490960190945291840180517fbeed9b51000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff9091161790529193614bd79391169190614f04565b6123ce576040805162461bcd60e51b815260206004820152601060248201527f696e73756666696369656e742067617300000000000000000000000000000000604482015290519081900360640190fd5b3360009081526028602090815260408083208151808301909252805460ff80821684529293919291840191610100909104166002811115614c6557fe5b6002811115614c7057fe5b9052506040805160a08101825260025463ffffffff80821683526401000000008204811660208401526801000000000000000082048116838501526c0100000000000000000000000082048116606084015270010000000000000000000000000000000090910416608082015281516103e081019283905292935091614d4091859190600590601f90826000855b82829054906101000a900461ffff1661ffff1681526020019060020190602082600101049283019260010382029150808411614cfe5790505050505050614f40565b614d4e90600590601f6150f0565b50600282602001516002811115614d6157fe5b14614db3576040805162461bcd60e51b815260206004820181905260248201527f73656e7420627920756e64657369676e61746564207472616e736d6974746572604482015290519081900360640190fd5b6000614dda633b9aca003a04836020015163ffffffff16846000015163ffffffff16614fb5565b90506010360260005a90506000614df98863ffffffff16858585614fdb565b6fffffffffffffffffffffffffffffffff1690506000620f4240866040015163ffffffff16830281614e2757fe5b049050856080015163ffffffff16633b9aca0002816009896000015160ff16601f8110614e5057fe5b015401016009886000015160ff16601f8110614e6857fe5b0155505050505050505050565b6004546001600160a01b0390811690821681146110c157600480547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03848116918217909255604080519284168352602083019190915280517f793cb73064f3c8cde7e187ae515511e6e56d1ee89bf08b82fa60fb70f8d489129281900390910190a15050565b60005a6113888110614f385761138881039050846040820482031115614f38576000808451602086016000888af150600191505b509392505050565b614f486150ba565b60005b8351811015614fad576000848281518110614f6257fe5b016020015160f81c9050614f878482601f8110614f7b57fe5b60200201516001615067565b848260ff16601f8110614f9657fe5b61ffff909216602092909202015250600101614f4b565b509092915050565b60008383811015614fc857600285850304015b614fd28184614a86565b95945050505050565b600081851015615032576040805162461bcd60e51b815260206004820181905260248201527f6761734c6566742063616e6e6f742065786365656420696e697469616c476173604482015290519081900360640190fd5b818503830161179301633b9aca00858202026fffffffffffffffffffffffffffffffff811061505d57fe5b9695505050505050565b600061507f8261ffff168461ffff160161ffff614a86565b9392505050565b6040518060a001604052806150996151b4565b81526060602082018190526040820181905280820152600060809091015290565b604051806103e00160405280601f906020820280368337509192915050565b604080518082019091526000808252602082015290565b6002830191839082156151765791602002820160005b8382111561514657835183826101000a81548161ffff021916908361ffff1602179055509260200192600201602081600101049283019260010302615106565b80156151745782816101000a81549061ffff0219169055600201602081600101049283019260010302615146565b505b506151829291506151db565b5090565b82601f8101928215615176579160200282015b82811115615176578251825591602001919060010190615199565b60408051608081018252600080825260208201819052918101829052606081019190915290565b5b8082111561518257600081556001016151dc56fe6f7261636c6520616464726573736573206f7574206f6620726567697374726174696f6ea164736f6c6343000706000a",
expectedResult: seth.Pragma{},
expectedError: errors.New(seth.MetadataNotFoundErr),
},
{
name: "Valid Bytecode, No metadata [Ethereum Mainnet LinkToken]",
bytecode: "0x606060405236156100b75763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100bc578063095ea7b31461014757806318160ddd1461017d57806323b872dd146101a2578063313ce567146101de5780634000aea014610207578063661884631461028057806370a08231146102b657806395d89b41146102e7578063a9059cbb14610372578063d73dd623146103a8578063dd62ed3e146103de575b600080fd5b34156100c757600080fd5b6100cf610415565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561010c5780820151818401525b6020016100f3565b50505050905090810190601f1680156101395780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561015257600080fd5b610169600160a060020a036004351660243561044c565b604051901515815260200160405180910390f35b341561018857600080fd5b610190610499565b60405190815260200160405180910390f35b34156101ad57600080fd5b610169600160a060020a03600435811690602435166044356104a9565b604051901515815260200160405180910390f35b34156101e957600080fd5b6101f16104f8565b60405160ff909116815260200160405180910390f35b341561021257600080fd5b61016960048035600160a060020a03169060248035919060649060443590810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496506104fd95505050505050565b604051901515815260200160405180910390f35b341561028b57600080fd5b610169600160a060020a036004351660243561054c565b604051901515815260200160405180910390f35b34156102c157600080fd5b610190600160a060020a0360043516610648565b60405190815260200160405180910390f35b34156102f257600080fd5b6100cf610667565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561010c5780820151818401525b6020016100f3565b50505050905090810190601f1680156101395780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561037d57600080fd5b610169600160a060020a036004351660243561069e565b604051901515815260200160405180910390f35b34156103b357600080fd5b610169600160a060020a03600435166024356106eb565b604051901515815260200160405180910390f35b34156103e957600080fd5b610190600160a060020a0360043581169060243516610790565b60405190815260200160405180910390f35b60408051908101604052600f81527f436861696e4c696e6b20546f6b656e0000000000000000000000000000000000602082015281565b600082600160a060020a03811615801590610479575030600160a060020a031681600160a060020a031614155b151561048457600080fd5b61048e84846107bd565b91505b5b5092915050565b6b033b2e3c9fd0803ce800000081565b600082600160a060020a038116158015906104d6575030600160a060020a031681600160a060020a031614155b15156104e157600080fd5b6104ec85858561082a565b91505b5b509392505050565b601281565b600083600160a060020a0381161580159061052a575030600160a060020a031681600160a060020a031614155b151561053557600080fd5b6104ec85858561093c565b91505b5b509392505050565b600160a060020a033381166000908152600260209081526040808320938616835292905290812054808311156105a957600160a060020a0333811660009081526002602090815260408083209388168352929052908120556105e0565b6105b9818463ffffffff610a2316565b600160a060020a033381166000908152600260209081526040808320938916835292905220555b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a3600191505b5092915050565b600160a060020a0381166000908152600160205260409020545b919050565b60408051908101604052600481527f4c494e4b00000000000000000000000000000000000000000000000000000000602082015281565b600082600160a060020a038116158015906106cb575030600160a060020a031681600160a060020a031614155b15156106d657600080fd5b61048e8484610a3a565b91505b5b5092915050565b600160a060020a033381166000908152600260209081526040808320938616835292905290812054610723908363ffffffff610afa16565b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a35060015b92915050565b600160a060020a038083166000908152600260209081526040808320938516835292905220545b92915050565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a35060015b92915050565b600160a060020a03808416600081815260026020908152604080832033909516835293815283822054928252600190529182205461086e908463ffffffff610a2316565b600160a060020a0380871660009081526001602052604080822093909355908616815220546108a3908463ffffffff610afa16565b600160a060020a0385166000908152600160205260409020556108cc818463ffffffff610a2316565b600160a060020a03808716600081815260026020908152604080832033861684529091529081902093909355908616917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9086905190815260200160405180910390a3600191505b509392505050565b60006109488484610a3a565b5083600160a060020a031633600160a060020a03167fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c16858560405182815260406020820181815290820183818151815260200191508051906020019080838360005b838110156109c35780820151818401525b6020016109aa565b50505050905090810190601f1680156109f05780820380516001836020036101000a031916815260200191505b50935050505060405180910390a3610a0784610b14565b15610a1757610a17848484610b23565b5b5060015b9392505050565b600082821115610a2f57fe5b508082035b92915050565b600160a060020a033316600090815260016020526040812054610a63908363ffffffff610a2316565b600160a060020a033381166000908152600160205260408082209390935590851681522054610a98908363ffffffff610afa16565b600160a060020a0380851660008181526001602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060015b92915050565b600082820183811015610b0957fe5b8091505b5092915050565b6000813b908111905b50919050565b82600160a060020a03811663a4c0ed363385856040518463ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610bbd5780820151818401525b602001610ba4565b50505050905090810190601f168015610bea5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b1515610c0a57600080fd5b6102c65a03f11515610c1b57600080fd5b5050505b505050505600a165627a7a72305820c5f438ff94e5ddaf2058efa0019e246c636c37a622e04bb67827c7374acad8d60029",
expectedResult: seth.Pragma{},
expectedError: errors.New(seth.MetadataNotFoundErr),
},
{
name: "Invalid bytecode [random string]",
bytecode: "hasd981y7971298e12hdasjkhdkjdkadhsakjdhsakj071982749812",
expectedResult: seth.Pragma{},
expectedError: errors.New(seth.MetadataNotFoundErr),
},
{
name: "Corrupted Bytecode [Automation Registar Wrapper 2_1] with solc marker changed",
bytecode: "0x60a06040523480156200001157600080fd5b5060405162002d8238038062002d8283398101604081905262000034916200043b565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be816200017a565b5050506001600160a01b038416608052620000da838362000225565b60005b81518110156200016f576200015a82828151811062000100576200010062000598565b60200260200101516000015183838151811062000121576200012162000598565b60200260200101516020015184848151811062000142576200014262000598565b6020026020010151604001516200029e60201b60201c565b806200016681620005ae565b915050620000dd565b50505050506200062f565b336001600160a01b03821603620001d45760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6200022f6200034c565b6040805180820182526001600160a01b0384168082526001600160601b0384166020928301819052600160a01b810282176004558351918252918101919091527f39ce5d867555f0b0183e358fce5b158e7ca4fecd7c01cb7e0e19f1e23285838a910160405180910390a15050565b620002a86200034c565b60ff83166000908152600360205260409020805483919060ff19166001836002811115620002da57620002da620005d6565b021790555060ff831660009081526003602052604090819020805464ffffffff00191661010063ffffffff851602179055517f830a6d06a4e2caac67eba04323de22bdb04f032dd8b3d6a0c52b503d9a7036a3906200033f90859085908590620005ec565b60405180910390a1505050565b6000546001600160a01b03163314620003a85760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640162000082565b565b80516001600160a01b0381168114620003c257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715620004025762000402620003c7565b60405290565b604051601f8201601f191681016001600160401b0381118282101715620004335762000433620003c7565b604052919050565b600080600080608085870312156200045257600080fd5b6200045d85620003aa565b935060206200046e818701620003aa565b604087810151919550906001600160601b03811681146200048e57600080fd5b606088810151919550906001600160401b0380821115620004ae57600080fd5b818a0191508a601f830112620004c357600080fd5b815181811115620004d857620004d8620003c7565b620004e8868260051b0162000408565b818152868101925090840283018601908c8211156200050657600080fd5b928601925b81841015620005875784848e031215620005255760008081fd5b6200052f620003dd565b845160ff81168114620005425760008081fd5b81528488015160038110620005575760008081fd5b818901528487015163ffffffff81168114620005735760008081fd5b81880152835292840192918601916200050b565b999c989b5096995050505050505050565b634e487b7160e01b600052603260045260246000fd5b600060018201620005cf57634e487b7160e01b600052601160045260246000fd5b5060010190565b634e487b7160e01b600052602160045260246000fd5b60ff8416815260608101600384106200061557634e487b7160e01b600052602160045260246000fd5b83602083015263ffffffff83166040830152949350505050565b6080516127146200066e60003960008181610177015281816105d601528181610887015281816109bd01528181610f0e015261171b01526127146000f3fe608060405234801561001057600080fd5b506004361061011b5760003560e01c8063856853e6116100b2578063b5ff5b4111610081578063c4d252f511610066578063c4d252f5146103e3578063e8d4070d146103f6578063f2fde38b1461040957600080fd5b8063b5ff5b4114610369578063c3f909d41461037c57600080fd5b8063856853e61461027857806388b12d551461028b5780638da5cb5b14610338578063a4c0ed361461035657600080fd5b80633f678e11116100ee5780633f678e11146101f35780636c4cdfc31461021457806379ba5097146102275780637e776f7f1461022f57600080fd5b8063181f5a77146101205780631b6b6d2314610172578063212d0884146101be578063367b9b4f146101de575b600080fd5b61015c6040518060400160405280601981526020017f4175746f6d6174696f6e52656769737472617220322e312e300000000000000081525081565b6040516101699190611a74565b60405180910390f35b6101997f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610169565b6101d16101cc366004611aa4565b61041c565b6040516101699190611b29565b6101f16101ec366004611b9d565b6104a9565b005b610206610201366004611bd6565b61053b565b604051908152602001610169565b6101f1610222366004611c2e565b6106d3565b6101f161076d565b61026861023d366004611c63565b73ffffffffffffffffffffffffffffffffffffffff1660009081526005602052604090205460ff1690565b6040519015158152602001610169565b6101f1610286366004611de1565b61086f565b6102ff610299366004611f40565b60009081526002602090815260409182902082518084019093525473ffffffffffffffffffffffffffffffffffffffff8116808452740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff169290910182905291565b6040805173ffffffffffffffffffffffffffffffffffffffff90931683526bffffffffffffffffffffffff909116602083015201610169565b60005473ffffffffffffffffffffffffffffffffffffffff16610199565b6101f1610364366004611f59565b6109a5565b6101f1610377366004611fb5565b610ce3565b60408051808201825260045473ffffffffffffffffffffffffffffffffffffffff8116808352740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff16602092830181905283519182529181019190915201610169565b6101f16103f1366004611f40565b610dc2565b6101f1610404366004611ffe565b61104c565b6101f1610417366004611c63565b6112d9565b60408051606080820183526000808352602080840182905283850182905260ff86811683526003909152908490208451928301909452835492939192839116600281111561046c5761046c611abf565b600281111561047d5761047d611abf565b8152905463ffffffff610100820481166020840152650100000000009091041660409091015292915050565b6104b16112ed565b73ffffffffffffffffffffffffffffffffffffffff821660008181526005602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527f20c6237dac83526a849285a9f79d08a483291bdd3a056a0ef9ae94ecee1ad356910160405180910390a25050565b6004546000907401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1661057961014084016101208501612109565b6bffffffffffffffffffffffff1610156105bf576040517fcd1c886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166323b872dd333061060f61014087016101208801612109565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff93841660048201529290911660248301526bffffffffffffffffffffffff1660448201526064016020604051808303816000875af1158015610696573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ba9190612124565b506106cd6106c783612141565b33611370565b92915050565b6106db6112ed565b60408051808201825273ffffffffffffffffffffffffffffffffffffffff84168082526bffffffffffffffffffffffff8416602092830181905274010000000000000000000000000000000000000000810282176004558351918252918101919091527f39ce5d867555f0b0183e358fce5b158e7ca4fecd7c01cb7e0e19f1e23285838a910160405180910390a15050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146107f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146108de576040517f018d10be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109966040518061014001604052808e81526020018d8d8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509082525073ffffffffffffffffffffffffffffffffffffffff808d16602083015263ffffffff8c1660408301528a16606082015260ff8916608082015260a0810188905260c0810187905260e081018690526bffffffffffffffffffffffff85166101009091015282611370565b50505050505050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610a14576040517f018d10be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81818080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505060208101517fffffffff0000000000000000000000000000000000000000000000000000000081167f856853e60000000000000000000000000000000000000000000000000000000014610aca576040517fe3d6792100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8484846000610adc8260048186612276565b810190610ae991906122a0565b509950505050505050505050806bffffffffffffffffffffffff168414610b3c576040517f55e97b0d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8988886000610b4e8260048186612276565b810190610b5b91906122a0565b9a50505050505050505050508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614610bcc576040517ff8c5638e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6004547401000000000000000000000000000000000000000090046bffffffffffffffffffffffff168d1015610c2e576040517fcd1c886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60003073ffffffffffffffffffffffffffffffffffffffff168d8d604051610c579291906123dd565b600060405180830381855af49150503d8060008114610c92576040519150601f19603f3d011682016040523d82523d6000602084013e610c97565b606091505b5050905080610cd2576040517f649bf81000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050505050505050505050565b610ceb6112ed565b60ff8316600090815260036020526040902080548391907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001836002811115610d3857610d38611abf565b021790555060ff83166000908152600360205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ff1661010063ffffffff851602179055517f830a6d06a4e2caac67eba04323de22bdb04f032dd8b3d6a0c52b503d9a7036a390610db5908590859085906123ed565b60405180910390a1505050565b60008181526002602090815260409182902082518084019093525473ffffffffffffffffffffffffffffffffffffffff8116808452740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff1691830191909152331480610e49575060005473ffffffffffffffffffffffffffffffffffffffff1633145b610e7f576040517f61685c2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805173ffffffffffffffffffffffffffffffffffffffff16610ecd576040517f4b13b31e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260026020908152604080832083905583519184015190517fa9059cbb0000000000000000000000000000000000000000000000000000000081527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169263a9059cbb92610f859260040173ffffffffffffffffffffffffffffffffffffffff9290921682526bffffffffffffffffffffffff16602082015260400190565b6020604051808303816000875af1158015610fa4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc89190612124565b90508061101c5781516040517fc2e4dce800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016107ea565b60405183907f3663fb28ebc87645eb972c9dad8521bf665c623f287e79f1c56f1eb374b82a2290600090a2505050565b6110546112ed565b60008181526002602090815260409182902082518084019093525473ffffffffffffffffffffffffffffffffffffffff8116808452740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff16918301919091526110ed576040517f4b13b31e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008b8b8b8b8b8b8b8b8b60405160200161111099989796959493929190612461565b604051602081830303815290604052805190602001209050808314611161576040517f3f4d605300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60026000848152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000820160146101000a8154906bffffffffffffffffffffffff021916905550506112c96040518061014001604052808f81526020016040518060200160405280600081525081526020018e73ffffffffffffffffffffffffffffffffffffffff1681526020018d63ffffffff1681526020018c73ffffffffffffffffffffffffffffffffffffffff1681526020018b60ff1681526020018a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509082525060208082018a905260408051601f8a0183900483028101830182528981529201919089908990819084018382808284376000920191909152505050908252506020858101516bffffffffffffffffffffffff1691015282611647565b5050505050505050505050505050565b6112e16112ed565b6112ea81611876565b50565b60005473ffffffffffffffffffffffffffffffffffffffff16331461136e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016107ea565b565b608082015160009073ffffffffffffffffffffffffffffffffffffffff166113c4576040517f05bb467c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008360400151846060015185608001518660a001518760c001518860e0015189610100015160405160200161140097969594939291906124e7565b604051602081830303815290604052805190602001209050836040015173ffffffffffffffffffffffffffffffffffffffff16817f7684390ebb103102f7f48c71439c2408713f8d437782a6fab2756acc0e42c1b786600001518760200151886060015189608001518a60a001518b60e001518c61010001518d60c001518e610120015160405161149999989796959493929190612569565b60405180910390a360a084015160ff9081166000908152600360205260408082208151606081019092528054929361151c9383911660028111156114df576114df611abf565b60028111156114f0576114f0611abf565b8152905463ffffffff61010082048116602084015265010000000000909104166040909101528561196b565b156115845760a085015160ff166000908152600360205260409020805465010000000000900463ffffffff1690600561155483612653565b91906101000a81548163ffffffff021916908363ffffffff1602179055505061157d8583611647565b905061163f565b61012085015160008381526002602052604081205490916115ca917401000000000000000000000000000000000000000090046bffffffffffffffffffffffff16612676565b604080518082018252608089015173ffffffffffffffffffffffffffffffffffffffff90811682526bffffffffffffffffffffffff9384166020808401918252600089815260029091529390932091519251909316740100000000000000000000000000000000000000000291909216179055505b949350505050565b600480546040808501516060860151608087015160a088015160c089015160e08a01516101008b015196517f28f32f3800000000000000000000000000000000000000000000000000000000815260009973ffffffffffffffffffffffffffffffffffffffff909916988a988a986328f32f38986116d29891979096919590949193909291016124e7565b6020604051808303816000875af11580156116f1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061171591906126a2565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16634000aea0848861012001518560405160200161176f91815260200190565b6040516020818303038152906040526040518463ffffffff1660e01b815260040161179c939291906126bb565b6020604051808303816000875af11580156117bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117df9190612124565b905080611830576040517fc2e4dce800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841660048201526024016107ea565b81857fb9a292fb7e3edd920cd2d2829a3615a640c43fd7de0a0820aa0668feb4c37d4b88600001516040516118659190611a74565b60405180910390a350949350505050565b3373ffffffffffffffffffffffffffffffffffffffff8216036118f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016107ea565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000808351600281111561198157611981611abf565b0361198e575060006106cd565b6001835160028111156119a3576119a3611abf565b1480156119d6575073ffffffffffffffffffffffffffffffffffffffff821660009081526005602052604090205460ff16155b156119e3575060006106cd565b826020015163ffffffff16836040015163ffffffff161015611a07575060016106cd565b50600092915050565b6000815180845260005b81811015611a3657602081850181015186830182015201611a1a565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000611a876020830184611a10565b9392505050565b803560ff81168114611a9f57600080fd5b919050565b600060208284031215611ab657600080fd5b611a8782611a8e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60038110611b25577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b6000606082019050611b3c828451611aee565b602083015163ffffffff8082166020850152806040860151166040850152505092915050565b73ffffffffffffffffffffffffffffffffffffffff811681146112ea57600080fd5b8035611a9f81611b62565b80151581146112ea57600080fd5b60008060408385031215611bb057600080fd5b8235611bbb81611b62565b91506020830135611bcb81611b8f565b809150509250929050565b600060208284031215611be857600080fd5b813567ffffffffffffffff811115611bff57600080fd5b82016101408185031215611a8757600080fd5b80356bffffffffffffffffffffffff81168114611a9f57600080fd5b60008060408385031215611c4157600080fd5b8235611c4c81611b62565b9150611c5a60208401611c12565b90509250929050565b600060208284031215611c7557600080fd5b8135611a8781611b62565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610140810167ffffffffffffffff81118282101715611cd357611cd3611c80565b60405290565b600082601f830112611cea57600080fd5b813567ffffffffffffffff80821115611d0557611d05611c80565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715611d4b57611d4b611c80565b81604052838152866020858801011115611d6457600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008083601f840112611d9657600080fd5b50813567ffffffffffffffff811115611dae57600080fd5b602083019150836020828501011115611dc657600080fd5b9250929050565b803563ffffffff81168114611a9f57600080fd5b6000806000806000806000806000806000806101608d8f031215611e0457600080fd5b67ffffffffffffffff8d351115611e1a57600080fd5b611e278e8e358f01611cd9565b9b5067ffffffffffffffff60208e01351115611e4257600080fd5b611e528e60208f01358f01611d84565b909b509950611e6360408e01611b84565b9850611e7160608e01611dcd565b9750611e7f60808e01611b84565b9650611e8d60a08e01611a8e565b955067ffffffffffffffff60c08e01351115611ea857600080fd5b611eb88e60c08f01358f01611cd9565b945067ffffffffffffffff60e08e01351115611ed357600080fd5b611ee38e60e08f01358f01611cd9565b935067ffffffffffffffff6101008e01351115611eff57600080fd5b611f108e6101008f01358f01611cd9565b9250611f1f6101208e01611c12565b9150611f2e6101408e01611b84565b90509295989b509295989b509295989b565b600060208284031215611f5257600080fd5b5035919050565b60008060008060608587031215611f6f57600080fd5b8435611f7a81611b62565b935060208501359250604085013567ffffffffffffffff811115611f9d57600080fd5b611fa987828801611d84565b95989497509550505050565b600080600060608486031215611fca57600080fd5b611fd384611a8e565b9250602084013560038110611fe757600080fd5b9150611ff560408501611dcd565b90509250925092565b60008060008060008060008060008060006101208c8e03121561202057600080fd5b67ffffffffffffffff808d35111561203757600080fd5b6120448e8e358f01611cd9565b9b5061205260208e01611b84565b9a5061206060408e01611dcd565b995061206e60608e01611b84565b985061207c60808e01611a8e565b97508060a08e0135111561208f57600080fd5b61209f8e60a08f01358f01611d84565b909750955060c08d01358110156120b557600080fd5b6120c58e60c08f01358f01611cd9565b94508060e08e013511156120d857600080fd5b506120e98d60e08e01358e01611d84565b81945080935050506101008c013590509295989b509295989b9093969950565b60006020828403121561211b57600080fd5b611a8782611c12565b60006020828403121561213657600080fd5b8151611a8781611b8f565b6000610140823603121561215457600080fd5b61215c611caf565b823567ffffffffffffffff8082111561217457600080fd5b61218036838701611cd9565b8352602085013591508082111561219657600080fd5b6121a236838701611cd9565b60208401526121b360408601611b84565b60408401526121c460608601611dcd565b60608401526121d560808601611b84565b60808401526121e660a08601611a8e565b60a084015260c08501359150808211156121ff57600080fd5b61220b36838701611cd9565b60c084015260e085013591508082111561222457600080fd5b61223036838701611cd9565b60e08401526101009150818501358181111561224b57600080fd5b61225736828801611cd9565b8385015250505061012061226c818501611c12565b9082015292915050565b6000808585111561228657600080fd5b8386111561229357600080fd5b5050820193919092039150565b60008060008060008060008060008060006101608c8e0312156122c257600080fd5b67ffffffffffffffff808d3511156122d957600080fd5b6122e68e8e358f01611cd9565b9b508060208e013511156122f957600080fd5b6123098e60208f01358f01611cd9565b9a5061231760408e01611b84565b995061232560608e01611dcd565b985061233360808e01611b84565b975061234160a08e01611a8e565b96508060c08e0135111561235457600080fd5b6123648e60c08f01358f01611cd9565b95508060e08e0135111561237757600080fd5b6123878e60e08f01358f01611cd9565b9450806101008e0135111561239b57600080fd5b506123ad8d6101008e01358e01611cd9565b92506123bc6101208d01611c12565b91506123cb6101408d01611b84565b90509295989b509295989b9093969950565b8183823760009101908152919050565b60ff84168152606081016124046020830185611aee565b63ffffffff83166040830152949350505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b600073ffffffffffffffffffffffffffffffffffffffff808c16835263ffffffff8b166020840152808a1660408401525060ff8816606083015260e060808301526124b060e083018789612418565b82810360a08401526124c28187611a10565b905082810360c08401526124d7818587612418565b9c9b505050505050505050505050565b600073ffffffffffffffffffffffffffffffffffffffff808a16835263ffffffff8916602084015280881660408401525060ff8616606083015260e0608083015261253560e0830186611a10565b82810360a08401526125478186611a10565b905082810360c084015261255b8185611a10565b9a9950505050505050505050565b600061012080835261257d8184018d611a10565b90508281036020840152612591818c611a10565b905063ffffffff8a16604084015273ffffffffffffffffffffffffffffffffffffffff8916606084015260ff8816608084015282810360a08401526125d68188611a10565b905082810360c08401526125ea8187611a10565b905082810360e08401526125fe8186611a10565b9150506bffffffffffffffffffffffff83166101008301529a9950505050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600063ffffffff80831681810361266c5761266c612624565b6001019392505050565b6bffffffffffffffffffffffff81811683821601908082111561269b5761269b612624565b5092915050565b6000602082840312156126b457600080fd5b5051919050565b73ffffffffffffffffffffffffffffffffffffffff841681526bffffffffffffffffffffffff831660208201526060604082015260006126fe6060830184611a10565b9594505050505056fea164736e6c6343000810000a",
expectedResult: seth.Pragma{},
expectedError: errors.New(seth.NotCompiledWithSolcErr),
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
result, err := seth.DecodePragmaVersion(tt.bytecode)
if tt.expectedError != nil {
require.Error(t, err)
require.Equal(t, tt.expectedError.Error(), err.Error())
} else {
require.NoError(t, err)
}
require.Equal(t, tt.expectedResult, result)
})
}
}
func TestUtilDoesPragmaSupportCustomRevert(t *testing.T) {
tests := []struct {
name string
input seth.Pragma
expected bool
}{
{
name: "Major version less than required",
input: seth.Pragma{Major: 0, Minor: 7, Patch: 3},
expected: false,
},
{
name: "Minor version less than required",
input: seth.Pragma{Major: 0, Minor: 7, Patch: 5},
expected: false,
},
{
name: "Patch version less than required",
input: seth.Pragma{Major: 0, Minor: 8, Patch: 3},
expected: false,
},
{
name: "Exact required version",
input: seth.Pragma{Major: 0, Minor: 8, Patch: 4},
expected: true,
},
{
name: "Higher minor version",
input: seth.Pragma{Major: 0, Minor: 9, Patch: 0},
expected: true,
},
{
name: "Higher patch version",
input: seth.Pragma{Major: 0, Minor: 8, Patch: 5},
expected: true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
result := seth.DoesPragmaSupportCustomRevert(tt.input)
require.Equal(t, tt.expected, result)
})
}
}
func TestUtilPendingNonce(t *testing.T) {
c := newClient(t)
c.Cfg.Network.PrivateKeys = append(c.Cfg.Network.PrivateKeys, c.Cfg.Network.PrivateKeys[0])
c.Addresses = append(c.Addresses, c.Addresses[0])
c.PrivateKeys = append(c.PrivateKeys, c.PrivateKeys[0])
type tc struct {
name string
keyNum int
timeout time.Duration
shouldFail bool
}
tests := []tc{
{
name: "processes all in time",
keyNum: 0,
timeout: 1 * time.Minute,
shouldFail: false,
},
{
name: "times out",
keyNum: 1,
timeout: 1 * time.Second,
shouldFail: true,
},
}
for _, testCase := range tests {
started := make(chan struct{})
nonce, err := c.Client.NonceAt(context.Background(), c.Addresses[testCase.keyNum], nil)
require.NoError(t, err, "Error getting nonce")
nonceMutex := sync.Mutex{}
var getNonceAndIncrement = func() uint64 {
nonceMutex.Lock()
defer nonceMutex.Unlock()
currentNonce := nonce
nonce++
return currentNonce
}
nonceCh := make(chan uint64, 100)
go func() {
for nonce := range nonceCh {
_ = nonce
}
}()
go func() {
for i := 1; i <= 5000; i++ {
go func(index int) {
seth.L.Debug().Msgf("Starting tx %d", index)
opts := c.NewTXOpts()
nonceToUse := int64(getNonceAndIncrement())
opts.Nonce = big.NewInt(nonceToUse)
defer seth.L.Debug().Msgf("Finished tx %d with nonce %d", index, nonceToUse)
_, _, _, err := network_sub_contract.DeployNetworkDebugSubContract(opts, c.Client)
require.NoError(t, err, "Error adding counter")
if index == 50 {
started <- struct{}{}
}
nonceCh <- uint64(nonceToUse)
}(i)
}
}()
<-started
lastNonce, err := c.Client.NonceAt(context.Background(), c.Addresses[testCase.keyNum], nil)
require.NoError(t, err, "Error getting last nonce")
pendingNonce, err := c.Client.PendingNonceAt(context.Background(), c.Addresses[testCase.keyNum])
require.NoError(t, err, "Error getting pending nonce")
require.Greater(t, int64(pendingNonce), int64(lastNonce), "Pending nonce should be greater than last nonce")
if testCase.keyNum == 0 {
err = c.WaitUntilNoPendingTxForRootKey(testCase.timeout)
} else {
err = c.WaitUntilNoPendingTxForKeyNum(testCase.keyNum, testCase.timeout)
}
if testCase.shouldFail {
require.Error(t, err, "No error, when waiting for pending tx to be processed")
} else {
require.NoError(t, err, "Error waiting for pending tx")
}
}
}
func TestUtilPendingNonce_InvalidKey(t *testing.T) {
c := newClient(t)
invalidKeys := []int{-1, 100}
for _, key := range invalidKeys {
err := c.WaitUntilNoPendingTxForKeyNum(key, 1*time.Second)
require.Error(t, err, "No error, when passing invalid key num")
}
}