dtr_core 0.2.7 → 0.2.9

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: bbd3b08f52ae2f6b9801c67ada71ffc019de63c1b2f7442a5b7923733e8b073b
4
- data.tar.gz: dadca4ebd8765b87ebd91244be19023fedda9f7c482319096ba40bd91b26853a
3
+ metadata.gz: 5ec52e7da2701c4f76cc9a03ae8c80cbed83e7a6190d26aa5edcdfc727353977
4
+ data.tar.gz: ef7face145f988f46f205e5616eb103edb37c387989de2925439029e3e1eb209
5
5
  SHA512:
6
- metadata.gz: 247ba1cdb793d7174507d9639cd3aea54ac550e57d3de7f904e244b36d754663b3a7bfd3011fb1cd8e6916d92355b5438b0742adf45b8a18f6a9c8e8cf906c3d
7
- data.tar.gz: a03686874827722ec117b20bd7dd86335e54b6a02f8b50c463f45ae2b7dfcb3ea55ac27373871fff4f858ed606f41795b27f95a52fe17618e6fa8793ba1b16d6
6
+ metadata.gz: 788e4790567d316342f0a05b1392bcaba8b7f040f239b79c19f4469d1cbc8e3e668f4905bf1861611349a002f6dba9bca3ab64ac0cbc7bdd744acc08cd4c24d9
7
+ data.tar.gz: 56e79aeb23d9ba8ea5a4f201e063103c59d72f28e6806cb692d0d42aef4b96f2666eb4e9b0c99eaa42fd491ec8784e65fe9e97221bffc56469b4191c965c4dba
@@ -10,13 +10,17 @@ module DTRCore
10
10
  INSTRUCTION_CATEGORY_NUMERIC = 'numeric'
11
11
  INSTRUCTION_CATEGORY_STRING = 'string'
12
12
  INSTRUCTION_CATEGORY_ENVIRONMENT = 'environment'
13
+ INSTRUCTION_CATEGORY_METHODS = 'methods'
14
+ INSTRUCTION_CATEGORY_OBJECTS = 'objects'
13
15
  INSTRUCTION_CATEGORIES = [
14
16
  INSTRUCTION_CATEGORY_BASIC,
15
17
  INSTRUCTION_CATEGORY_STATE,
16
18
  INSTRUCTION_CATEGORY_UNTYPED,
17
19
  INSTRUCTION_CATEGORY_NUMERIC,
18
20
  INSTRUCTION_CATEGORY_STRING,
19
- INSTRUCTION_CATEGORY_ENVIRONMENT
21
+ INSTRUCTION_CATEGORY_ENVIRONMENT,
22
+ INSTRUCTION_CATEGORY_METHODS,
23
+ INSTRUCTION_CATEGORY_OBJECTS
20
24
  ].freeze
21
25
  ## Instructions ##
22
26
  INSTRUCTIONS = [
@@ -28,6 +32,7 @@ module DTRCore
28
32
  { name: 'save_state', description: 'Save a value to the state.', category: INSTRUCTION_CATEGORY_STATE },
29
33
  # untyped operations
30
34
  { name: 'add', description: 'Add two things of unknown types together.', category: INSTRUCTION_CATEGORY_UNTYPED },
35
+ { name: 'add_and_assign', description: 'Add two things of unknown types together and then assign to the first one.', category: INSTRUCTION_CATEGORY_UNTYPED },
31
36
  # numeric operations
32
37
  { name: 'add_numbers', description: 'Add two numbers.', category: INSTRUCTION_CATEGORY_NUMERIC },
33
38
  { name: 'subtract_numbers', description: 'Subtract two numbers.', category: INSTRUCTION_CATEGORY_NUMERIC },
@@ -36,7 +41,11 @@ module DTRCore
36
41
  # string operations
37
42
  { name: 'add_strings', description: 'Concatenate two strings.', category: INSTRUCTION_CATEGORY_STRING },
38
43
  # environment operations
39
- { name: 'contract_address', description: 'Get the contract address.', category: INSTRUCTION_CATEGORY_ENVIRONMENT }
44
+ { name: 'contract_address', description: 'Get the contract address.', category: INSTRUCTION_CATEGORY_ENVIRONMENT },
45
+ # method operations
46
+ { name: 'evaluate', description: 'Evaluate a method. Method name is the first input and arguments follow', category: INSTRUCTION_CATEGORY_METHODS },
47
+ # object operations
48
+ { name: 'field', description: 'Reference an object field.', category: INSTRUCTION_CATEGORY_OBJECTS }
40
49
  ].freeze
41
50
 
42
51
  # Supported Types for DTR.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dtr_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Durst
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-24 00:00:00.000000000 Z
11
+ date: 2024-05-26 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Core smart contract intermediate language (Digicus Textual Representation)
14
14
  parser.