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 +4 -4
- data/lib/dtr_core/supported_attributes.rb +10 -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: b4c2bb162b6f7558a066ca08b82146f6934951c8b78a63f1ec2695df3582300c
|
4
|
+
data.tar.gz: e9afc8ec73ecddb50de3684f698aa19eebfcae7c59c236ef18f8785ac69e61e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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-
|
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.
|