skittles 0.1.6 → 0.1.9
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.
- package/lib/abi/get-abi.d.ts +4 -0
- package/lib/ast/get-ast.d.ts +3 -0
- package/lib/bytecode/get-bytecode.d.ts +2 -0
- package/lib/data/yul-template.d.ts +11 -0
- package/lib/helpers/ast-helper.d.ts +13 -0
- package/lib/helpers/file-helper.d.ts +2 -0
- package/lib/helpers/selector-helper.d.ts +2 -0
- package/lib/helpers/string-helper.d.ts +2 -0
- package/lib/helpers/yul-helper.d.ts +3 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +21 -14
- package/lib/skittles-class/get-skittles-class.d.ts +3 -0
- package/lib/skittles-class/get-skittles-constructor.d.ts +4 -0
- package/lib/skittles-class/get-skittles-expression.d.ts +4 -0
- package/lib/skittles-class/get-skittles-method.d.ts +4 -0
- package/lib/skittles-class/get-skittles-operator.d.ts +4 -0
- package/lib/skittles-class/get-skittles-property.d.ts +4 -0
- package/lib/skittles-class/get-skittles-state-mutability.d.ts +3 -0
- package/lib/skittles-class/get-skittles-statements.d.ts +4 -0
- package/lib/skittles-class/get-skittles-type.d.ts +3 -0
- package/lib/types/abi-types.d.ts +12 -0
- package/lib/types/core-types.d.ts +21 -0
- package/lib/types/skittles-class.d.ts +135 -0
- package/lib/yul/add-yul-constructor.d.ts +3 -0
- package/lib/yul/add-yul-method-dispatcher.d.ts +3 -0
- package/lib/yul/add-yul-method-function.d.ts +3 -0
- package/lib/yul/add-yul-property-dispatcher.d.ts +3 -0
- package/lib/yul/add-yul-storage-access.d.ts +3 -0
- package/lib/yul/add-yul-storage-layout.d.ts +3 -0
- package/lib/yul/add-yul-value-initialzations.d.ts +3 -0
- package/lib/yul/format-yul.d.ts +2 -0
- package/lib/yul/get-block-yul.d.ts +3 -0
- package/lib/yul/get-expression-yul.d.ts +3 -0
- package/lib/yul/get-statement-yul.d.ts +3 -0
- package/lib/yul/get-yul.d.ts +4 -0
- package/lib/yul/yul-constants.d.ts +3 -0
- package/package.json +3 -2
- package/TODO.md +0 -21
- package/build/abi/ERC20.abi +0 -165
- package/build/abi/HelloWorld.abi +0 -433
- package/build/bytecode/ERC20.bytecode +0 -1
- package/build/bytecode/HelloWorld.bytecode +0 -1
- package/build/yul/ERC20.yul +0 -306
- package/build/yul/HelloWorld.yul +0 -434
- package/yarn-error.log +0 -10627
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare enum YulSection {
|
|
2
|
+
Constructor = "constructor",
|
|
3
|
+
Dispatchers = "dispatchers",
|
|
4
|
+
Functions = "functions",
|
|
5
|
+
StorageLayout = "storage layout",
|
|
6
|
+
ConstructorStorageLayout = "constructor storage layout",
|
|
7
|
+
StorageAccess = "storage access",
|
|
8
|
+
ConstructorStorageAccess = "constructor storage access"
|
|
9
|
+
}
|
|
10
|
+
declare const yulTemplate: string[];
|
|
11
|
+
export default yulTemplate;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BinaryExpression, ClassDeclaration, Node, PropertyDeclaration } from "typescript";
|
|
2
|
+
export declare const getClassNode: (node: Node) => ClassDeclaration;
|
|
3
|
+
export declare const getNodeName: (node: Node) => string;
|
|
4
|
+
export declare const isPlusEquals: (expression: BinaryExpression) => boolean;
|
|
5
|
+
export declare const isEquals: (expression: BinaryExpression) => boolean;
|
|
6
|
+
export declare const isMinusEquals: (expression: BinaryExpression) => boolean;
|
|
7
|
+
export declare const isTrueKeyword: (node: Node) => boolean;
|
|
8
|
+
export declare const isFalseKeyword: (node: Node) => boolean;
|
|
9
|
+
export declare const isNodePrivate: (node: Node) => boolean;
|
|
10
|
+
export declare const isNodeImmutable: (node: Node) => boolean;
|
|
11
|
+
export declare const isPropertyArrowFunction: (node: PropertyDeclaration) => boolean;
|
|
12
|
+
export declare const isVariable: (property: PropertyDeclaration) => boolean;
|
|
13
|
+
export declare const isExpression: (node: Node) => boolean;
|
package/lib/index.d.ts
ADDED
package/lib/index.js
CHANGED
|
@@ -13,6 +13,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
14
|
};
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.tx = exports.msg = exports.chain = exports.block = exports.self = void 0;
|
|
16
17
|
// import chalk from "chalk";
|
|
17
18
|
// import clear from "clear";
|
|
18
19
|
// import figlet from "figlet";
|
|
@@ -23,6 +24,26 @@ const get_bytecode_1 = __importDefault(require("./bytecode/get-bytecode"));
|
|
|
23
24
|
const file_helper_1 = require("./helpers/file-helper");
|
|
24
25
|
const get_skittles_class_1 = __importDefault(require("./skittles-class/get-skittles-class"));
|
|
25
26
|
const get_yul_1 = __importDefault(require("./yul/get-yul"));
|
|
27
|
+
const core_types_1 = require("./types/core-types");
|
|
28
|
+
Object.defineProperty(exports, "self", { enumerable: true, get: function () { return core_types_1.self; } });
|
|
29
|
+
Object.defineProperty(exports, "block", { enumerable: true, get: function () { return core_types_1.block; } });
|
|
30
|
+
Object.defineProperty(exports, "chain", { enumerable: true, get: function () { return core_types_1.chain; } });
|
|
31
|
+
Object.defineProperty(exports, "msg", { enumerable: true, get: function () { return core_types_1.msg; } });
|
|
32
|
+
Object.defineProperty(exports, "tx", { enumerable: true, get: function () { return core_types_1.tx; } });
|
|
33
|
+
const skittlesCompile = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
34
|
+
const files = (0, file_helper_1.getAllContractFiles)();
|
|
35
|
+
const promises = files.map((file) => __awaiter(void 0, void 0, void 0, function* () {
|
|
36
|
+
const skittlesClass = (0, get_skittles_class_1.default)(file);
|
|
37
|
+
const abi = (0, get_abi_1.default)(skittlesClass);
|
|
38
|
+
const { name } = skittlesClass;
|
|
39
|
+
(0, file_helper_1.writeFile)("abi", name, JSON.stringify(abi, null, 2));
|
|
40
|
+
const yul = (0, get_yul_1.default)(skittlesClass, abi);
|
|
41
|
+
(0, file_helper_1.writeFile)("yul", name, yul);
|
|
42
|
+
const bytecode = (0, get_bytecode_1.default)(name, yul);
|
|
43
|
+
(0, file_helper_1.writeFile)("bytecode", name, bytecode);
|
|
44
|
+
}));
|
|
45
|
+
yield Promise.all(promises);
|
|
46
|
+
});
|
|
26
47
|
// clear();
|
|
27
48
|
// console.log(
|
|
28
49
|
// chalk.red(figlet.textSync("skittles-cli", { horizontalLayout: "full" }))
|
|
@@ -45,17 +66,3 @@ commander_1.program
|
|
|
45
66
|
yield skittlesCompile();
|
|
46
67
|
}));
|
|
47
68
|
commander_1.program.parse();
|
|
48
|
-
const skittlesCompile = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
49
|
-
const files = (0, file_helper_1.getAllContractFiles)();
|
|
50
|
-
const promises = files.map((file) => __awaiter(void 0, void 0, void 0, function* () {
|
|
51
|
-
const skittlesClass = (0, get_skittles_class_1.default)(file);
|
|
52
|
-
const abi = (0, get_abi_1.default)(skittlesClass);
|
|
53
|
-
const { name } = skittlesClass;
|
|
54
|
-
(0, file_helper_1.writeFile)("abi", name, JSON.stringify(abi, null, 2));
|
|
55
|
-
const yul = (0, get_yul_1.default)(skittlesClass, abi);
|
|
56
|
-
(0, file_helper_1.writeFile)("yul", name, yul);
|
|
57
|
-
const bytecode = (0, get_bytecode_1.default)(name, yul);
|
|
58
|
-
(0, file_helper_1.writeFile)("bytecode", name, bytecode);
|
|
59
|
-
}));
|
|
60
|
-
yield Promise.all(promises);
|
|
61
|
-
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface AbiParameter {
|
|
2
|
+
name: string;
|
|
3
|
+
type: string;
|
|
4
|
+
}
|
|
5
|
+
export interface AbiFunction {
|
|
6
|
+
type: "function" | "constructor" | "receive" | "fallback";
|
|
7
|
+
name?: string;
|
|
8
|
+
inputs: AbiParameter[];
|
|
9
|
+
outputs?: AbiParameter[];
|
|
10
|
+
stateMutability: "view" | "payable" | "nonpayable" | "pure";
|
|
11
|
+
}
|
|
12
|
+
export declare type Abi = AbiFunction[];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare type address = string;
|
|
2
|
+
export declare const self: address;
|
|
3
|
+
export declare class block {
|
|
4
|
+
static get coinbase(): address;
|
|
5
|
+
static get difficulty(): number;
|
|
6
|
+
static get block(): number;
|
|
7
|
+
static get prevhash(): number;
|
|
8
|
+
static get timestamp(): number;
|
|
9
|
+
}
|
|
10
|
+
export declare class chain {
|
|
11
|
+
static get id(): number;
|
|
12
|
+
}
|
|
13
|
+
export declare class msg {
|
|
14
|
+
static get data(): string;
|
|
15
|
+
static get sender(): address;
|
|
16
|
+
static get value(): number;
|
|
17
|
+
}
|
|
18
|
+
export declare class tx {
|
|
19
|
+
static get gasPrice(): number;
|
|
20
|
+
static get origin(): address;
|
|
21
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
export declare enum SkittlesExpressionType {
|
|
2
|
+
Not = "Not",
|
|
3
|
+
Binary = "Binary",
|
|
4
|
+
Value = "Value",
|
|
5
|
+
Storage = "Storage",
|
|
6
|
+
Variable = "Variable",
|
|
7
|
+
Mapping = "Mapping",
|
|
8
|
+
EvmDialect = "Evm Dialect"
|
|
9
|
+
}
|
|
10
|
+
export interface SkittlesBaseExpression {
|
|
11
|
+
expressionType: SkittlesExpressionType;
|
|
12
|
+
}
|
|
13
|
+
export declare enum SkittlesOperator {
|
|
14
|
+
Plus = 0,
|
|
15
|
+
Minus = 1,
|
|
16
|
+
Multiply = 2,
|
|
17
|
+
Divide = 3,
|
|
18
|
+
Modulo = 4,
|
|
19
|
+
Equals = 5,
|
|
20
|
+
NotEquals = 6,
|
|
21
|
+
GreaterThan = 7,
|
|
22
|
+
LessThan = 8,
|
|
23
|
+
GreaterThanOrEqual = 9,
|
|
24
|
+
LessThanOrEqual = 10,
|
|
25
|
+
And = 11,
|
|
26
|
+
Or = 12,
|
|
27
|
+
Not = 13
|
|
28
|
+
}
|
|
29
|
+
export interface SkittlesNotExpression extends SkittlesBaseExpression {
|
|
30
|
+
expressionType: SkittlesExpressionType.Not;
|
|
31
|
+
value: SkittlesExpression;
|
|
32
|
+
}
|
|
33
|
+
export interface SkittlesEvmDialectExpression extends SkittlesBaseExpression {
|
|
34
|
+
expressionType: SkittlesExpressionType.EvmDialect;
|
|
35
|
+
environment: string;
|
|
36
|
+
variable: string;
|
|
37
|
+
}
|
|
38
|
+
export interface SkittlesMappingExpression extends SkittlesBaseExpression {
|
|
39
|
+
expressionType: SkittlesExpressionType.Mapping;
|
|
40
|
+
variable: string;
|
|
41
|
+
items: SkittlesExpression[];
|
|
42
|
+
}
|
|
43
|
+
export interface SkittlesBinaryExpression extends SkittlesBaseExpression {
|
|
44
|
+
expressionType: SkittlesExpressionType.Binary;
|
|
45
|
+
left: SkittlesExpression;
|
|
46
|
+
right: SkittlesExpression;
|
|
47
|
+
operator: SkittlesOperator;
|
|
48
|
+
}
|
|
49
|
+
export interface SkittlesVariableExpression extends SkittlesBaseExpression {
|
|
50
|
+
expressionType: SkittlesExpressionType.Variable;
|
|
51
|
+
value: any;
|
|
52
|
+
}
|
|
53
|
+
export interface SkittlesValueExpression extends SkittlesBaseExpression {
|
|
54
|
+
expressionType: SkittlesExpressionType.Value;
|
|
55
|
+
type: string;
|
|
56
|
+
value: any;
|
|
57
|
+
}
|
|
58
|
+
export interface SkittlesStorageExpression extends SkittlesBaseExpression {
|
|
59
|
+
expressionType: SkittlesExpressionType.Storage;
|
|
60
|
+
variable: string;
|
|
61
|
+
}
|
|
62
|
+
export declare type SkittlesExpression = SkittlesNotExpression | SkittlesEvmDialectExpression | SkittlesMappingExpression | SkittlesBinaryExpression | SkittlesVariableExpression | SkittlesValueExpression | SkittlesStorageExpression;
|
|
63
|
+
export declare enum SkittlesStatementType {
|
|
64
|
+
StorageUpdate = "Storage Update",
|
|
65
|
+
Return = "Return",
|
|
66
|
+
MappingUpdate = "Mapping Update",
|
|
67
|
+
Call = "Call",
|
|
68
|
+
If = "If",
|
|
69
|
+
Throw = "Throw"
|
|
70
|
+
}
|
|
71
|
+
export interface SkittlesBaseStatement {
|
|
72
|
+
statementType: SkittlesStatementType;
|
|
73
|
+
}
|
|
74
|
+
export interface SkittlesThrowStatement extends SkittlesBaseStatement {
|
|
75
|
+
statementType: SkittlesStatementType.Throw;
|
|
76
|
+
error: SkittlesExpression;
|
|
77
|
+
}
|
|
78
|
+
export interface SkittlesIfStatement extends SkittlesBaseStatement {
|
|
79
|
+
statementType: SkittlesStatementType.If;
|
|
80
|
+
condition: SkittlesExpression;
|
|
81
|
+
then: SkittlesStatement[];
|
|
82
|
+
else: SkittlesStatement[];
|
|
83
|
+
}
|
|
84
|
+
export interface SkittlesCallStatement extends SkittlesBaseStatement {
|
|
85
|
+
statementType: SkittlesStatementType.Call;
|
|
86
|
+
target: string;
|
|
87
|
+
parameters: SkittlesExpression[];
|
|
88
|
+
}
|
|
89
|
+
export interface SkittlesMappingUpdateStatement extends SkittlesBaseStatement {
|
|
90
|
+
statementType: SkittlesStatementType.MappingUpdate;
|
|
91
|
+
variable: string;
|
|
92
|
+
items: SkittlesExpression[];
|
|
93
|
+
value: SkittlesExpression;
|
|
94
|
+
}
|
|
95
|
+
export interface SkittlesStorageUpdateStatement extends SkittlesBaseStatement {
|
|
96
|
+
statementType: SkittlesStatementType.StorageUpdate;
|
|
97
|
+
variable: string;
|
|
98
|
+
value: SkittlesExpression;
|
|
99
|
+
}
|
|
100
|
+
export interface SkittlesReturnStatement extends SkittlesBaseStatement {
|
|
101
|
+
statementType: SkittlesStatementType.Return;
|
|
102
|
+
type: string;
|
|
103
|
+
value: SkittlesExpression;
|
|
104
|
+
}
|
|
105
|
+
export declare type SkittlesStatement = SkittlesThrowStatement | SkittlesIfStatement | SkittlesCallStatement | SkittlesMappingUpdateStatement | SkittlesStorageUpdateStatement | SkittlesReturnStatement;
|
|
106
|
+
export interface SkittlesVariable {
|
|
107
|
+
name: string;
|
|
108
|
+
type: string;
|
|
109
|
+
value?: SkittlesExpression;
|
|
110
|
+
private: boolean;
|
|
111
|
+
immutable: boolean;
|
|
112
|
+
}
|
|
113
|
+
export interface SkittlesParameter {
|
|
114
|
+
name: string;
|
|
115
|
+
type: string;
|
|
116
|
+
}
|
|
117
|
+
export interface SkittlesMethod {
|
|
118
|
+
name: string;
|
|
119
|
+
returns: string;
|
|
120
|
+
private: boolean;
|
|
121
|
+
view: boolean;
|
|
122
|
+
parameters: SkittlesParameter[];
|
|
123
|
+
statements: SkittlesStatement[];
|
|
124
|
+
}
|
|
125
|
+
export interface SkittlesConstructor {
|
|
126
|
+
parameters: SkittlesParameter[];
|
|
127
|
+
statements: SkittlesStatement[];
|
|
128
|
+
}
|
|
129
|
+
interface SkittlesClass {
|
|
130
|
+
name: string;
|
|
131
|
+
constructor?: SkittlesConstructor;
|
|
132
|
+
variables: SkittlesVariable[];
|
|
133
|
+
methods: SkittlesMethod[];
|
|
134
|
+
}
|
|
135
|
+
export default SkittlesClass;
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skittles",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "TypeScript Smart Contract Language for the EVM",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
|
+
"types": "./lib/index.d.ts",
|
|
6
7
|
"bin": {
|
|
7
8
|
"skittles": "./lib/index.js"
|
|
8
9
|
},
|
|
@@ -14,7 +15,7 @@
|
|
|
14
15
|
"refresh": "rm -rf ./node_modules ./package-lock.json && yarn",
|
|
15
16
|
"local": "sudo yarn global add && skittles",
|
|
16
17
|
"test": "hardhat test",
|
|
17
|
-
"prepublishOnly": "yarn run build && yarn run test"
|
|
18
|
+
"prepublishOnly": "yarn run build && yarn run test && node ./lib/index.js compile"
|
|
18
19
|
},
|
|
19
20
|
"repository": {
|
|
20
21
|
"type": "git",
|
package/TODO.md
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
===== Peer Review ====
|
|
2
|
-
|
|
3
|
-
- add init function
|
|
4
|
-
- wrap all hardhat functions
|
|
5
|
-
- add readme
|
|
6
|
-
- add normal repo things
|
|
7
|
-
- Consider making types default exports (like `string` and `number` are)
|
|
8
|
-
|
|
9
|
-
==== Beta ready ====
|
|
10
|
-
|
|
11
|
-
- Add support for `else` conditions for `if` statements (need to use switches)
|
|
12
|
-
- Add support for events
|
|
13
|
-
- Add immutable (readonly) setting for evaluated values using `setimmutable`
|
|
14
|
-
- Consider how we handle large numbers (BigNumber or something?)
|
|
15
|
-
- automatic mapping views
|
|
16
|
-
- Add config for things like running optimizer
|
|
17
|
-
|
|
18
|
-
==== FORMATTED ====
|
|
19
|
-
|
|
20
|
-
- Remove redundant stores for `readonly` values in the constructor
|
|
21
|
-
- Change to getting function signatures with this: https://github.com/FuelLabs/yulp/blob/620d04acb060a7a817e2cfc6da4c9b4d9c7fcef0/src/yulplus.ne#L40
|
package/build/abi/ERC20.abi
DELETED
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"type": "constructor",
|
|
4
|
-
"inputs": [
|
|
5
|
-
{
|
|
6
|
-
"name": "mintAmount_",
|
|
7
|
-
"type": "uint256"
|
|
8
|
-
}
|
|
9
|
-
],
|
|
10
|
-
"stateMutability": "nonpayable"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"type": "function",
|
|
14
|
-
"name": "decimals",
|
|
15
|
-
"inputs": [],
|
|
16
|
-
"outputs": [
|
|
17
|
-
{
|
|
18
|
-
"name": "",
|
|
19
|
-
"type": "uint256"
|
|
20
|
-
}
|
|
21
|
-
],
|
|
22
|
-
"stateMutability": "view"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"type": "function",
|
|
26
|
-
"name": "symbol",
|
|
27
|
-
"inputs": [],
|
|
28
|
-
"outputs": [
|
|
29
|
-
{
|
|
30
|
-
"name": "",
|
|
31
|
-
"type": "string"
|
|
32
|
-
}
|
|
33
|
-
],
|
|
34
|
-
"stateMutability": "view"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"type": "function",
|
|
38
|
-
"name": "name",
|
|
39
|
-
"inputs": [],
|
|
40
|
-
"outputs": [
|
|
41
|
-
{
|
|
42
|
-
"name": "",
|
|
43
|
-
"type": "string"
|
|
44
|
-
}
|
|
45
|
-
],
|
|
46
|
-
"stateMutability": "view"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"type": "function",
|
|
50
|
-
"name": "totalSupply",
|
|
51
|
-
"inputs": [],
|
|
52
|
-
"outputs": [
|
|
53
|
-
{
|
|
54
|
-
"name": "",
|
|
55
|
-
"type": "uint256"
|
|
56
|
-
}
|
|
57
|
-
],
|
|
58
|
-
"stateMutability": "view"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"type": "function",
|
|
62
|
-
"name": "balanceOf",
|
|
63
|
-
"inputs": [
|
|
64
|
-
{
|
|
65
|
-
"name": "address",
|
|
66
|
-
"type": "address"
|
|
67
|
-
}
|
|
68
|
-
],
|
|
69
|
-
"outputs": [
|
|
70
|
-
{
|
|
71
|
-
"name": "",
|
|
72
|
-
"type": "uint256"
|
|
73
|
-
}
|
|
74
|
-
],
|
|
75
|
-
"stateMutability": "view"
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"type": "function",
|
|
79
|
-
"name": "allowance",
|
|
80
|
-
"inputs": [
|
|
81
|
-
{
|
|
82
|
-
"name": "owner",
|
|
83
|
-
"type": "address"
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
"name": "spender",
|
|
87
|
-
"type": "address"
|
|
88
|
-
}
|
|
89
|
-
],
|
|
90
|
-
"outputs": [
|
|
91
|
-
{
|
|
92
|
-
"name": "",
|
|
93
|
-
"type": "uint256"
|
|
94
|
-
}
|
|
95
|
-
],
|
|
96
|
-
"stateMutability": "view"
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
"type": "function",
|
|
100
|
-
"name": "approve",
|
|
101
|
-
"inputs": [
|
|
102
|
-
{
|
|
103
|
-
"name": "spender",
|
|
104
|
-
"type": "address"
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
"name": "amount",
|
|
108
|
-
"type": "uint256"
|
|
109
|
-
}
|
|
110
|
-
],
|
|
111
|
-
"outputs": [
|
|
112
|
-
{
|
|
113
|
-
"name": "",
|
|
114
|
-
"type": "bool"
|
|
115
|
-
}
|
|
116
|
-
],
|
|
117
|
-
"stateMutability": "payable"
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
"type": "function",
|
|
121
|
-
"name": "transfer",
|
|
122
|
-
"inputs": [
|
|
123
|
-
{
|
|
124
|
-
"name": "to",
|
|
125
|
-
"type": "address"
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
"name": "amount",
|
|
129
|
-
"type": "uint256"
|
|
130
|
-
}
|
|
131
|
-
],
|
|
132
|
-
"outputs": [
|
|
133
|
-
{
|
|
134
|
-
"name": "",
|
|
135
|
-
"type": "bool"
|
|
136
|
-
}
|
|
137
|
-
],
|
|
138
|
-
"stateMutability": "payable"
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
"type": "function",
|
|
142
|
-
"name": "transferFrom",
|
|
143
|
-
"inputs": [
|
|
144
|
-
{
|
|
145
|
-
"name": "from",
|
|
146
|
-
"type": "address"
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
"name": "to",
|
|
150
|
-
"type": "address"
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
"name": "amount",
|
|
154
|
-
"type": "uint256"
|
|
155
|
-
}
|
|
156
|
-
],
|
|
157
|
-
"outputs": [
|
|
158
|
-
{
|
|
159
|
-
"name": "",
|
|
160
|
-
"type": "bool"
|
|
161
|
-
}
|
|
162
|
-
],
|
|
163
|
-
"stateMutability": "payable"
|
|
164
|
-
}
|
|
165
|
-
]
|