tealrb 0.3.1 → 0.4.0

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tealrb/opcode_modules.rb +22 -13
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: def52b90a6225a1e78408d4b4ec6d65c7504d03a5512bcde9b03cad284bf34df
4
- data.tar.gz: d4d23914a76b46bdf6ec45a7c9f087262531d26499967770b6965f63508a9e5e
3
+ metadata.gz: fa3ecdb5dd00d5242fc4606722bc6d6c80625f0dd042fe8a64aaec481fe4bb6d
4
+ data.tar.gz: 59ddc597857e55d7b0d6187325d0ff76e3e049403fcdf1ede00f2b3a9a1c2eaf
5
5
  SHA512:
6
- metadata.gz: cfbfc5ebd26982b646a8a1d1de65a741a5e5711d9cccf822a3abcf1698b42977fa309d409c95b569521b289a4bf73b334f574bf3fe113c8616b02c662c7da60c
7
- data.tar.gz: 7996f80823ca5cdac127207bef2899d42fe6f668b2d0d5a813c9d1d141b5521b703ef177621fe0cc64a12f7b8365bb65c604d8cf0f0158595c952e42be80e135
6
+ metadata.gz: 3757a7177af88cef08ab3c780fde484210dc5c2a9667a6733815b72b5dfef2e1aeaa176c65ab48be5010cf973c40c1af04b33e3516f14a8bc818a58f5972776b
7
+ data.tar.gz: b508d5fa005be7eaf3adf738542c38a053240ccfa73d0de0c2b6410a0ad4358d7a31e90d2899d35aeafc1407955ae5f0ab96ae8083ec1b0aabaf7ffbcd937547
@@ -664,31 +664,40 @@ module TEALrb
664
664
  end
665
665
  end
666
666
 
667
- class TxnArrayIndex
667
+ class TxnaField
668
668
  include Opcodes
669
- include TxnFields
670
669
 
671
- def initialize(index)
672
- @index = index
670
+ def initialize(field, index = nil)
671
+ @field = field
672
+ @teal = TEALrb::TEAL.current[Thread.current]
673
+ txna(field, index) if index
673
674
  end
674
675
 
675
- def opcode(field)
676
+ def [](index)
676
677
  @teal = TEALrb::TEAL.current[Thread.current]
677
- txna field, @index
678
+ txna @field, index
678
679
  end
679
680
  end
680
681
 
681
682
  module Txna
682
- extend Opcodes
683
- extend TxnFields
683
+ def self.application_args(index = nil)
684
+ TxnaField.new('ApplicationArgs', index)
685
+ end
684
686
 
685
- def self.opcode(field, index)
686
- @teal = TEALrb::TEAL.current[Thread.current]
687
- txna field, index
687
+ def self.accounts(index = nil)
688
+ TxnaField.new('Accounts', index)
688
689
  end
689
690
 
690
- def self.[](index)
691
- TxnArrayIndex.new(index)
691
+ def self.assets(index = nil)
692
+ TxnaField.new('Assets', index)
693
+ end
694
+
695
+ def self.applications(index = nil)
696
+ TxnaField.new('Applications', index)
697
+ end
698
+
699
+ def self.logs(index = nil)
700
+ TxnaField.new('Logs', index)
692
701
  end
693
702
  end
694
703
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tealrb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Polny
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-15 00:00:00.000000000 Z
11
+ date: 2022-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: method_source