abidump 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +46 -102
- data/Rakefile +1 -1
- data/lib/abidump.rb +25 -19
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f2dc33040c14d033301c064a4d7c55689c43f2419e3dc948158f07152e8c1ec
|
4
|
+
data.tar.gz: 890e3b8b95fda78b3d4dc537f6f703a0ae54078852d327132b439c065d03097c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d306476559852cb6317ba0b451033df61ea3b66d7f17f99f063e86114acf7d3f85d471a792e1d5fce53c7f4ddec9249d2335ba6b5d35a5de7ac12576609086c
|
7
|
+
data.tar.gz: 6c8a2646ac45ae3825f774b2f8005913d4b4b6d28e4a5797500e97b52ab484f2dda7a52c8da170769d7a52aac75207f86cf55b122f1517d47cc620c5c0ee6419
|
data/README.md
CHANGED
@@ -60,82 +60,56 @@ resulting in:
|
|
60
60
|
|
61
61
|
==> constructor:
|
62
62
|
payable: true
|
63
|
-
inputs (0)
|
64
|
-
[]
|
63
|
+
inputs (0)
|
65
64
|
|
66
65
|
==> event Assign:
|
67
66
|
anonymous: false
|
68
67
|
inputs (2):
|
69
|
-
|
70
|
-
|
71
|
-
name: to
|
72
|
-
- type: uint256
|
73
|
-
indexed: false
|
74
|
-
name: punkIndex
|
68
|
+
address indexed to
|
69
|
+
uint256 punkIndex
|
75
70
|
|
76
71
|
==> event Transfer:
|
77
72
|
anonymous: false
|
78
73
|
inputs (3):
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
- type: address
|
83
|
-
indexed: true
|
84
|
-
name: to
|
85
|
-
- type: uint256
|
86
|
-
indexed: false
|
87
|
-
name: value
|
74
|
+
address indexed from
|
75
|
+
address indexed to
|
76
|
+
uint256 value
|
88
77
|
|
89
78
|
==> event PunkTransfer:
|
90
79
|
anonymous: false
|
91
80
|
inputs (3):
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
- type: address
|
96
|
-
indexed: true
|
97
|
-
name: to
|
98
|
-
- type: uint256
|
99
|
-
indexed: false
|
100
|
-
name: punkIndex
|
81
|
+
address indexed from
|
82
|
+
address indexed to
|
83
|
+
uint256 punkIndex
|
101
84
|
|
102
85
|
...
|
103
86
|
|
87
|
+
|
104
88
|
==> function name:
|
105
89
|
constant: true
|
106
90
|
payable: false
|
107
|
-
inputs (0)
|
108
|
-
[]
|
91
|
+
inputs (0)
|
109
92
|
outputs (1):
|
110
|
-
|
111
|
-
name: _
|
93
|
+
string _
|
112
94
|
|
113
95
|
==> function reservePunksForOwner:
|
114
96
|
constant: false
|
115
97
|
payable: false
|
116
98
|
inputs (1):
|
117
|
-
|
118
|
-
|
119
|
-
outputs (0):
|
120
|
-
[]
|
99
|
+
uint256 maxForThisRun
|
100
|
+
outputs (0)
|
121
101
|
|
122
102
|
==> function punksOfferedForSale:
|
123
103
|
constant: true
|
124
104
|
payable: false
|
125
105
|
inputs (1):
|
126
|
-
|
127
|
-
name: _
|
106
|
+
uint256 _
|
128
107
|
outputs (5):
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
name: seller
|
135
|
-
- type: uint256
|
136
|
-
name: minValue
|
137
|
-
- type: address
|
138
|
-
name: onlySellTo
|
108
|
+
bool isForSale
|
109
|
+
uint256 punkIndex
|
110
|
+
address seller
|
111
|
+
uint256 minValue
|
112
|
+
address onlySellTo
|
139
113
|
|
140
114
|
...
|
141
115
|
```
|
@@ -162,94 +136,64 @@ resulting in:
|
|
162
136
|
|
163
137
|
==> constructor:
|
164
138
|
stateMutability: nonpayable
|
165
|
-
inputs (0)
|
166
|
-
[]
|
139
|
+
inputs (0)
|
167
140
|
|
168
141
|
==> event NewBlock:
|
169
142
|
anonymous: false
|
170
143
|
inputs (3):
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
- type: uint256
|
175
|
-
indexed: false
|
176
|
-
name: _
|
177
|
-
- type: string
|
178
|
-
indexed: false
|
179
|
-
name: _
|
144
|
+
address _
|
145
|
+
uint256 _
|
146
|
+
string _
|
180
147
|
|
181
148
|
==> function blocks:
|
182
149
|
stateMutability: view
|
183
150
|
inputs (1):
|
184
|
-
|
185
|
-
name: _
|
151
|
+
bytes32 _
|
186
152
|
outputs (3):
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
name: dataMale
|
191
|
-
- type: bytes
|
192
|
-
name: dataFemale
|
153
|
+
uint8 layer - enum PunkBlocks.Layer
|
154
|
+
bytes dataMale
|
155
|
+
bytes dataFemale
|
193
156
|
|
194
157
|
==> function getBlocks:
|
195
158
|
stateMutability: view
|
196
159
|
inputs (2):
|
197
|
-
|
198
|
-
|
199
|
-
- type: uint256
|
200
|
-
name: _count
|
160
|
+
uint256 _fromID
|
161
|
+
uint256 _count
|
201
162
|
outputs (2):
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
- type: bytes
|
208
|
-
name: dataMale
|
209
|
-
- type: bytes
|
210
|
-
name: dataFemale
|
211
|
-
- type: uint256
|
212
|
-
name: _
|
163
|
+
tuple[] _ - struct PunkBlocks.Block[]
|
164
|
+
uint8 layer - enum PunkBlocks.Layer
|
165
|
+
bytes dataMale
|
166
|
+
bytes dataFemale
|
167
|
+
uint256 _
|
213
168
|
|
214
169
|
==> function index:
|
215
170
|
stateMutability: view
|
216
171
|
inputs (1):
|
217
|
-
|
218
|
-
name: _
|
172
|
+
uint256 _
|
219
173
|
outputs (1):
|
220
|
-
|
221
|
-
name: _
|
174
|
+
bytes32 _
|
222
175
|
|
223
176
|
==> function nextId:
|
224
177
|
stateMutability: view
|
225
|
-
inputs (0)
|
226
|
-
[]
|
178
|
+
inputs (0)
|
227
179
|
outputs (1):
|
228
|
-
|
229
|
-
name: _
|
180
|
+
uint256 _
|
230
181
|
|
231
182
|
==> function registerBlock:
|
232
183
|
stateMutability: nonpayable
|
233
184
|
inputs (4):
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
name: _layer
|
240
|
-
- type: string
|
241
|
-
name: _name
|
242
|
-
outputs (0):
|
243
|
-
[]
|
185
|
+
bytes _dataMale
|
186
|
+
bytes _dataFemale
|
187
|
+
uint8 _layer
|
188
|
+
string _name
|
189
|
+
outputs (0)
|
244
190
|
|
245
191
|
==> function svgFromIDs:
|
246
192
|
stateMutability: view
|
247
193
|
inputs (1):
|
248
|
-
|
249
|
-
name: _ids
|
194
|
+
uint256[] _ids
|
250
195
|
outputs (1):
|
251
|
-
|
252
|
-
name: _
|
196
|
+
string _
|
253
197
|
|
254
198
|
...
|
255
199
|
```
|
data/Rakefile
CHANGED
@@ -10,7 +10,7 @@ end
|
|
10
10
|
|
11
11
|
Hoe.spec 'abidump' do
|
12
12
|
|
13
|
-
self.version = '0.1.
|
13
|
+
self.version = '0.1.1'
|
14
14
|
|
15
15
|
self.summary = "abidump gem - command-line tool to dump / pretty print or (re)format application binary interfaces (abi) for Ethereum & Co."
|
16
16
|
self.description = summary
|
data/lib/abidump.rb
CHANGED
@@ -72,7 +72,7 @@ module ABIDump
|
|
72
72
|
puts buf
|
73
73
|
end
|
74
74
|
|
75
|
-
def self.
|
75
|
+
def self._dump_types( data, indent: 2 )
|
76
76
|
## hack: remove items and re-add to sort key order!!!
|
77
77
|
##
|
78
78
|
## clean-up / normalize type
|
@@ -91,26 +91,24 @@ module ABIDump
|
|
91
91
|
exit 1
|
92
92
|
end
|
93
93
|
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
end
|
98
|
-
|
99
|
-
h['indexed'] = indexed unless indexed.nil? ## note: indexed is a true/false prop
|
100
|
-
|
94
|
+
print ' ' * indent
|
95
|
+
print type
|
96
|
+
print ' indexed' if indexed ## note: indexed is a true/false prop
|
101
97
|
## note: change empty name e.g. '' to _ - why? why not?
|
102
98
|
if name
|
103
|
-
|
99
|
+
print ' '
|
100
|
+
print name.empty? ? "_" : name
|
104
101
|
end
|
105
102
|
|
106
|
-
if
|
107
|
-
|
108
|
-
|
109
|
-
|
103
|
+
print " - #{internal_type}" if type && internal_type && type != internal_type
|
104
|
+
print "\n"
|
105
|
+
|
106
|
+
_dump_types( components, indent: indent+2 ) if components
|
110
107
|
end
|
111
108
|
end
|
112
109
|
|
113
110
|
|
111
|
+
|
114
112
|
def self._dump( data, indent: 2 )
|
115
113
|
buf = YAML.dump( data )
|
116
114
|
buf = buf.sub( /^---\n?/, '' ) ## remove leading --- if present
|
@@ -153,15 +151,23 @@ module ABIDump
|
|
153
151
|
_dump( h, indent: 6 )
|
154
152
|
|
155
153
|
if inputs
|
156
|
-
|
157
|
-
|
158
|
-
|
154
|
+
print " inputs (#{inputs.size})"
|
155
|
+
if inputs.size > 0
|
156
|
+
print ":\n"
|
157
|
+
_dump_types( inputs, indent: 6 )
|
158
|
+
else
|
159
|
+
print "\n"
|
160
|
+
end
|
159
161
|
end
|
160
162
|
|
161
163
|
if outputs
|
162
|
-
|
163
|
-
|
164
|
-
|
164
|
+
print " outputs (#{outputs.size})"
|
165
|
+
if outputs.size > 0
|
166
|
+
print ":\n"
|
167
|
+
_dump_types( outputs, indent: 6 )
|
168
|
+
else
|
169
|
+
print "\n"
|
170
|
+
end
|
165
171
|
end
|
166
172
|
end
|
167
173
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: abidump
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerald Bauer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-02-
|
11
|
+
date: 2023-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cocos
|