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 +4 -4
- data/lib/dtr_core/supported_attributes.rb +11 -2
- 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: 5ec52e7da2701c4f76cc9a03ae8c80cbed83e7a6190d26aa5edcdfc727353977
|
4
|
+
data.tar.gz: ef7face145f988f46f205e5616eb103edb37c387989de2925439029e3e1eb209
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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-
|
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.
|