dtr_core 0.2.7 → 0.2.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bbd3b08f52ae2f6b9801c67ada71ffc019de63c1b2f7442a5b7923733e8b073b
4
- data.tar.gz: dadca4ebd8765b87ebd91244be19023fedda9f7c482319096ba40bd91b26853a
3
+ metadata.gz: b4c2bb162b6f7558a066ca08b82146f6934951c8b78a63f1ec2695df3582300c
4
+ data.tar.gz: e9afc8ec73ecddb50de3684f698aa19eebfcae7c59c236ef18f8785ac69e61e5
5
5
  SHA512:
6
- metadata.gz: 247ba1cdb793d7174507d9639cd3aea54ac550e57d3de7f904e244b36d754663b3a7bfd3011fb1cd8e6916d92355b5438b0742adf45b8a18f6a9c8e8cf906c3d
7
- data.tar.gz: a03686874827722ec117b20bd7dd86335e54b6a02f8b50c463f45ae2b7dfcb3ea55ac27373871fff4f858ed606f41795b27f95a52fe17618e6fa8793ba1b16d6
6
+ metadata.gz: f3520c017ed2737f133654425373cf7dfa4f2aebf1e45637b2fa1e5189c48d5bb3ee57ba89c0089f75aa1d55dda0e6eb782d00506aca5b63963288494d05f67f
7
+ data.tar.gz: d28e1da96a73ac17085ce0b9ac746c4300c206320f24e19e938ac15672f6cc285c6d01840b5d311b2937e888b5f846d9178804120441a7065475c5aec441b171
@@ -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 },
@@ -37,6 +42,10 @@ module DTRCore
37
42
  { name: 'add_strings', description: 'Concatenate two strings.', category: INSTRUCTION_CATEGORY_STRING },
38
43
  # environment operations
39
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.8
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.