platon 1.0.0 → 1.0.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/Gemfile.lock +10 -9
- data/examples/get_balance.rb +1 -1
- data/lib/platon/http_client.rb +1 -1
- data/lib/platon/version.rb +1 -1
- 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: 9b6b2fe5b545bef78a96d34ee746816473ce5734dc97b5d36a1b96606f17f732
|
|
4
|
+
data.tar.gz: dd0d20254a8ff8385b85a0524a34caab74cb6f550f9d4d22bd781f9e079651bc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '049ca8f1d3268115a04abcf1eddbe8988d752769be4396658280568e329f43653e4fe26ce719ec1143fda6f5a09b9abe9b10afab82864b3cebac2d707f7216b7'
|
|
7
|
+
data.tar.gz: 89ed163d81ac3e6a4f15c455cd57656ad88afc2f88970f51e65132d21c1f29fb29c4568d1b01bb912f97f1da32feb7c942393b57d665b3e1535f0bb65ff88c51
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
platon (0.
|
|
4
|
+
platon (1.0.0)
|
|
5
5
|
activesupport (>= 4.0)
|
|
6
6
|
digest-sha3 (~> 1.1)
|
|
7
7
|
ffi (~> 1.0)
|
|
@@ -12,16 +12,17 @@ PATH
|
|
|
12
12
|
GEM
|
|
13
13
|
remote: https://rubygems.org/
|
|
14
14
|
specs:
|
|
15
|
-
activesupport (
|
|
15
|
+
activesupport (6.1.4)
|
|
16
16
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
17
|
-
i18n (>=
|
|
18
|
-
minitest (
|
|
19
|
-
tzinfo (~>
|
|
17
|
+
i18n (>= 1.6, < 2)
|
|
18
|
+
minitest (>= 5.1)
|
|
19
|
+
tzinfo (~> 2.0)
|
|
20
|
+
zeitwerk (~> 2.3)
|
|
20
21
|
coderay (1.1.3)
|
|
21
22
|
concurrent-ruby (1.1.9)
|
|
22
23
|
diff-lcs (1.4.4)
|
|
23
24
|
digest-sha3 (1.1.0)
|
|
24
|
-
ffi (1.15.
|
|
25
|
+
ffi (1.15.4)
|
|
25
26
|
ffi-compiler (1.0.1)
|
|
26
27
|
ffi (>= 1.0.0)
|
|
27
28
|
rake
|
|
@@ -51,9 +52,9 @@ GEM
|
|
|
51
52
|
rspec-support (3.10.2)
|
|
52
53
|
scrypt (3.0.7)
|
|
53
54
|
ffi-compiler (>= 1.0, < 2.0)
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
tzinfo (2.0.4)
|
|
56
|
+
concurrent-ruby (~> 1.0)
|
|
57
|
+
zeitwerk (2.4.2)
|
|
57
58
|
|
|
58
59
|
PLATFORMS
|
|
59
60
|
x86_64-darwin-18
|
data/examples/get_balance.rb
CHANGED
|
@@ -19,7 +19,7 @@ balance = res / 10**18.to_f
|
|
|
19
19
|
puts "#{TARGET_ADDRESS_1} #{client.hrp.upcase} balance: #{balance} "
|
|
20
20
|
|
|
21
21
|
###Get Arc20/Prc20 balance
|
|
22
|
-
client.default_account = Platon::Key.new.bech32_address # 随机生成地址并指定即可。 因platon节点要求call也必须传入from参数
|
|
22
|
+
client.default_account = Platon::Key.new.bech32_address(hrp: "atp") # 随机生成地址并指定即可。 因platon节点要求call也必须传入from参数
|
|
23
23
|
minABI=[{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"type":"function"}];
|
|
24
24
|
contract = Platon::Contract.create(
|
|
25
25
|
client:client,
|
data/lib/platon/http_client.rb
CHANGED
|
@@ -5,7 +5,7 @@ module Platon
|
|
|
5
5
|
attr_accessor :host, :port, :uri, :ssl, :proxy
|
|
6
6
|
|
|
7
7
|
def initialize(host,chain_name, proxy = nil)
|
|
8
|
-
super(chain_name
|
|
8
|
+
super(chain_name)
|
|
9
9
|
uri = URI.parse(host)
|
|
10
10
|
raise ArgumentError unless ['http', 'https'].include? uri.scheme
|
|
11
11
|
@host = uri.host
|
data/lib/platon/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: platon
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- vianull
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-11-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|