abiparser 0.1.1 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9f938a2858e7da14cc5a8b42f4691a93c4721cef9e271168de78535c64f70115
4
- data.tar.gz: 8450885be9f443548be957d0815bb31e3c56862f0368eb17f574ab176ea9e4b0
3
+ metadata.gz: 8a9e9d6e7fd96f5cc50bf046151754aec1d11ab4a4df53bb9efe8c7a3cf237ba
4
+ data.tar.gz: ef846c87b232b62ff1df5cc482a6bcdf729ef2a0ad91e97366f0a403cdbe9182
5
5
  SHA512:
6
- metadata.gz: bc52799f38979a1e8b77b21d711e0ff935510ce7988bdec34e5ad0a09a5dde8db522df3038808f165dcd4178051ef49f7f832d1b76fc9fac0ef5c4f3331fd92b
7
- data.tar.gz: 6a6d1e03041d70e7080c38ad3e534c5e57a0cd49af187c4a16dfe1f19ae7fa55d4c8a3068b12968dd64a3d23f3c08c8f4c5fd47ac96e83f9bc7da695e0dfef7b
6
+ metadata.gz: 8b80f5b2331c82b00c3fa887d6b12df87b04559c73f17c867708e68e691d31ea3415bbe91ef621e287be3a21ad11465f9bedde695f40588e5fd666bfec015075
7
+ data.tar.gz: 7c6d57732d945ce73e68994804946237a443dc7ae0cb3268b53917021e9a1774b2a862e300344478cdb8544bc3de58c3895dacdc3805713236a9eea909ab7b6e
data/Manifest.txt CHANGED
@@ -5,7 +5,6 @@ Rakefile
5
5
  lib/abiparser.rb
6
6
  lib/abiparser/constructor.rb
7
7
  lib/abiparser/contract.rb
8
- lib/abiparser/export/interface.rb
9
8
  lib/abiparser/function.rb
10
9
  lib/abiparser/interface.rb
11
10
  lib/abiparser/param.rb
data/Rakefile CHANGED
@@ -22,7 +22,6 @@ Hoe.spec 'abiparser' do
22
22
  ['cocos'],
23
23
  ['bytes'],
24
24
  ['digest-lite'],
25
- ['abicoder'],
26
25
  ]
27
26
 
28
27
  self.licenses = ['Public Domain']
@@ -47,7 +47,8 @@ class Constructor
47
47
  end
48
48
 
49
49
 
50
- attr_reader :inputs, :input_types
50
+ attr_reader :inputs
51
+ ## :input_types
51
52
 
52
53
  def initialize( inputs: [],
53
54
  payable: false )
@@ -57,7 +58,7 @@ class Constructor
57
58
  ## parse inputs into types
58
59
  ## note: use "calculated" sig(nature) and NOT the type
59
60
  ## (differs for tuples, that is, types with components !!!)
60
- @input_types = @inputs.map {|param| Type.parse( param.sig ) }
61
+ ## @input_types = @inputs.map {|param| Type.parse( param.sig ) }
61
62
  end
62
63
 
63
64
 
@@ -54,8 +54,8 @@ class Function
54
54
 
55
55
 
56
56
  attr_reader :name,
57
- :inputs, :outputs,
58
- :input_types, :output_types
57
+ :inputs, :outputs
58
+ ## :input_types, :output_types
59
59
 
60
60
  def initialize( name,
61
61
  inputs: [],
@@ -73,14 +73,14 @@ class Function
73
73
  ## parse inputs & outputs into types
74
74
  ## note: use "calculated" sig(nature) and NOT the type
75
75
  ## (differs for tuples, that is, types with components !!!)
76
- @input_types = @inputs.map do |param|
77
- Type.parse( param.sig )
78
- end
79
- @output_types = @outputs.map do |param|
80
- ## pp param
81
- ## puts "sig: #{param.sig}"
82
- Type.parse( param.sig )
83
- end
76
+ ## @input_types = @inputs.map do |param|
77
+ ## Type.parse( param.sig )
78
+ ## end
79
+ ## @output_types = @outputs.map do |param|
80
+ ## ## pp param
81
+ ## ## puts "sig: #{param.sig}"
82
+ ## Type.parse( param.sig )
83
+ ## end
84
84
  end
85
85
 
86
86
 
@@ -2,7 +2,7 @@
2
2
  module ABIParser
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- PATCH = 1
5
+ PATCH = 3
6
6
  VERSION = [MAJOR,MINOR,PATCH].join('.')
7
7
 
8
8
  def self.version
data/lib/abiparser.rb CHANGED
@@ -36,7 +36,6 @@ def sig( bin )
36
36
  end
37
37
 
38
38
 
39
- require 'abicoder'
40
39
 
41
40
 
42
41
  ## our own code
@@ -49,8 +48,6 @@ require_relative 'abiparser/utils'
49
48
  require_relative 'abiparser/contract'
50
49
  require_relative 'abiparser/interface'
51
50
 
52
- require_relative 'abiparser/export/interface'
53
-
54
51
 
55
52
 
56
53
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: abiparser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
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-01-08 00:00:00.000000000 Z
11
+ date: 2023-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocos
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: abicoder
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: rdoc
71
57
  requirement: !ruby/object:Gem::Requirement
@@ -117,7 +103,6 @@ files:
117
103
  - lib/abiparser.rb
118
104
  - lib/abiparser/constructor.rb
119
105
  - lib/abiparser/contract.rb
120
- - lib/abiparser/export/interface.rb
121
106
  - lib/abiparser/function.rb
122
107
  - lib/abiparser/interface.rb
123
108
  - lib/abiparser/param.rb
@@ -1,56 +0,0 @@
1
- module ABI
2
- class Contract
3
-
4
-
5
- def generate_interface( name: ) ## interface declarations
6
- buf = ''
7
- buf << "interface #{name} {"
8
-
9
-
10
- # include constructor - why? why not?
11
- #
12
- # if @ctor
13
- # buf << "\n"
14
- # buf << "// Constructor\n"
15
- # buf << "#{@ctor.decl}\n"
16
- # end
17
-
18
- if payable_functions.size > 0
19
- buf << "\n"
20
- buf << "// #{payable_functions.size} Payable Function(s)\n"
21
- payable_functions.each do |func|
22
- buf << "#{func.decl}\n"
23
- end
24
- end
25
-
26
- if transact_functions.size > 0
27
- buf << "\n"
28
- buf << "// #{transact_functions.size} Transact Functions(s)\n"
29
- transact_functions.each do |func|
30
- buf << "#{func.decl}\n"
31
- end
32
- end
33
-
34
- if query_functions.size > 0
35
- buf << "\n"
36
- buf << "// #{query_functions.size} Query Functions(s)\n"
37
- query_functions.each do |func|
38
- buf << "#{func.decl}\n"
39
- end
40
- end
41
-
42
- if helper_functions.size > 0
43
- buf << "\n"
44
- buf << "// #{helper_functions.size} Helper Functions(s)\n\n"
45
- helper_functions.each do |func|
46
- buf << "#{func.decl}\n"
47
- end
48
- end
49
-
50
- buf << "}\n"
51
- buf
52
- end
53
-
54
-
55
- end ## class Contract
56
- end ## module ABI