@orbs-network/twap 2.0.1 → 2.0.2

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.
Files changed (3) hide show
  1. package/index.js +12 -0
  2. package/package.json +4 -1
  3. package/taker.abi.json +133 -0
package/index.js ADDED
@@ -0,0 +1,12 @@
1
+ const configs = require('./configs.json');
2
+ const twapAbi = require('./twap.abi.json');
3
+ const lensAbi = require('./lens.abi.json');
4
+ const takerAbi = require('./taker.abi.json');
5
+
6
+ Object.keys(configs).forEach((key) => {
7
+ if (!configs[key].twapAbi) configs[key].twapAbi = twapAbi;
8
+ if (!configs[key].lensAbi) configs[key].lensAbi = lensAbi;
9
+ if (!configs[key].takerAbi) configs[key].takerAbi = takerAbi;
10
+ });
11
+
12
+ module.exports = { configs };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orbs-network/twap",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/orbs-network/twap.git"
@@ -8,10 +8,13 @@
8
8
  "author": "Orbs",
9
9
  "license": "MIT",
10
10
  "dependencies": {},
11
+ "main": "index.js",
11
12
  "files": [
13
+ "index.js",
12
14
  "configs.json",
13
15
  "twap.abi.json",
14
16
  "lens.abi.json",
17
+ "taker.abi.json",
15
18
  "LICENSE",
16
19
  "TOS.md",
17
20
  "README.md"
package/taker.abi.json ADDED
@@ -0,0 +1,133 @@
1
+ [
2
+ {
3
+ "inputs": [
4
+ {
5
+ "internalType": "contract TWAP",
6
+ "name": "_twap",
7
+ "type": "address"
8
+ },
9
+ {
10
+ "internalType": "contract ITreasury",
11
+ "name": "_treasury",
12
+ "type": "address"
13
+ }
14
+ ],
15
+ "stateMutability": "nonpayable",
16
+ "type": "constructor"
17
+ },
18
+ {
19
+ "inputs": [
20
+ {
21
+ "internalType": "address",
22
+ "name": "caller",
23
+ "type": "address"
24
+ }
25
+ ],
26
+ "name": "NotAllowed",
27
+ "type": "error"
28
+ },
29
+ {
30
+ "inputs": [
31
+ {
32
+ "internalType": "uint64",
33
+ "name": "id",
34
+ "type": "uint64"
35
+ },
36
+ {
37
+ "internalType": "address",
38
+ "name": "exchange",
39
+ "type": "address"
40
+ },
41
+ {
42
+ "internalType": "uint256",
43
+ "name": "dstFee",
44
+ "type": "uint256"
45
+ },
46
+ {
47
+ "internalType": "uint32",
48
+ "name": "slippagePercent",
49
+ "type": "uint32"
50
+ },
51
+ {
52
+ "internalType": "bytes",
53
+ "name": "data",
54
+ "type": "bytes"
55
+ }
56
+ ],
57
+ "name": "bid",
58
+ "outputs": [],
59
+ "stateMutability": "nonpayable",
60
+ "type": "function"
61
+ },
62
+ {
63
+ "inputs": [
64
+ {
65
+ "internalType": "uint64",
66
+ "name": "id",
67
+ "type": "uint64"
68
+ },
69
+ {
70
+ "internalType": "address",
71
+ "name": "feeExchange",
72
+ "type": "address"
73
+ },
74
+ {
75
+ "internalType": "uint256",
76
+ "name": "feeMinAmountOut",
77
+ "type": "uint256"
78
+ },
79
+ {
80
+ "internalType": "bytes",
81
+ "name": "feeData",
82
+ "type": "bytes"
83
+ }
84
+ ],
85
+ "name": "fill",
86
+ "outputs": [],
87
+ "stateMutability": "nonpayable",
88
+ "type": "function"
89
+ },
90
+ {
91
+ "inputs": [
92
+ {
93
+ "internalType": "address",
94
+ "name": "token",
95
+ "type": "address"
96
+ }
97
+ ],
98
+ "name": "rescue",
99
+ "outputs": [],
100
+ "stateMutability": "nonpayable",
101
+ "type": "function"
102
+ },
103
+ {
104
+ "inputs": [],
105
+ "name": "treasury",
106
+ "outputs": [
107
+ {
108
+ "internalType": "contract ITreasury",
109
+ "name": "",
110
+ "type": "address"
111
+ }
112
+ ],
113
+ "stateMutability": "view",
114
+ "type": "function"
115
+ },
116
+ {
117
+ "inputs": [],
118
+ "name": "twap",
119
+ "outputs": [
120
+ {
121
+ "internalType": "contract TWAP",
122
+ "name": "",
123
+ "type": "address"
124
+ }
125
+ ],
126
+ "stateMutability": "view",
127
+ "type": "function"
128
+ },
129
+ {
130
+ "stateMutability": "payable",
131
+ "type": "receive"
132
+ }
133
+ ]