Skip to content

Commit da65e53

Browse files
author
jagdeep sidhu
committed
Revert "update latest changes to new core"
This reverts commit 38be038.
1 parent 6b54310 commit da65e53

27 files changed

+17668
-58129
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
![Preview](./home.png)
22
## Sysethereum DAPP
3-
This is a reference implementation of a user interface showcasing the Syscoin <=> NEVM bridge. It will create a SPV proof of Syscoin burn transactions post to the relay smart contract which will validate and call a Relay contract which uses VaultManager to transfer from and to.
3+
This is a reference implementation of a user interface showcasing the Syscoin <=> NEVM bridge. It will create a SPV proof of Syscoin burn transactions post to the relay smart contract which will validate and call a Token contract which uses ERC20Manager to transfer from and to.
44

5-
On the way back to Syscoin. An SPV proof of the NEVM transaction is created using [eth-proof](http://github.com/syscoin/eth-proof) and will call a burn function from the VaultManager base of the Syscoin Token contract that holds the tokens. It's purpose is to store and transfer tokens and the function parameters are used via ABI data to detect the value of the burn once Syscoin consensus reads the transaction data.
5+
On the way back to Syscoin. An SPV proof of the NEVM transaction is created using [eth-proof](http://github.com/syscoin/eth-proof) and will call a burn function from the ERC20Manager base of the Syscoin Token contract that holds the tokens. It's purpose is to store and transfer tokens and the function parameters are used via ABI data to detect the value of the burn once Syscoin consensus reads the transaction data.
66

7-
Syscoin itself enforces the SPV proofs of existence of transactions between the chains. The full EVM and UTXO states are known to each other and validated 1:1 for each block. Syscoin nodes run a custom version of Geth which validates NEVM blocks and speaks to Syscoin over ZMQ socket transport layer. The Transaction root is queried for when a Syscoin mint transaction is created (when NEVM contract transfers Syscoin tokens to the Vault Manager contract). The calculated Transaction Root must match the Transaction Root saved locally by each node which validates that the NEVM transaction was valid and subsequently transferring to the user. The total supply of Syscoin will remain constant throughout the process as the bridge represents a zero-sum game.
7+
Syscoin itself enforces the SPV proof by running Geth in light mode to sync up to the last few weeks of headers on NEVM. Syscoin nodes run a custom version of Geth which validates NEVM blocks and speaks to Syscoin over ZMQ socket transport layer. The Transaction root is queried for when a Syscoin mint transaction is created (when NEVM contract burns Syscoin tokens on the ERC contract). The calculated Transaction Root must match the Transaction Root saved in the database which validates that the NEVM transaction was valid and subsequently minting new Syscoin or Syscoin assets into existence. The total supply of Syscoin/Syscoin assets should remain constant throughout the process as the bridge represents a zero-sum game.
88
## Dependencies
99

1010
1) Just Pali chrome extension wallet and Metamask!

package-lock.json

Lines changed: 0 additions & 43662 deletions
This file was deleted.

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@
88
"bitcoin-proof": "^2.0.0",
99
"i18next": "^12.0.0",
1010
"i18next-browser-languagedetector": "^2.2.3",
11-
"joi": "^17.13.3",
12-
"joi-validation-strategy": "^0.1.1",
11+
"joi": "^10.2.2",
12+
"joi-validation-strategy": "^0.3.3",
1313
"material-icons-react": "^1.0.4",
1414
"react": "^16.11.0",
1515
"react-beforeunload": "^2.1.0",
1616
"react-dom": "^16.11.0",
17-
"react-i18next": "^15.0.1",
18-
"react-scripts": "^3.0.1",
17+
"react-i18next": "^8.1.0",
18+
"react-scripts": "2.1.8",
1919
"react-search-field": "^1.0.0",
2020
"react-stepzilla": "^6.0.2",
2121
"react-tabs": "^3.0.0",
2222
"react-textarea-autosize": "^7.1.2",
2323
"react-validation-mixin": "^5.4.0",
2424
"satoshi-bitcoin": "^1.0.5",
25-
"syscoinjs-lib": "^1.0.219",
26-
"web3": "^4.12.1"
25+
"syscoinjs-lib": "^1.0.212",
26+
"web3": "^1.5.2"
2727
},
2828
"scripts": {
2929
"start": "react-scripts start",
@@ -41,7 +41,7 @@
4141
"not op_mini all"
4242
],
4343
"devDependencies": {
44-
"gulp": "^5.0.0",
44+
"gulp": "^4.0.2",
4545
"gulp-sass": "^5.0.0",
4646
"sass": "^1.38.2"
4747
}

src/SyscoinERC20I.js

Lines changed: 312 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,312 @@
1+
const assetabi = [
2+
{
3+
"inputs": [
4+
{
5+
"internalType": "string",
6+
"name": "name",
7+
"type": "string"
8+
},
9+
{
10+
"internalType": "string",
11+
"name": "symbol",
12+
"type": "string"
13+
},
14+
{
15+
"internalType": "uint8",
16+
"name": "decimals_",
17+
"type": "uint8"
18+
}
19+
],
20+
"stateMutability": "nonpayable",
21+
"type": "constructor"
22+
},
23+
{
24+
"anonymous": false,
25+
"inputs": [
26+
{
27+
"indexed": true,
28+
"internalType": "address",
29+
"name": "owner",
30+
"type": "address"
31+
},
32+
{
33+
"indexed": true,
34+
"internalType": "address",
35+
"name": "spender",
36+
"type": "address"
37+
},
38+
{
39+
"indexed": false,
40+
"internalType": "uint256",
41+
"name": "value",
42+
"type": "uint256"
43+
}
44+
],
45+
"name": "Approval",
46+
"type": "event"
47+
},
48+
{
49+
"anonymous": false,
50+
"inputs": [
51+
{
52+
"indexed": true,
53+
"internalType": "address",
54+
"name": "from",
55+
"type": "address"
56+
},
57+
{
58+
"indexed": true,
59+
"internalType": "address",
60+
"name": "to",
61+
"type": "address"
62+
},
63+
{
64+
"indexed": false,
65+
"internalType": "uint256",
66+
"name": "value",
67+
"type": "uint256"
68+
}
69+
],
70+
"name": "Transfer",
71+
"type": "event"
72+
},
73+
{
74+
"inputs": [
75+
{
76+
"internalType": "address",
77+
"name": "owner",
78+
"type": "address"
79+
},
80+
{
81+
"internalType": "address",
82+
"name": "spender",
83+
"type": "address"
84+
}
85+
],
86+
"name": "allowance",
87+
"outputs": [
88+
{
89+
"internalType": "uint256",
90+
"name": "",
91+
"type": "uint256"
92+
}
93+
],
94+
"stateMutability": "view",
95+
"type": "function"
96+
},
97+
{
98+
"inputs": [
99+
{
100+
"internalType": "address",
101+
"name": "spender",
102+
"type": "address"
103+
},
104+
{
105+
"internalType": "uint256",
106+
"name": "amount",
107+
"type": "uint256"
108+
}
109+
],
110+
"name": "approve",
111+
"outputs": [
112+
{
113+
"internalType": "bool",
114+
"name": "",
115+
"type": "bool"
116+
}
117+
],
118+
"stateMutability": "nonpayable",
119+
"type": "function"
120+
},
121+
{
122+
"inputs": [
123+
{
124+
"internalType": "address",
125+
"name": "account",
126+
"type": "address"
127+
}
128+
],
129+
"name": "balanceOf",
130+
"outputs": [
131+
{
132+
"internalType": "uint256",
133+
"name": "",
134+
"type": "uint256"
135+
}
136+
],
137+
"stateMutability": "view",
138+
"type": "function"
139+
},
140+
{
141+
"inputs": [
142+
{
143+
"internalType": "address",
144+
"name": "spender",
145+
"type": "address"
146+
},
147+
{
148+
"internalType": "uint256",
149+
"name": "subtractedValue",
150+
"type": "uint256"
151+
}
152+
],
153+
"name": "decreaseAllowance",
154+
"outputs": [
155+
{
156+
"internalType": "bool",
157+
"name": "",
158+
"type": "bool"
159+
}
160+
],
161+
"stateMutability": "nonpayable",
162+
"type": "function"
163+
},
164+
{
165+
"inputs": [
166+
{
167+
"internalType": "address",
168+
"name": "spender",
169+
"type": "address"
170+
},
171+
{
172+
"internalType": "uint256",
173+
"name": "addedValue",
174+
"type": "uint256"
175+
}
176+
],
177+
"name": "increaseAllowance",
178+
"outputs": [
179+
{
180+
"internalType": "bool",
181+
"name": "",
182+
"type": "bool"
183+
}
184+
],
185+
"stateMutability": "nonpayable",
186+
"type": "function"
187+
},
188+
{
189+
"inputs": [],
190+
"name": "name",
191+
"outputs": [
192+
{
193+
"internalType": "string",
194+
"name": "",
195+
"type": "string"
196+
}
197+
],
198+
"stateMutability": "view",
199+
"type": "function"
200+
},
201+
{
202+
"inputs": [],
203+
"name": "symbol",
204+
"outputs": [
205+
{
206+
"internalType": "string",
207+
"name": "",
208+
"type": "string"
209+
}
210+
],
211+
"stateMutability": "view",
212+
"type": "function"
213+
},
214+
{
215+
"inputs": [],
216+
"name": "totalSupply",
217+
"outputs": [
218+
{
219+
"internalType": "uint256",
220+
"name": "",
221+
"type": "uint256"
222+
}
223+
],
224+
"stateMutability": "view",
225+
"type": "function"
226+
},
227+
{
228+
"inputs": [
229+
{
230+
"internalType": "address",
231+
"name": "recipient",
232+
"type": "address"
233+
},
234+
{
235+
"internalType": "uint256",
236+
"name": "amount",
237+
"type": "uint256"
238+
}
239+
],
240+
"name": "transfer",
241+
"outputs": [
242+
{
243+
"internalType": "bool",
244+
"name": "",
245+
"type": "bool"
246+
}
247+
],
248+
"stateMutability": "nonpayable",
249+
"type": "function"
250+
},
251+
{
252+
"inputs": [
253+
{
254+
"internalType": "address",
255+
"name": "sender",
256+
"type": "address"
257+
},
258+
{
259+
"internalType": "address",
260+
"name": "recipient",
261+
"type": "address"
262+
},
263+
{
264+
"internalType": "uint256",
265+
"name": "amount",
266+
"type": "uint256"
267+
}
268+
],
269+
"name": "transferFrom",
270+
"outputs": [
271+
{
272+
"internalType": "bool",
273+
"name": "",
274+
"type": "bool"
275+
}
276+
],
277+
"stateMutability": "nonpayable",
278+
"type": "function"
279+
},
280+
{
281+
"inputs": [],
282+
"name": "decimals",
283+
"outputs": [
284+
{
285+
"internalType": "uint8",
286+
"name": "",
287+
"type": "uint8"
288+
}
289+
],
290+
"stateMutability": "view",
291+
"type": "function"
292+
},
293+
{
294+
"inputs": [
295+
{
296+
"internalType": "address",
297+
"name": "_to",
298+
"type": "address"
299+
},
300+
{
301+
"internalType": "uint256",
302+
"name": "_value",
303+
"type": "uint256"
304+
}
305+
],
306+
"name": "assign",
307+
"outputs": [],
308+
"stateMutability": "nonpayable",
309+
"type": "function"
310+
}
311+
]
312+
export default assetabi;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const vaultManagerABI = [
1+
const erc20Managerabi = [
22
{
33
"inputs": [
44
{
@@ -271,4 +271,4 @@ const vaultManagerABI = [
271271
"payable": true
272272
}
273273
]
274-
export default vaultManagerABI;
274+
export default erc20Managerabi;

0 commit comments

Comments
 (0)