├── .gitignore
├── App.js
├── App1.js
├── Counter.js
├── README.md
├── app.json
├── artifacts
├── Hardora.json
├── Hardora_metadata.json
├── Tokenn.json
├── Tokenn_metadata.json
└── build-info
│ ├── 43d87868b70aa5dce62228cc22ce359e.json
│ └── 5b9474658729a595cf6b7de8de7b61b3.json
├── assets
├── adaptive-icon.png
├── favicon.png
├── icon.png
├── images
│ ├── app-logo.png
│ ├── computer.png
│ ├── decentralized.png
│ ├── illus.png
│ ├── layer.png
│ ├── logo.png
│ ├── logo.svg
│ ├── logo_s.png
│ └── mobile-first.png
├── splash.png
└── splash1.png
├── babel.config.js
├── chainz
└── web3.js
├── components
├── CreateWalletScreen.js
├── HomeScreen.js
└── SplashScreen.js
├── constant
└── Color.js
├── contracts
├── Bridge.sol
├── DemoApp.sol
├── Hardora.sol
├── Oracle.sol
├── Random.sol
└── scenario.json
├── global.js
├── onBoardingScreen
├── OnBoardingSwiper.js
├── ScreenBoarding.js
├── UI
│ ├── FirstScreen.js
│ ├── SecondScreen.js
│ └── ThirdScreen.js
└── index.js
├── package-lock.json
├── package.json
├── remove.json
├── rn-cli.config.js
└── yarn.lock
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | .expo/
3 | dist/
4 | npm-debug.*
5 | *.jks
6 | *.p8
7 | *.p12
8 | *.key
9 | *.mobileprovision
10 | *.orig.*
11 | web-build/
12 |
13 | # macOS
14 | .DS_Store
15 |
16 | # Temporary files created by Metro to check the health of the file watcher
17 | .metro-health-check*
18 |
--------------------------------------------------------------------------------
/App.js:
--------------------------------------------------------------------------------
1 | // import './global';
2 | // const Web3 = require('web3');
3 |
4 | import React, { useEffect } from 'react';
5 | import { NavigationContainer } from '@react-navigation/native';
6 | import { createStackNavigator } from '@react-navigation/stack';
7 | import SplashScreen from './components/SplashScreen';
8 | import HomeScreen from './components/HomeScreen';
9 | import FirstScreen from './onBoardingScreen/UI/FirstScreen';
10 | import SecondScreen from './onBoardingScreen/UI/SecondScreen';
11 | import ThirdScreen from './onBoardingScreen/UI/ThirdScreen';
12 | import CreateWalletScreen from './components/CreateWalletScreen';
13 | // import onBoardingScreen from './onBoardingScreen';
14 | // import OnBoardingSwiper from './onBoardingScreen/OnBoardingSwiper';
15 | // import ScreenBoarding from './onBoardingScreen/ScreenBoarding';
16 |
17 |
18 | const Stack = createStackNavigator();
19 |
20 | const App = () => {
21 |
22 | // function componentWillMount() {
23 | // const web3 = new Web3(
24 | // new Web3.providers.HttpProvider('https://mainnet.infura.io/')
25 | // );
26 |
27 | // web3.eth.getBlock('latest').then(console.log)
28 | // }
29 | // componentWillMount();
30 |
31 | return (
32 |
33 |
34 |
39 | null,
42 | headerShown: false,
43 | }}
44 | />
45 | null,
48 | headerShown: false,
49 | }}
50 | />
51 | null,
54 | headerShown: false,
55 | }}
56 | />
57 | null,
60 | headerShown: false,
61 | }}
62 | />
63 |
64 |
65 | );
66 | };
67 |
68 | export default App;
69 |
--------------------------------------------------------------------------------
/App1.js:
--------------------------------------------------------------------------------
1 | // import { StatusBar } from 'expo-status-bar';
2 | // import { StyleSheet, Text, View } from 'react-native';
3 |
4 | // export default function App() {
5 | // return (
6 | //
7 | // Open up App.js to start working on your app!
8 | //
9 | //
10 | // );
11 | // }
12 |
13 | // const styles = StyleSheet.create({
14 | // container: {
15 | // flex: 1,
16 | // backgroundColor: '#fff',
17 | // alignItems: 'center',
18 | // justifyContent: 'center',
19 | // },
20 | // });
21 | import * as SplashScreen from "expo-splash-screen";
22 | import React, { useCallback, useEffect, useState } from "react";
23 | import { Text, View } from "react-native";
24 |
25 | export default function App() {
26 | const [appIsReady, setAppIsReady] = useState(false);
27 |
28 | useEffect(() => {
29 | async function prepare() {
30 | // Keep the splash screen visible
31 | await SplashScreen.preventAutoHideAsync();
32 | // Do what you need before the splash screen gets hidden
33 | console.log("I'm a task that gets executed before splash screen disappears");
34 | // Then tell the application to render
35 | setAppIsReady(true);
36 | }
37 | prepare();
38 | }, []);
39 |
40 | const onLayoutRootView = useCallback(async () => {
41 | if (appIsReady) {
42 | // Hide the splash screen
43 | await SplashScreen.hideAsync();
44 | }
45 | }, [appIsReady]);
46 |
47 | if (!appIsReady) {
48 | return null;
49 | }
50 |
51 | return (
52 |
55 | Hello Word!
56 |
57 | );
58 | }
--------------------------------------------------------------------------------
/Counter.js:
--------------------------------------------------------------------------------
1 | import React, { useState, useEffect } from 'react';
2 | import { Text } from 'react-native';
3 |
4 | const App = () => {
5 | // Set the initial count to 0
6 | const [count, setCount] = useState(0);
7 | useEffect(() => {
8 | // increment the count by 1
9 | const countTimer = setInterval(() => {
10 | setCount((prevCount) => prevCount + 1);
11 | // every 1000 milliseconds
12 | }, 1000);
13 | // and clear this timer when the component is unmounted
14 | return function cleanup() {
15 | clearInterval(countTimer);
16 | };
17 | });
18 |
19 | return (Count is {count});
20 | };
21 |
22 | export default App;
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # To Clone this repo and use:
2 | git clone --branch master https://github.com/hardora/scale-ethereum.git
3 | cd scale-ethereum
4 | npm install
5 | npm start
6 | - Scan the QRCODE with your Expo App
7 |
8 |
9 | # Hardora Oracle
10 |
11 | The Hardora Oracle is a decentralized, mobile-first, compute-enabled hardware oracle for off-chain data access and computation. The emphasis is on a decentralized, hardware-based, compute-enabled and mobile-first oracle for DApps built on existing blockchains to access off-chain data that is unavailable on-chain.
12 |
13 | ## THE PROBLEM WITH CURRENT ORACLES
14 | * Centralization
15 | Most current blockchain oracles are centralized, and those that are decentralized are controlled by a few nodes that contribute to sourcing and validating information. The integrity of the data provided by this oracle network depends on the integrity of these few nodes
16 | * Expensive setup
17 | Running a node can be expensive to set up, limiting the number of nodes available; thus, most oracles are centralized or partly decentralized.
18 | * Complex Architecture/Consensus
19 | Some current decentralized oracles operate their blockchain network, which has its unique challenges such as scalability and interoperability with existing blockchains. The complex architecture of these oracles and the requirement to set up a node make it difficult for easy integration with an existing blockchain network and scalability for future use of blockchain oracles.
20 |
21 | ## OUR APPROACH
22 |
23 | - Decentralization
24 | We are democratizing Oracle service for any existing blockchain network, which ensures the integrity of the Oracle network and thus the information provided. This is achieved by allowing nodes to run on mobile computing devices like Android phones and by allowing thousands of people to join the network and become node operators.
25 | - Low setup cost and easy setup
26 | To ensure low operations and setup costs, the Oracle nodes will operate on mobile computing devices, which offer more efficient power consumption for computation while leveraging the accessibility and availability of mobile devices. There is no need for a complex setup; all that will be required is to download the node application, connect a wallet, connect the required hardware device, and stake some tokens to finalize registration. In just a few minutes, a user can set up a node that will be recognized by the entire network.
27 |
28 | - Easy integration
29 | The Hardora architecture is designed to allow easy integration with any EVM-based, EVM-compatible, or any blockchain that can execute smart contracts. The Oracle Controller runs on the blockchain itself, while the nodes run off-chain on mobile devices.
30 |
31 | - Scalability
32 | Scalability is one big issue that is addressed by our decentralized and mobile approach. The goal is to ensure that as more networks are supported, the nodes can keep generating and validating data for on-chain usage by DApps and even off-chain apps. Our modular approach, will ensure that more functionalities can be added simply by creating and deploying the smart contract for that function on all supported blockchains.
33 |
34 | ## HOW IT WORKS
35 | The main component of the Hardora oracle are:
36 | A blockchain RPC like Infura to connect the mobile node to the blockchain nodes
37 | A mobile device: referred to as mobile node in this context and
38 | A hardware device (Trusted device)
39 |
40 | The mobile node communicates with a blockchain RPC node in order to interact with the Oracle smart contracts running on the various validators/nodes of a blockchain. To create a scalable and decentralized Oracle network, the Hardora Oracle runs on mobile devices: which are known to be accessible to over 3 billion people worldwide and are connected to the internet almost all the time. This is important in countries where people don’t have access to a robust internet infrastructure to provide the accessibility required by an Oracle network.
41 | The interaction starts when a Smart contract on blockchain-A requests data from the oracle smart contract running on the same blockchain through internal transactions. The oracle smart contract receives this data request and sends an invocation command to a selected node (an EOA) to sign and acknowledge the data request. The node app request or generates the needed data, sign it and initiate a new transaction to the smart contract that requested the data. Once the data is received by the smart contract and verified, it is sent to the smart contract that requested the data initially.
42 |
43 | The mobile device is the physical device on which the node app runs. The node app on the device is connected to a dedicated hardware device similar to a hardware wallet, which performs non-deterministic calculations off-chain, while the node app performs deterministic computations. Deterministic data can be verified by any number of mobile nodes such as verifying user membership on a database like Polybase, while non-deterministic data cant be verified by other mobile nodes as the data produced is unique such as random numbers and thus must be generated by a trusted device.
44 |
45 | The essence of the Hardora oracle is to provide off-chain data or computation that would have been otherwise expensive to execute or impossible to access by DApps running on blockchain nodes. Combining a mobile device and a dedicated hardware device ensures we can serve quality data that is either deterministic or not, based on the demand of the DApps requesting those data.
46 |
47 | Possible data services provided by the protocol include:
48 | 1. Generating random numbers
49 | 2. Computing the hash of a file
50 | 3. Verifying data stored in a decentralized database like Polybase
51 | 4. Retrieving location-specific carbon data
52 | 5. Retrieving location-specific temperature data
53 | 6. File hash computations and many more.
54 |
55 | ## Link to our slide:
56 | https://www.canva.com/design/DAFd7b8N4T4/H_jc4Fth9K3XHsvhQbp72g/view?utm_content=DAFd7b8N4T4&utm_campaign=designshare&utm_medium=link&utm_source=publishsharelink
57 |
--------------------------------------------------------------------------------
/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "expo": {
3 | "name": "hardora",
4 | "slug": "hardora",
5 | "version": "1.0.0",
6 | "orientation": "portrait",
7 | "icon": "./assets/images/app-logo.png",
8 | "userInterfaceStyle": "light",
9 | "assetBundlePatterns": [
10 | "**/*"
11 | ],
12 |
13 | "ios": {
14 | "supportsTablet": true
15 | },
16 | "android": {
17 | "adaptiveIcon": {
18 | "foregroundImage": "./assets/adaptive-icon.png",
19 | "backgroundColor": "#ffffff"
20 | }
21 | },
22 | "web": {
23 | "favicon": "./assets/favicon.png"
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/artifacts/Hardora_metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "compiler": {
3 | "version": "0.8.18+commit.87f61d96"
4 | },
5 | "language": "Solidity",
6 | "output": {
7 | "abi": [
8 | {
9 | "inputs": [
10 | {
11 | "internalType": "string",
12 | "name": "_name",
13 | "type": "string"
14 | },
15 | {
16 | "internalType": "string",
17 | "name": "_symbol",
18 | "type": "string"
19 | },
20 | {
21 | "internalType": "uint8",
22 | "name": "_decimals",
23 | "type": "uint8"
24 | },
25 | {
26 | "internalType": "uint256",
27 | "name": "_totalSupply",
28 | "type": "uint256"
29 | }
30 | ],
31 | "stateMutability": "nonpayable",
32 | "type": "constructor"
33 | },
34 | {
35 | "anonymous": false,
36 | "inputs": [
37 | {
38 | "indexed": true,
39 | "internalType": "address",
40 | "name": "owner",
41 | "type": "address"
42 | },
43 | {
44 | "indexed": true,
45 | "internalType": "address",
46 | "name": "spender",
47 | "type": "address"
48 | },
49 | {
50 | "indexed": false,
51 | "internalType": "uint256",
52 | "name": "value",
53 | "type": "uint256"
54 | }
55 | ],
56 | "name": "Approval",
57 | "type": "event"
58 | },
59 | {
60 | "anonymous": false,
61 | "inputs": [
62 | {
63 | "indexed": true,
64 | "internalType": "address",
65 | "name": "validator",
66 | "type": "address"
67 | }
68 | ],
69 | "name": "Requested",
70 | "type": "event"
71 | },
72 | {
73 | "anonymous": false,
74 | "inputs": [
75 | {
76 | "indexed": true,
77 | "internalType": "address",
78 | "name": "from",
79 | "type": "address"
80 | },
81 | {
82 | "indexed": true,
83 | "internalType": "address",
84 | "name": "to",
85 | "type": "address"
86 | },
87 | {
88 | "indexed": false,
89 | "internalType": "uint256",
90 | "name": "value",
91 | "type": "uint256"
92 | }
93 | ],
94 | "name": "Transfer",
95 | "type": "event"
96 | },
97 | {
98 | "anonymous": false,
99 | "inputs": [
100 | {
101 | "indexed": true,
102 | "internalType": "address",
103 | "name": "validator",
104 | "type": "address"
105 | }
106 | ],
107 | "name": "ValidatorAdded",
108 | "type": "event"
109 | },
110 | {
111 | "inputs": [
112 | {
113 | "internalType": "address",
114 | "name": "_validator",
115 | "type": "address"
116 | }
117 | ],
118 | "name": "addValidator",
119 | "outputs": [],
120 | "stateMutability": "nonpayable",
121 | "type": "function"
122 | },
123 | {
124 | "inputs": [
125 | {
126 | "internalType": "address",
127 | "name": "",
128 | "type": "address"
129 | },
130 | {
131 | "internalType": "address",
132 | "name": "",
133 | "type": "address"
134 | }
135 | ],
136 | "name": "allowance",
137 | "outputs": [
138 | {
139 | "internalType": "uint256",
140 | "name": "",
141 | "type": "uint256"
142 | }
143 | ],
144 | "stateMutability": "view",
145 | "type": "function"
146 | },
147 | {
148 | "inputs": [
149 | {
150 | "internalType": "address",
151 | "name": "_spender",
152 | "type": "address"
153 | },
154 | {
155 | "internalType": "uint256",
156 | "name": "_value",
157 | "type": "uint256"
158 | }
159 | ],
160 | "name": "approve",
161 | "outputs": [
162 | {
163 | "internalType": "bool",
164 | "name": "success",
165 | "type": "bool"
166 | }
167 | ],
168 | "stateMutability": "nonpayable",
169 | "type": "function"
170 | },
171 | {
172 | "inputs": [
173 | {
174 | "internalType": "address",
175 | "name": "",
176 | "type": "address"
177 | }
178 | ],
179 | "name": "balanceOf",
180 | "outputs": [
181 | {
182 | "internalType": "uint256",
183 | "name": "",
184 | "type": "uint256"
185 | }
186 | ],
187 | "stateMutability": "view",
188 | "type": "function"
189 | },
190 | {
191 | "inputs": [
192 | {
193 | "internalType": "uint256",
194 | "name": "_value",
195 | "type": "uint256"
196 | }
197 | ],
198 | "name": "burn",
199 | "outputs": [
200 | {
201 | "internalType": "bool",
202 | "name": "success",
203 | "type": "bool"
204 | }
205 | ],
206 | "stateMutability": "nonpayable",
207 | "type": "function"
208 | },
209 | {
210 | "inputs": [],
211 | "name": "decimals",
212 | "outputs": [
213 | {
214 | "internalType": "uint8",
215 | "name": "",
216 | "type": "uint8"
217 | }
218 | ],
219 | "stateMutability": "view",
220 | "type": "function"
221 | },
222 | {
223 | "inputs": [
224 | {
225 | "internalType": "address",
226 | "name": "_spender",
227 | "type": "address"
228 | },
229 | {
230 | "internalType": "uint256",
231 | "name": "_subtractedValue",
232 | "type": "uint256"
233 | }
234 | ],
235 | "name": "decreaseAllowance",
236 | "outputs": [
237 | {
238 | "internalType": "bool",
239 | "name": "success",
240 | "type": "bool"
241 | }
242 | ],
243 | "stateMutability": "nonpayable",
244 | "type": "function"
245 | },
246 | {
247 | "inputs": [
248 | {
249 | "internalType": "address",
250 | "name": "",
251 | "type": "address"
252 | }
253 | ],
254 | "name": "hasRequested",
255 | "outputs": [
256 | {
257 | "internalType": "bool",
258 | "name": "",
259 | "type": "bool"
260 | }
261 | ],
262 | "stateMutability": "view",
263 | "type": "function"
264 | },
265 | {
266 | "inputs": [
267 | {
268 | "internalType": "address",
269 | "name": "_spender",
270 | "type": "address"
271 | },
272 | {
273 | "internalType": "uint256",
274 | "name": "_addedValue",
275 | "type": "uint256"
276 | }
277 | ],
278 | "name": "increaseAllowance",
279 | "outputs": [
280 | {
281 | "internalType": "bool",
282 | "name": "success",
283 | "type": "bool"
284 | }
285 | ],
286 | "stateMutability": "nonpayable",
287 | "type": "function"
288 | },
289 | {
290 | "inputs": [
291 | {
292 | "internalType": "address",
293 | "name": "",
294 | "type": "address"
295 | }
296 | ],
297 | "name": "isValidator",
298 | "outputs": [
299 | {
300 | "internalType": "bool",
301 | "name": "",
302 | "type": "bool"
303 | }
304 | ],
305 | "stateMutability": "view",
306 | "type": "function"
307 | },
308 | {
309 | "inputs": [],
310 | "name": "name",
311 | "outputs": [
312 | {
313 | "internalType": "string",
314 | "name": "",
315 | "type": "string"
316 | }
317 | ],
318 | "stateMutability": "view",
319 | "type": "function"
320 | },
321 | {
322 | "inputs": [],
323 | "name": "requestTokens",
324 | "outputs": [],
325 | "stateMutability": "nonpayable",
326 | "type": "function"
327 | },
328 | {
329 | "inputs": [],
330 | "name": "symbol",
331 | "outputs": [
332 | {
333 | "internalType": "string",
334 | "name": "",
335 | "type": "string"
336 | }
337 | ],
338 | "stateMutability": "view",
339 | "type": "function"
340 | },
341 | {
342 | "inputs": [],
343 | "name": "totalSupply",
344 | "outputs": [
345 | {
346 | "internalType": "uint256",
347 | "name": "",
348 | "type": "uint256"
349 | }
350 | ],
351 | "stateMutability": "view",
352 | "type": "function"
353 | },
354 | {
355 | "inputs": [
356 | {
357 | "internalType": "address",
358 | "name": "_to",
359 | "type": "address"
360 | },
361 | {
362 | "internalType": "uint256",
363 | "name": "_value",
364 | "type": "uint256"
365 | }
366 | ],
367 | "name": "transfer",
368 | "outputs": [
369 | {
370 | "internalType": "bool",
371 | "name": "success",
372 | "type": "bool"
373 | }
374 | ],
375 | "stateMutability": "nonpayable",
376 | "type": "function"
377 | },
378 | {
379 | "inputs": [
380 | {
381 | "internalType": "address",
382 | "name": "_from",
383 | "type": "address"
384 | },
385 | {
386 | "internalType": "address",
387 | "name": "_to",
388 | "type": "address"
389 | },
390 | {
391 | "internalType": "uint256",
392 | "name": "_value",
393 | "type": "uint256"
394 | }
395 | ],
396 | "name": "transferFrom",
397 | "outputs": [
398 | {
399 | "internalType": "bool",
400 | "name": "success",
401 | "type": "bool"
402 | }
403 | ],
404 | "stateMutability": "nonpayable",
405 | "type": "function"
406 | },
407 | {
408 | "inputs": [
409 | {
410 | "internalType": "uint256",
411 | "name": "",
412 | "type": "uint256"
413 | }
414 | ],
415 | "name": "validators",
416 | "outputs": [
417 | {
418 | "internalType": "address",
419 | "name": "",
420 | "type": "address"
421 | }
422 | ],
423 | "stateMutability": "view",
424 | "type": "function"
425 | }
426 | ],
427 | "devdoc": {
428 | "kind": "dev",
429 | "methods": {},
430 | "version": 1
431 | },
432 | "userdoc": {
433 | "kind": "user",
434 | "methods": {},
435 | "version": 1
436 | }
437 | },
438 | "settings": {
439 | "compilationTarget": {
440 | "contracts/Hardora.sol": "Hardora"
441 | },
442 | "evmVersion": "paris",
443 | "libraries": {},
444 | "metadata": {
445 | "bytecodeHash": "ipfs"
446 | },
447 | "optimizer": {
448 | "enabled": false,
449 | "runs": 200
450 | },
451 | "remappings": []
452 | },
453 | "sources": {
454 | "contracts/Hardora.sol": {
455 | "keccak256": "0xfcabd8ae9838f05d3596553a39aa40a3b0ac9b89cf02d752baa5e193d58f13d8",
456 | "license": "MIT",
457 | "urls": [
458 | "bzz-raw://8a8f34e801a5fd71f1b15c2c7f825a7c8339f7c1cfb00f016bfd5fa58f4da6df",
459 | "dweb:/ipfs/QmfCccQ5NaAJ5BcTLv76au4DQWKfvS56SLLm5VEvtkPYHr"
460 | ]
461 | }
462 | },
463 | "version": 1
464 | }
--------------------------------------------------------------------------------
/artifacts/Tokenn_metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "compiler": {
3 | "version": "0.8.18+commit.87f61d96"
4 | },
5 | "language": "Solidity",
6 | "output": {
7 | "abi": [
8 | {
9 | "inputs": [
10 | {
11 | "internalType": "string",
12 | "name": "_name",
13 | "type": "string"
14 | },
15 | {
16 | "internalType": "string",
17 | "name": "_symbol",
18 | "type": "string"
19 | },
20 | {
21 | "internalType": "uint8",
22 | "name": "_decimals",
23 | "type": "uint8"
24 | },
25 | {
26 | "internalType": "uint256",
27 | "name": "_totalSupply",
28 | "type": "uint256"
29 | }
30 | ],
31 | "stateMutability": "nonpayable",
32 | "type": "constructor"
33 | },
34 | {
35 | "anonymous": false,
36 | "inputs": [
37 | {
38 | "indexed": true,
39 | "internalType": "address",
40 | "name": "owner",
41 | "type": "address"
42 | },
43 | {
44 | "indexed": true,
45 | "internalType": "address",
46 | "name": "spender",
47 | "type": "address"
48 | },
49 | {
50 | "indexed": false,
51 | "internalType": "uint256",
52 | "name": "value",
53 | "type": "uint256"
54 | }
55 | ],
56 | "name": "Approval",
57 | "type": "event"
58 | },
59 | {
60 | "anonymous": false,
61 | "inputs": [
62 | {
63 | "indexed": true,
64 | "internalType": "address",
65 | "name": "validator",
66 | "type": "address"
67 | }
68 | ],
69 | "name": "Requested",
70 | "type": "event"
71 | },
72 | {
73 | "anonymous": false,
74 | "inputs": [
75 | {
76 | "indexed": true,
77 | "internalType": "address",
78 | "name": "from",
79 | "type": "address"
80 | },
81 | {
82 | "indexed": true,
83 | "internalType": "address",
84 | "name": "to",
85 | "type": "address"
86 | },
87 | {
88 | "indexed": false,
89 | "internalType": "uint256",
90 | "name": "value",
91 | "type": "uint256"
92 | }
93 | ],
94 | "name": "Transfer",
95 | "type": "event"
96 | },
97 | {
98 | "anonymous": false,
99 | "inputs": [
100 | {
101 | "indexed": true,
102 | "internalType": "address",
103 | "name": "validator",
104 | "type": "address"
105 | }
106 | ],
107 | "name": "ValidatorAdded",
108 | "type": "event"
109 | },
110 | {
111 | "inputs": [
112 | {
113 | "internalType": "address",
114 | "name": "_validator",
115 | "type": "address"
116 | }
117 | ],
118 | "name": "addValidator",
119 | "outputs": [],
120 | "stateMutability": "nonpayable",
121 | "type": "function"
122 | },
123 | {
124 | "inputs": [
125 | {
126 | "internalType": "address",
127 | "name": "",
128 | "type": "address"
129 | },
130 | {
131 | "internalType": "address",
132 | "name": "",
133 | "type": "address"
134 | }
135 | ],
136 | "name": "allowance",
137 | "outputs": [
138 | {
139 | "internalType": "uint256",
140 | "name": "",
141 | "type": "uint256"
142 | }
143 | ],
144 | "stateMutability": "view",
145 | "type": "function"
146 | },
147 | {
148 | "inputs": [
149 | {
150 | "internalType": "address",
151 | "name": "_spender",
152 | "type": "address"
153 | },
154 | {
155 | "internalType": "uint256",
156 | "name": "_value",
157 | "type": "uint256"
158 | }
159 | ],
160 | "name": "approve",
161 | "outputs": [
162 | {
163 | "internalType": "bool",
164 | "name": "success",
165 | "type": "bool"
166 | }
167 | ],
168 | "stateMutability": "nonpayable",
169 | "type": "function"
170 | },
171 | {
172 | "inputs": [
173 | {
174 | "internalType": "address",
175 | "name": "",
176 | "type": "address"
177 | }
178 | ],
179 | "name": "balanceOf",
180 | "outputs": [
181 | {
182 | "internalType": "uint256",
183 | "name": "",
184 | "type": "uint256"
185 | }
186 | ],
187 | "stateMutability": "view",
188 | "type": "function"
189 | },
190 | {
191 | "inputs": [
192 | {
193 | "internalType": "uint256",
194 | "name": "_value",
195 | "type": "uint256"
196 | }
197 | ],
198 | "name": "burn",
199 | "outputs": [
200 | {
201 | "internalType": "bool",
202 | "name": "success",
203 | "type": "bool"
204 | }
205 | ],
206 | "stateMutability": "nonpayable",
207 | "type": "function"
208 | },
209 | {
210 | "inputs": [],
211 | "name": "decimals",
212 | "outputs": [
213 | {
214 | "internalType": "uint8",
215 | "name": "",
216 | "type": "uint8"
217 | }
218 | ],
219 | "stateMutability": "view",
220 | "type": "function"
221 | },
222 | {
223 | "inputs": [
224 | {
225 | "internalType": "address",
226 | "name": "_spender",
227 | "type": "address"
228 | },
229 | {
230 | "internalType": "uint256",
231 | "name": "_subtractedValue",
232 | "type": "uint256"
233 | }
234 | ],
235 | "name": "decreaseAllowance",
236 | "outputs": [
237 | {
238 | "internalType": "bool",
239 | "name": "success",
240 | "type": "bool"
241 | }
242 | ],
243 | "stateMutability": "nonpayable",
244 | "type": "function"
245 | },
246 | {
247 | "inputs": [
248 | {
249 | "internalType": "address",
250 | "name": "",
251 | "type": "address"
252 | }
253 | ],
254 | "name": "hasRequested",
255 | "outputs": [
256 | {
257 | "internalType": "bool",
258 | "name": "",
259 | "type": "bool"
260 | }
261 | ],
262 | "stateMutability": "view",
263 | "type": "function"
264 | },
265 | {
266 | "inputs": [
267 | {
268 | "internalType": "address",
269 | "name": "_spender",
270 | "type": "address"
271 | },
272 | {
273 | "internalType": "uint256",
274 | "name": "_addedValue",
275 | "type": "uint256"
276 | }
277 | ],
278 | "name": "increaseAllowance",
279 | "outputs": [
280 | {
281 | "internalType": "bool",
282 | "name": "success",
283 | "type": "bool"
284 | }
285 | ],
286 | "stateMutability": "nonpayable",
287 | "type": "function"
288 | },
289 | {
290 | "inputs": [
291 | {
292 | "internalType": "address",
293 | "name": "",
294 | "type": "address"
295 | }
296 | ],
297 | "name": "isValidator",
298 | "outputs": [
299 | {
300 | "internalType": "bool",
301 | "name": "",
302 | "type": "bool"
303 | }
304 | ],
305 | "stateMutability": "view",
306 | "type": "function"
307 | },
308 | {
309 | "inputs": [],
310 | "name": "name",
311 | "outputs": [
312 | {
313 | "internalType": "string",
314 | "name": "",
315 | "type": "string"
316 | }
317 | ],
318 | "stateMutability": "view",
319 | "type": "function"
320 | },
321 | {
322 | "inputs": [],
323 | "name": "requestTokens",
324 | "outputs": [],
325 | "stateMutability": "nonpayable",
326 | "type": "function"
327 | },
328 | {
329 | "inputs": [],
330 | "name": "symbol",
331 | "outputs": [
332 | {
333 | "internalType": "string",
334 | "name": "",
335 | "type": "string"
336 | }
337 | ],
338 | "stateMutability": "view",
339 | "type": "function"
340 | },
341 | {
342 | "inputs": [],
343 | "name": "totalSupply",
344 | "outputs": [
345 | {
346 | "internalType": "uint256",
347 | "name": "",
348 | "type": "uint256"
349 | }
350 | ],
351 | "stateMutability": "view",
352 | "type": "function"
353 | },
354 | {
355 | "inputs": [
356 | {
357 | "internalType": "address",
358 | "name": "_to",
359 | "type": "address"
360 | },
361 | {
362 | "internalType": "uint256",
363 | "name": "_value",
364 | "type": "uint256"
365 | }
366 | ],
367 | "name": "transfer",
368 | "outputs": [
369 | {
370 | "internalType": "bool",
371 | "name": "success",
372 | "type": "bool"
373 | }
374 | ],
375 | "stateMutability": "nonpayable",
376 | "type": "function"
377 | },
378 | {
379 | "inputs": [
380 | {
381 | "internalType": "address",
382 | "name": "_from",
383 | "type": "address"
384 | },
385 | {
386 | "internalType": "address",
387 | "name": "_to",
388 | "type": "address"
389 | },
390 | {
391 | "internalType": "uint256",
392 | "name": "_value",
393 | "type": "uint256"
394 | }
395 | ],
396 | "name": "transferFrom",
397 | "outputs": [
398 | {
399 | "internalType": "bool",
400 | "name": "success",
401 | "type": "bool"
402 | }
403 | ],
404 | "stateMutability": "nonpayable",
405 | "type": "function"
406 | },
407 | {
408 | "inputs": [
409 | {
410 | "internalType": "uint256",
411 | "name": "",
412 | "type": "uint256"
413 | }
414 | ],
415 | "name": "validators",
416 | "outputs": [
417 | {
418 | "internalType": "address",
419 | "name": "",
420 | "type": "address"
421 | }
422 | ],
423 | "stateMutability": "view",
424 | "type": "function"
425 | }
426 | ],
427 | "devdoc": {
428 | "kind": "dev",
429 | "methods": {},
430 | "version": 1
431 | },
432 | "userdoc": {
433 | "kind": "user",
434 | "methods": {},
435 | "version": 1
436 | }
437 | },
438 | "settings": {
439 | "compilationTarget": {
440 | "contracts/Tokenn.sol": "Tokenn"
441 | },
442 | "evmVersion": "paris",
443 | "libraries": {},
444 | "metadata": {
445 | "bytecodeHash": "ipfs"
446 | },
447 | "optimizer": {
448 | "enabled": false,
449 | "runs": 200
450 | },
451 | "remappings": []
452 | },
453 | "sources": {
454 | "contracts/Tokenn.sol": {
455 | "keccak256": "0x84b454c3e19742c10ac9f0fbde53d0a99bc6e5d5a641fd63e5b93ac0f2781274",
456 | "license": "MIT",
457 | "urls": [
458 | "bzz-raw://3adf8b56266c3222bac6bef283b11568c10e61df565b52fa3eedfed7f4d155f0",
459 | "dweb:/ipfs/QmYNYPQG8M16U9ywn3GnNeG3nfgZe26Ffqo8EZcL8miwnW"
460 | ]
461 | }
462 | },
463 | "version": 1
464 | }
--------------------------------------------------------------------------------
/assets/adaptive-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/faytey/oracle/e6fb7b3ad2ae9e0fbb60942dff318b3dd3073be8/assets/adaptive-icon.png
--------------------------------------------------------------------------------
/assets/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/faytey/oracle/e6fb7b3ad2ae9e0fbb60942dff318b3dd3073be8/assets/favicon.png
--------------------------------------------------------------------------------
/assets/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/faytey/oracle/e6fb7b3ad2ae9e0fbb60942dff318b3dd3073be8/assets/icon.png
--------------------------------------------------------------------------------
/assets/images/app-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/faytey/oracle/e6fb7b3ad2ae9e0fbb60942dff318b3dd3073be8/assets/images/app-logo.png
--------------------------------------------------------------------------------
/assets/images/computer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/faytey/oracle/e6fb7b3ad2ae9e0fbb60942dff318b3dd3073be8/assets/images/computer.png
--------------------------------------------------------------------------------
/assets/images/decentralized.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/faytey/oracle/e6fb7b3ad2ae9e0fbb60942dff318b3dd3073be8/assets/images/decentralized.png
--------------------------------------------------------------------------------
/assets/images/illus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/faytey/oracle/e6fb7b3ad2ae9e0fbb60942dff318b3dd3073be8/assets/images/illus.png
--------------------------------------------------------------------------------
/assets/images/layer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/faytey/oracle/e6fb7b3ad2ae9e0fbb60942dff318b3dd3073be8/assets/images/layer.png
--------------------------------------------------------------------------------
/assets/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/faytey/oracle/e6fb7b3ad2ae9e0fbb60942dff318b3dd3073be8/assets/images/logo.png
--------------------------------------------------------------------------------
/assets/images/logo.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/assets/images/logo_s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/faytey/oracle/e6fb7b3ad2ae9e0fbb60942dff318b3dd3073be8/assets/images/logo_s.png
--------------------------------------------------------------------------------
/assets/images/mobile-first.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/faytey/oracle/e6fb7b3ad2ae9e0fbb60942dff318b3dd3073be8/assets/images/mobile-first.png
--------------------------------------------------------------------------------
/assets/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/faytey/oracle/e6fb7b3ad2ae9e0fbb60942dff318b3dd3073be8/assets/splash.png
--------------------------------------------------------------------------------
/assets/splash1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/faytey/oracle/e6fb7b3ad2ae9e0fbb60942dff318b3dd3073be8/assets/splash1.png
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = function(api) {
2 | api.cache(true);
3 | return {
4 | presets: ['babel-preset-expo'],
5 | };
6 | };
7 |
--------------------------------------------------------------------------------
/chainz/web3.js:
--------------------------------------------------------------------------------
1 | var Tx = require('ethereumjs-tx');
2 | var Web3 = require('web3')
3 | var web3 = new Web3('https://bsc-dataseed1.binance.org');
4 |
5 |
6 | // f1c1bdd9ed0880bc132cccd7bbe09cbbda227fa08e72fb000988e233c1b29eb4
7 | const sender = '0xd99b7e930Ad611fC5EF27fa01987aE0469C09D56';
8 | // const receiver = '0x58933e70c0449fa2a9af784c100048e8142b816f'; // Bundle Bep20 Busd address
9 | const receiver = '0x0af4e05b88ebb40916883a3b173839fea688032c'; // Binance Bep20 Usdt address
10 |
11 | // var contractAddress = "0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56"; // BUSD Bep20 ContractAddress
12 | var contractAddress = "0x55d398326f99059fF775485246999027B3197955"; // USDT Bep20 ContractAddress
13 |
14 | var abi = [
15 | {
16 | constant: true,
17 | inputs: [],
18 | name: "name",
19 | outputs: [{ name: "", type: "string" }],
20 | payable: false,
21 | stateMutability: "view",
22 | type: "function",
23 | },
24 | {
25 | constant: false,
26 | inputs: [{ name: "_upgradedAddress", type: "address" }],
27 | name: "deprecate",
28 | outputs: [],
29 | payable: false,
30 | stateMutability: "nonpayable",
31 | type: "function",
32 | },
33 | {
34 | constant: false,
35 | inputs: [
36 | { name: "_spender", type: "address" },
37 | { name: "_value", type: "uint256" },
38 | ],
39 | name: "approve",
40 | outputs: [],
41 | payable: false,
42 | stateMutability: "nonpayable",
43 | type: "function",
44 | },
45 | {
46 | constant: true,
47 | inputs: [],
48 | name: "deprecated",
49 | outputs: [{ name: "", type: "bool" }],
50 | payable: false,
51 | stateMutability: "view",
52 | type: "function",
53 | },
54 | {
55 | constant: false,
56 | inputs: [{ name: "_evilUser", type: "address" }],
57 | name: "addBlackList",
58 | outputs: [],
59 | payable: false,
60 | stateMutability: "nonpayable",
61 | type: "function",
62 | },
63 | {
64 | constant: true,
65 | inputs: [],
66 | name: "totalSupply",
67 | outputs: [{ name: "", type: "uint256" }],
68 | payable: false,
69 | stateMutability: "view",
70 | type: "function",
71 | },
72 | {
73 | constant: false,
74 | inputs: [
75 | { name: "_from", type: "address" },
76 | { name: "_to", type: "address" },
77 | { name: "_value", type: "uint256" },
78 | ],
79 | name: "transferFrom",
80 | outputs: [],
81 | payable: false,
82 | stateMutability: "nonpayable",
83 | type: "function",
84 | },
85 | {
86 | constant: true,
87 | inputs: [],
88 | name: "upgradedAddress",
89 | outputs: [{ name: "", type: "address" }],
90 | payable: false,
91 | stateMutability: "view",
92 | type: "function",
93 | },
94 | {
95 | constant: true,
96 | inputs: [{ name: "", type: "address" }],
97 | name: "balances",
98 | outputs: [{ name: "", type: "uint256" }],
99 | payable: false,
100 | stateMutability: "view",
101 | type: "function",
102 | },
103 | {
104 | constant: true,
105 | inputs: [],
106 | name: "decimals",
107 | outputs: [{ name: "", type: "uint256" }],
108 | payable: false,
109 | stateMutability: "view",
110 | type: "function",
111 | },
112 | {
113 | constant: true,
114 | inputs: [],
115 | name: "maximumFee",
116 | outputs: [{ name: "", type: "uint256" }],
117 | payable: false,
118 | stateMutability: "view",
119 | type: "function",
120 | },
121 | {
122 | constant: true,
123 | inputs: [],
124 | name: "_totalSupply",
125 | outputs: [{ name: "", type: "uint256" }],
126 | payable: false,
127 | stateMutability: "view",
128 | type: "function",
129 | },
130 | {
131 | constant: false,
132 | inputs: [],
133 | name: "unpause",
134 | outputs: [],
135 | payable: false,
136 | stateMutability: "nonpayable",
137 | type: "function",
138 | },
139 | {
140 | constant: true,
141 | inputs: [{ name: "_maker", type: "address" }],
142 | name: "getBlackListStatus",
143 | outputs: [{ name: "", type: "bool" }],
144 | payable: false,
145 | stateMutability: "view",
146 | type: "function",
147 | },
148 | {
149 | constant: true,
150 | inputs: [
151 | { name: "", type: "address" },
152 | { name: "", type: "address" },
153 | ],
154 | name: "allowed",
155 | outputs: [{ name: "", type: "uint256" }],
156 | payable: false,
157 | stateMutability: "view",
158 | type: "function",
159 | },
160 | {
161 | constant: true,
162 | inputs: [],
163 | name: "paused",
164 | outputs: [{ name: "", type: "bool" }],
165 | payable: false,
166 | stateMutability: "view",
167 | type: "function",
168 | },
169 | {
170 | constant: true,
171 | inputs: [{ name: "who", type: "address" }],
172 | name: "balanceOf",
173 | outputs: [{ name: "", type: "uint256" }],
174 | payable: false,
175 | stateMutability: "view",
176 | type: "function",
177 | },
178 | {
179 | constant: false,
180 | inputs: [],
181 | name: "pause",
182 | outputs: [],
183 | payable: false,
184 | stateMutability: "nonpayable",
185 | type: "function",
186 | },
187 | {
188 | constant: true,
189 | inputs: [],
190 | name: "getOwner",
191 | outputs: [{ name: "", type: "address" }],
192 | payable: false,
193 | stateMutability: "view",
194 | type: "function",
195 | },
196 | {
197 | constant: true,
198 | inputs: [],
199 | name: "owner",
200 | outputs: [{ name: "", type: "address" }],
201 | payable: false,
202 | stateMutability: "view",
203 | type: "function",
204 | },
205 | {
206 | constant: true,
207 | inputs: [],
208 | name: "symbol",
209 | outputs: [{ name: "", type: "string" }],
210 | payable: false,
211 | stateMutability: "view",
212 | type: "function",
213 | },
214 | {
215 | constant: false,
216 | inputs: [
217 | { name: "_to", type: "address" },
218 | { name: "_value", type: "uint256" },
219 | ],
220 | name: "transfer",
221 | outputs: [],
222 | payable: false,
223 | stateMutability: "nonpayable",
224 | type: "function",
225 | },
226 | {
227 | constant: false,
228 | inputs: [
229 | { name: "newBasisPoints", type: "uint256" },
230 | { name: "newMaxFee", type: "uint256" },
231 | ],
232 | name: "setParams",
233 | outputs: [],
234 | payable: false,
235 | stateMutability: "nonpayable",
236 | type: "function",
237 | },
238 | {
239 | constant: false,
240 | inputs: [{ name: "amount", type: "uint256" }],
241 | name: "issue",
242 | outputs: [],
243 | payable: false,
244 | stateMutability: "nonpayable",
245 | type: "function",
246 | },
247 | {
248 | constant: false,
249 | inputs: [{ name: "amount", type: "uint256" }],
250 | name: "redeem",
251 | outputs: [],
252 | payable: false,
253 | stateMutability: "nonpayable",
254 | type: "function",
255 | },
256 | {
257 | constant: true,
258 | inputs: [
259 | { name: "_owner", type: "address" },
260 | { name: "_spender", type: "address" },
261 | ],
262 | name: "allowance",
263 | outputs: [{ name: "remaining", type: "uint256" }],
264 | payable: false,
265 | stateMutability: "view",
266 | type: "function",
267 | },
268 | {
269 | constant: true,
270 | inputs: [],
271 | name: "basisPointsRate",
272 | outputs: [{ name: "", type: "uint256" }],
273 | payable: false,
274 | stateMutability: "view",
275 | type: "function",
276 | },
277 | {
278 | constant: true,
279 | inputs: [{ name: "", type: "address" }],
280 | name: "isBlackListed",
281 | outputs: [{ name: "", type: "bool" }],
282 | payable: false,
283 | stateMutability: "view",
284 | type: "function",
285 | },
286 | {
287 | constant: false,
288 | inputs: [{ name: "_clearedUser", type: "address" }],
289 | name: "removeBlackList",
290 | outputs: [],
291 | payable: false,
292 | stateMutability: "nonpayable",
293 | type: "function",
294 | },
295 | {
296 | constant: true,
297 | inputs: [],
298 | name: "MAX_UINT",
299 | outputs: [{ name: "", type: "uint256" }],
300 | payable: false,
301 | stateMutability: "view",
302 | type: "function",
303 | },
304 | {
305 | constant: false,
306 | inputs: [{ name: "newOwner", type: "address" }],
307 | name: "transferOwnership",
308 | outputs: [],
309 | payable: false,
310 | stateMutability: "nonpayable",
311 | type: "function",
312 | },
313 | {
314 | constant: false,
315 | inputs: [{ name: "_blackListedUser", type: "address" }],
316 | name: "destroyBlackFunds",
317 | outputs: [],
318 | payable: false,
319 | stateMutability: "nonpayable",
320 | type: "function",
321 | },
322 | {
323 | inputs: [
324 | { name: "_initialSupply", type: "uint256" },
325 | { name: "_name", type: "string" },
326 | { name: "_symbol", type: "string" },
327 | { name: "_decimals", type: "uint256" },
328 | ],
329 | payable: false,
330 | stateMutability: "nonpayable",
331 | type: "constructor",
332 | },
333 | {
334 | anonymous: false,
335 | inputs: [{ indexed: false, name: "amount", type: "uint256" }],
336 | name: "Issue",
337 | type: "event",
338 | },
339 | {
340 | anonymous: false,
341 | inputs: [{ indexed: false, name: "amount", type: "uint256" }],
342 | name: "Redeem",
343 | type: "event",
344 | },
345 | {
346 | anonymous: false,
347 | inputs: [{ indexed: false, name: "newAddress", type: "address" }],
348 | name: "Deprecate",
349 | type: "event",
350 | },
351 | {
352 | anonymous: false,
353 | inputs: [
354 | { indexed: false, name: "feeBasisPoints", type: "uint256" },
355 | { indexed: false, name: "maxFee", type: "uint256" },
356 | ],
357 | name: "Params",
358 | type: "event",
359 | },
360 | {
361 | anonymous: false,
362 | inputs: [
363 | { indexed: false, name: "_blackListedUser", type: "address" },
364 | { indexed: false, name: "_balance", type: "uint256" },
365 | ],
366 | name: "DestroyedBlackFunds",
367 | type: "event",
368 | },
369 | {
370 | anonymous: false,
371 | inputs: [{ indexed: false, name: "_user", type: "address" }],
372 | name: "AddedBlackList",
373 | type: "event",
374 | },
375 | {
376 | anonymous: false,
377 | inputs: [{ indexed: false, name: "_user", type: "address" }],
378 | name: "RemovedBlackList",
379 | type: "event",
380 | },
381 | {
382 | anonymous: false,
383 | inputs: [
384 | { indexed: true, name: "owner", type: "address" },
385 | { indexed: true, name: "spender", type: "address" },
386 | { indexed: false, name: "value", type: "uint256" },
387 | ],
388 | name: "Approval",
389 | type: "event",
390 | },
391 | {
392 | anonymous: false,
393 | inputs: [
394 | { indexed: true, name: "from", type: "address" },
395 | { indexed: true, name: "to", type: "address" },
396 | { indexed: false, name: "value", type: "uint256" },
397 | ],
398 | name: "Transfer",
399 | type: "event",
400 | },
401 | { anonymous: false, inputs: [], name: "Pause", type: "event" },
402 | { anonymous: false, inputs: [], name: "Unpause", type: "event" },
403 | ];
404 |
405 | var contract = new web3.eth.Contract(abi, contractAddress);
406 | contract.methods.balanceOf(sender).call((err, result) => {
407 | let bal = web3.utils.fromWei(result, "ether");
408 |
409 | // console.log('BUSD : ', bal)
410 |
411 | contract.methods.name().call((err, tokenName) => {
412 | console.log(`${tokenName} : ${bal}`);
413 | })
414 |
415 | });
416 |
417 |
418 | const main = async () => {
419 | // This code was written and tested using web3 version 1.0.0-beta.26
420 | console.log(`web3 version: ${web3.version}`)
421 |
422 | // Who holds the token now?
423 | var myAddress = "0xd99b7e930Ad611fC5EF27fa01987aE0469C09D56";
424 |
425 | // Who are we trying to send this token to?
426 | var destAddress = "0x58933e70c0449fa2a9af784c100048e8142b816f";
427 |
428 | // If your token is divisible to 8 decimal places, 42 = 0.00000042 of your token
429 | // var transferAmount = 1;
430 | var transferAmount = 20;
431 |
432 | // Determine the nonce
433 | var count = await web3.eth.getTransactionCount(myAddress);
434 | console.log(`num transactions so far: ${count}`);
435 |
436 | // This file is just JSON stolen from the contract page on etherscan.io under "Contract ABI"
437 | // var abiArray = JSON.parse(fs.readFileSync(path.resolve(__dirname, './tt3.json'), 'utf-8'));
438 |
439 | // This is the address of the contract which created the ERC20 token
440 | // var contractAddress = "0xe6...";
441 | var contract = new web3.eth.Contract(abi, contractAddress, { from: myAddress });
442 |
443 | // How many tokens do I have before sending?
444 | var balance = await contract.methods.balanceOf(myAddress).call();
445 | console.log(`Balance before send: ${balance}`);
446 |
447 | // I chose gas price and gas limit based on what ethereum wallet was recommending for a similar transaction. You may need to change the gas price!
448 | var rawTransaction = {
449 | "from": myAddress,
450 | "nonce": "0x" + count.toString(16),
451 | "gasPrice": "0x003B9ACA00",
452 | "gasLimit": "0x250CA",
453 | "to": contractAddress,
454 | "value": "0x0",
455 | "data": contract.methods.transfer(destAddress, transferAmount).encodeABI(),
456 | "chainId": 0x01
457 | };
458 |
459 | // Example private key (do not use): 'e331b6d69882b4cb4ea581d88e0b604039a3de5967688d3dcffdd2270c0fd109'
460 | // The private key must be for myAddress
461 | var privKey = new Buffer.from('', 'hex');
462 | var tx = new Tx(rawTransaction);
463 | tx.sign(privKey);
464 | var serializedTx = tx.serialize();
465 |
466 | // Comment out these three lines if you don't really want to send the TX right now
467 | console.log(`Attempting to send signed tx: ${serializedTx.toString('hex')}`);
468 | var receipt = await web3.eth.sendSignedTransaction('0x' + serializedTx.toString('hex'));
469 | console.log(`Receipt info: ${JSON.stringify(receipt, null, '\t')}`);
470 |
471 | // The balance may not be updated yet, but let's check
472 | balance = await contract.methods.balanceOf(myAddress).call();
473 | console.log(`Balance after send: ${balance}`);
474 | }
475 |
476 | // main();
477 |
478 | const secondMain = async () => {
479 |
480 | // const contractAddress = '0x000000'; //Yor token contract address
481 | const privateKey = ''; //The private key of your contract Owner
482 | const ownerAddress = '0xd99b7e930Ad611fC5EF27fa01987aE0469C09D56';
483 | const toAddress = '0x58933e70c0449fa2a9af784c100048e8142b816f'; //The address to transfer the tokens
484 | // const value = 15;
485 | const value = web3.utils.toWei('15.9', 'ether');
486 |
487 | //creating Contract Object
488 | var contract = new web3.eth.Contract(abi, contractAddress, { from: ownerAddress });
489 |
490 | var data = contract.methods.transfer(toAddress, value).encodeABI(); // Create the data for token transaction.
491 | var rawTransaction = { "to": contractAddress, "gas": 100000, "data": data };
492 |
493 | web3.eth.accounts.signTransaction(rawTransaction, privateKey)
494 | .then(signedTx => web3.eth.sendSignedTransaction(signedTx.rawTransaction))
495 | .then(function (receipt) { console.log("Transaction receipt: ", receipt); getETHBalanceOf(); })
496 | .then(req => {
497 | /* The trx was done. Write your acctions here. For example getBalance */
498 | getTOKENBalanceOf(toAddress).then(balance => { console.log(toAddress + " Token Balance: " + balance); })
499 | .catch((err) => console.log(err));
500 | return true;
501 | })
502 |
503 |
504 | //GET TOKEN BALANCE FUNCTION ////////////////////////////////
505 | async function getTOKENBalanceOf(address) {
506 | return await contract.methods.balanceOf(address).call();
507 | }
508 | }
509 |
510 | // secondMain()
511 |
512 |
513 | // web3.eth.getBalance(sender, (err, bal)=>{
514 | // console.log('BNB : ', web3.utils.fromWei(bal, 'ether'))
515 | // })
--------------------------------------------------------------------------------
/components/CreateWalletScreen.js:
--------------------------------------------------------------------------------
1 | import { Ionicons } from "@expo/vector-icons";
2 | import { FontAwesome } from "@expo/vector-icons";
3 | import { MaterialIcons } from "@expo/vector-icons";
4 | import { border } from "@shopify/restyle";
5 | import { View, StyleSheet, SafeAreaView, Image, Pressable, Text, ScrollView } from "react-native";
6 | import { Color } from "../constant/Color";
7 | // import { useNavigation } from "@react-navigation/native";
8 |
9 | function CreateWalletScreen({ navigation }) {
10 |
11 | // const navigation = useNavigation();
12 |
13 | function nextHandler() {
14 | navigation.navigate('Dashboard');
15 | }
16 |
17 | return (
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | Become one of the amazing validators on the network to start earning.
28 |
29 |
30 |
31 |
32 |
33 | pressed && styles.pressed, styles.walletButton]}>
34 |
35 | Create Node ID
36 |
37 |
38 |
39 |
40 | pressed && styles.pressed, styles.importButton]}>
41 |
42 | Import Existing ID
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | )
52 | }
53 |
54 | export default CreateWalletScreen;
55 |
56 | const styles = StyleSheet.create({
57 | pressed: {
58 | opacity: 0.7
59 |
60 | },
61 | walletButton: {
62 | backgroundColor: '#FFC000',
63 | padding: 10,
64 | borderRadius: 25,
65 | marginVertical: 5,
66 | marginTop: 90,
67 | },
68 |
69 | importButton: {
70 | backgroundColor: Color.bg,
71 | padding: 10,
72 | borderRadius: 25,
73 | marginVertical: 20,
74 | borderColor: 'white',
75 | borderWidth: 1,
76 |
77 | },
78 |
79 | buttonHolder: {
80 | marginVertical: 100,
81 | marginHorizontal: 20,
82 | justifyContent: 'space-around',
83 |
84 | },
85 | swiperTextHolder: {
86 | marginHorizontal: 10,
87 | },
88 | description: {
89 | color: 'white',
90 | marginTop: 10,
91 | fontSize: 36,
92 | fontWeight: 700,
93 | },
94 |
95 | logo: {
96 | marginVertical: 90,
97 | alignItems: 'center',
98 | justifyContent: 'center',
99 | },
100 |
101 | container: {
102 | flex: 1,
103 | backgroundColor: Color.bg
104 | },
105 |
106 | });
107 |
108 |
--------------------------------------------------------------------------------
/components/HomeScreen.js:
--------------------------------------------------------------------------------
1 | import { StatusBar } from 'expo-status-bar';
2 | import { StyleSheet, Text, View } from 'react-native';
3 | import { Color } from '../constant/Color';
4 |
5 | export default function App() {
6 | return (
7 |
8 | This is react native expo
9 |
10 | );
11 | }
12 |
13 | const styles = StyleSheet.create({
14 | container: {
15 | flex: 1,
16 | backgroundColor: Color.bg,
17 | },
18 | });
--------------------------------------------------------------------------------
/components/SplashScreen.js:
--------------------------------------------------------------------------------
1 | import { StatusBar } from 'expo-status-bar';
2 | import React, { useEffect } from 'react';
3 | import { Image, SafeAreaView, StyleSheet, View } from 'react-native';
4 | import { Color } from '../constant/Color';
5 |
6 |
7 | const SplashScreen = ({ navigation }) => {
8 |
9 | useEffect(() => {
10 | setTimeout(() => {
11 | navigation.navigate('Home');
12 | }, 3000);
13 | }, [])
14 |
15 | return (
16 | <>
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | >
29 | );
30 | };
31 | export default SplashScreen;
32 |
33 | const styles = StyleSheet.create({
34 | rootContainer: {
35 | backgroundColor: Color.bg,
36 | flex: 1,
37 | },
38 | nodeImage: {
39 | marginTop: 60,
40 | justifyContent: 'center',
41 | alignItems: 'center',
42 | },
43 | logoImage: {
44 | marginTop: 80,
45 | alignItems: 'center',
46 | justifyContent: 'center',
47 |
48 | },
49 | splash: {
50 | flex: 1,
51 | resizeMode: 'cover',
52 | width: '100%',
53 | height: '100%',
54 | },
55 | });
56 |
57 |
--------------------------------------------------------------------------------
/constant/Color.js:
--------------------------------------------------------------------------------
1 | export const Color = {
2 | bg: '#111432',
3 | }
--------------------------------------------------------------------------------
/contracts/Bridge.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: UNLICENSED
2 | pragma solidity ^0.8.15;
3 |
4 | import {IConnext} from "@connext/interfaces/core/IConnext.sol";
5 | import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
6 | import {Hardora} from "./Hardora.sol";
7 |
8 | // interface IWETH {
9 | // function deposit() external payable;
10 | // function approve(address guy, uint wad) external returns (bool);
11 | // }
12 |
13 | /**
14 | * @title SimpleBridge
15 | * @notice Example of a cross-domain token transfer.
16 | */
17 | contract SimpleBridge {
18 | // The connext contract on the origin domain
19 | IConnext public immutable connext;
20 |
21 | constructor(address _connext) {
22 | connext = IConnext(_connext);
23 | }
24 |
25 | /**
26 | * @notice Transfers non-native assets from one chain to another.
27 | * @dev User should approve a spending allowance before calling this.
28 | * @param token Address of the token on this domain.
29 | * @param amount The amount to transfer.
30 | * @param recipient The destination address (e.g. a wallet).
31 | * @param destinationDomain The destination domain ID.
32 | * @param slippage The maximum amount of slippage the user will accept in BPS.
33 | * @param relayerFee The fee offered to relayers.
34 | */
35 | function xTransfer(
36 | address token,
37 | uint256 amount,
38 | address recipient,
39 | uint32 destinationDomain,
40 | uint256 slippage,
41 | uint256 relayerFee
42 | ) external payable {
43 | ERC20 _token = ERC20(token);
44 |
45 | require(
46 | _token.allowance(msg.sender, address(this)) >= amount,
47 | "User must approve amount"
48 | );
49 |
50 | // User sends funds to this contract
51 | _token.transferFrom(msg.sender, address(this), amount);
52 |
53 | // This contract approves transfer to Connext
54 | _token.approve(address(connext), amount);
55 |
56 | connext.xcall{value: relayerFee}(
57 | destinationDomain, // _destination: Domain ID of the destination chain
58 | recipient, // _to: address receiving the funds on the destination
59 | token, // _asset: address of the token contract
60 | msg.sender, // _delegate: address that can revert or forceLocal on destination
61 | amount, // _amount: amount of tokens to transfer
62 | slippage, // _slippage: the maximum amount of slippage the user will accept in BPS (e.g. 30 = 0.3%)
63 | bytes("") // _callData: empty bytes because we're only sending funds
64 | );
65 | }
66 |
67 | /**
68 | * @notice Transfers native assets from one chain to another.
69 | * @param destinationUnwrapper Address of the Unwrapper contract on destination.
70 | * @param weth Address of the WETH contract on this domain.
71 | * @param amount The amount to transfer.
72 | * @param recipient The destination address (e.g. a wallet).
73 | * @param destinationDomain The destination domain ID.
74 | * @param slippage The maximum amount of slippage the user will accept in BPS.
75 | * @param relayerFee The fee offered to relayers.
76 | */
77 | // function xTransferEth(
78 | // address destinationUnwrapper,
79 | // address weth,
80 | // uint256 amount,
81 | // address recipient,
82 | // uint32 destinationDomain,
83 | // uint256 slippage,
84 | // uint256 relayerFee
85 | // ) external payable {
86 | // // Wrap ETH into WETH to send with the xcall
87 | // IWETH(weth).deposit{value: amount}();
88 |
89 | // // This contract approves transfer to Connext
90 | // IWETH(weth).approve(address(connext), amount);
91 |
92 | // // Encode the recipient address for calldata
93 | // bytes memory callData = abi.encode(recipient);
94 |
95 | // // xcall the Unwrapper contract to unwrap WETH into ETH on destination
96 | // connext.xcall{value: relayerFee}(
97 | // destinationDomain, // _destination: Domain ID of the destination chain
98 | // destinationUnwrapper, // _to: Unwrapper contract
99 | // weth, // _asset: address of the WETH contract
100 | // msg.sender, // _delegate: address that can revert or forceLocal on destination
101 | // amount, // _amount: amount of tokens to transfer
102 | // slippage, // _slippage: the maximum amount of slippage the user will accept in BPS (e.g. 30 = 0.3%)
103 | // callData // _callData: calldata with encoded recipient address
104 | // );
105 | // }
106 | }
--------------------------------------------------------------------------------
/contracts/DemoApp.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity ^0.8.0;
3 |
4 | contract DemoApp {
5 | mapping(address => bool) public trustedDevices;
6 | mapping(bytes32 => uint256) public sessionData;
7 | mapping(uint256 => address) public requests;
8 |
9 | event DataRequested(uint256 requestId);
10 | event DataReceived(uint256 requestId, bytes data, bytes credentials);
11 | event RequestData(address indexed user, bytes32 indexed sessionId);
12 | event DataVerified(bytes32 indexed sessionId, bool verified);
13 |
14 | // Functions
15 |
16 | // Function to generate a random number using block.timestamp and a salt
17 | function generateRandomNumber(uint256 salt) public view returns (uint256) {
18 | return uint256(keccak256(abi.encodePacked(block.timestamp, salt)));
19 | }
20 |
21 | function requestData() public {
22 | uint256 requestId = uint256(
23 | keccak256(abi.encodePacked(msg.sender, block.timestamp))
24 | );
25 | requests[requestId] = msg.sender;
26 | emit DataRequested(requestId);
27 | }
28 |
29 | function receiveData(
30 | uint256 requestId,
31 | bytes calldata data,
32 | bytes calldata credentials
33 | ) public {
34 | require(requests[requestId] == msg.sender, "Invalid sender");
35 | emit DataReceived(requestId, data, credentials);
36 | }
37 |
38 | function verifyUserData(bytes32 sessionId, bool verified) public {
39 | require(
40 | trustedDevices[msg.sender],
41 | "Only trusted devices can verify data"
42 | );
43 | sessionData[sessionId] = verified ? 1 : 0;
44 | emit DataVerified(sessionId, verified);
45 | }
46 |
47 | // Function to handle requests for data verification
48 | function requestDataVerification(bytes32 sessionId) public {
49 | emit RequestData(msg.sender, sessionId);
50 | }
51 |
52 | // Function to handle location-based sensor data and validate it
53 | function handleSensorData(
54 | uint256 lat,
55 | uint256 long
56 | ) public pure returns (bool) {
57 | // Perform some validation on the sensor data
58 | return (lat != 0 && long != 0);
59 | }
60 |
61 | // Function to store session data
62 | function storeSessionData(bytes32 sessionId, uint256 data) public {
63 | sessionData[sessionId] = data;
64 | }
65 |
66 | function addTrustedDevice(address device) public {
67 | trustedDevices[device] = true;
68 | }
69 | }
70 |
71 | // Function to handle trusted devices information
72 |
--------------------------------------------------------------------------------
/contracts/Hardora.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity ^0.8.0;
3 |
4 | import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
5 |
6 | contract Hardora is ERC20 {
7 | address connext;
8 | string public namee;
9 | string public symboll;
10 | uint8 public decimalss;
11 | uint256 public totalSupplyy;
12 | mapping(address => uint256) public balanceOff;
13 | mapping(address => mapping(address => uint256)) public allowancee;
14 | mapping(address => bool) public isValidator;
15 | mapping(address => bool) public hasRequested;
16 | address[] public validators;
17 | event Transferr(address indexed from, address indexed to, uint256 value);
18 | event Approvall(
19 | address indexed owner,
20 | address indexed spender,
21 | uint256 value
22 | );
23 | event ValidatorAdded(address indexed validator);
24 | event Requested(address indexed validator);
25 |
26 | constructor(
27 | string memory _namee,
28 | string memory _symboll,
29 | uint8 _decimalss,
30 | uint256 _totalSupplyy,
31 | address _connext
32 | ) ERC20("Hardora", "HAR") {
33 | namee = _namee;
34 | symboll = _symboll;
35 | decimalss = _decimalss;
36 | totalSupplyy = _totalSupplyy * 10 ** decimalss;
37 | balanceOff[msg.sender] = totalSupplyy;
38 | connext = _connext;
39 | }
40 |
41 | function addValidator(address _validator) public {
42 | require(!isValidator[_validator], "Validator already exists.");
43 | isValidator[_validator] = true;
44 | validators.push(_validator);
45 | emit ValidatorAdded(_validator);
46 | }
47 |
48 | function requestTokens() public {
49 | require(isValidator[msg.sender], "Only validators can request tokens.");
50 | require(!hasRequested[msg.sender], "Tokens already requested.");
51 |
52 | hasRequested[msg.sender] = true;
53 | uint256 tokenAmount = totalSupplyy / validators.length;
54 | balanceOff[msg.sender] += tokenAmount;
55 | emit Transferr(address(this), msg.sender, tokenAmount);
56 | emit Requested(msg.sender);
57 | }
58 |
59 | function transferr(
60 | address _to,
61 | uint256 _value
62 | ) public returns (bool success) {
63 | require(balanceOff[msg.sender] >= _value, "Not enough balance.");
64 | balanceOff[msg.sender] -= _value;
65 | balanceOff[_to] += _value;
66 | emit Transferr(msg.sender, _to, _value);
67 | return true;
68 | }
69 |
70 | function approvee(
71 | address _spender,
72 | uint256 _value
73 | ) public returns (bool success) {
74 | allowancee[msg.sender][_spender] = _value;
75 | emit Approvall(msg.sender, _spender, _value);
76 | return true;
77 | }
78 |
79 | function transferFromm(
80 | address _from,
81 | address _to,
82 | uint256 _value
83 | ) public returns (bool success) {
84 | require(balanceOff[_from] >= _value, "Not enough balance.");
85 | require(
86 | allowancee[_from][msg.sender] >= _value,
87 | "Not enough allowancee."
88 | );
89 | balanceOff[_from] -= _value;
90 | balanceOff[_to] += _value;
91 | allowancee[_from][msg.sender] -= _value;
92 | emit Transferr(_from, _to, _value);
93 | return true;
94 | }
95 |
96 | function increaseallowanceee(
97 | address _spender,
98 | uint256 _addedValue
99 | ) public returns (bool success) {
100 | allowancee[msg.sender][_spender] += _addedValue;
101 | emit Approvall(msg.sender, _spender, allowancee[msg.sender][_spender]);
102 | return true;
103 | }
104 |
105 | function decreaseallowancee(
106 | address _spender,
107 | uint256 _subtractedValue
108 | ) public returns (bool success) {
109 | uint256 oldValue = allowancee[msg.sender][_spender];
110 | if (_subtractedValue >= oldValue) {
111 | allowancee[msg.sender][_spender] = 0;
112 | } else {
113 | allowancee[msg.sender][_spender] = oldValue - _subtractedValue;
114 | }
115 | emit Approvall(msg.sender, _spender, allowancee[msg.sender][_spender]);
116 | return true;
117 | }
118 |
119 | function mint(address to, uint256 amount) public {
120 | require(msg.sender == connext);
121 | _mint(to, amount);
122 | }
123 |
124 | function burn(address from, uint256 amount) public {
125 | require(msg.sender == connext);
126 | _burn(from, amount);
127 | }
128 | }
129 |
--------------------------------------------------------------------------------
/contracts/Oracle.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity ^0.8.0;
3 |
4 | contract Oracle {
5 | address public owner;
6 | uint256 public currentSessionId;
7 | uint256 public oracleResponse;
8 |
9 | struct Session {
10 | address userAddress;
11 | address deviceAddress;
12 | string data;
13 | bytes32 requestId;
14 | }
15 |
16 | struct UserInfo {
17 | string name;
18 | string email;
19 | }
20 |
21 | struct DeviceInfo {
22 | string deviceType;
23 | }
24 |
25 | mapping(address => UserInfo) public userInformation;
26 | mapping(address => DeviceInfo) public trustedDeviceInfo;
27 | mapping(uint256 => Session) public sessionData;
28 |
29 | constructor() {
30 | owner = msg.sender;
31 | currentSessionId = 0;
32 | }
33 |
34 | modifier onlyOwner() {
35 | require(
36 | msg.sender == owner,
37 | "Only the contract owner can call this function."
38 | );
39 | _;
40 | }
41 | modifier onlyTrustedDevice() {
42 | require(
43 | bytes(trustedDeviceInfo[msg.sender].deviceType).length != 0,
44 | "Only trusted devices can call this function."
45 | );
46 | _;
47 | }
48 |
49 | function addUserInformation(
50 | string memory _name,
51 | string memory _email
52 | ) public {
53 | userInformation[msg.sender].name = _name;
54 | userInformation[msg.sender].email = _email;
55 | }
56 |
57 | function addTrustedDeviceInfo(string memory _deviceType) public {
58 | trustedDeviceInfo[msg.sender].deviceType = _deviceType;
59 | }
60 |
61 | function storeSessionData(
62 | address _userAddress,
63 | address _deviceAddress,
64 | string memory _data,
65 | bytes32 _requestId
66 | ) public onlyOwner {
67 | sessionData[currentSessionId].userAddress = _userAddress;
68 | sessionData[currentSessionId].deviceAddress = _deviceAddress;
69 | sessionData[currentSessionId].data = _data;
70 | sessionData[currentSessionId].requestId = _requestId;
71 | currentSessionId++;
72 | }
73 |
74 | function validateDataRequestAndOracleResponse(
75 | uint256 _sessionId,
76 | uint256 _response
77 | ) private view returns (bool) {
78 | // Check that the session exists
79 | require(_sessionId < currentSessionId, "Session does not exist.");
80 | // Check that the oracle response matches the data request
81 | require(
82 | sessionData[_sessionId].requestId == bytes32(_response),
83 | "Invalid oracle response."
84 | );
85 | return true;
86 | }
87 |
88 | function fulfill(uint256 _sessionId, uint256 _response) public onlyOwner {
89 | // Validate the data request and oracle response
90 | require(
91 | validateDataRequestAndOracleResponse(_sessionId, _response),
92 | "Invalid data request or oracle response."
93 | );
94 | // Store the session data
95 | storeSessionData(
96 | sessionData[_sessionId].userAddress,
97 | sessionData[_sessionId].deviceAddress,
98 | sessionData[_sessionId].data,
99 | sessionData[_sessionId].requestId
100 | );
101 | // Store the oracle response
102 | oracleResponse = _response;
103 | }
104 |
105 | function requestDataFromDevice() public onlyTrustedDevice {
106 | string memory data = "Sample data from trusted device.";
107 | bytes32 requestId = keccak256(
108 | abi.encodePacked(block.timestamp, msg.sender, data)
109 | );
110 | sessionData[currentSessionId].deviceAddress = msg.sender;
111 | sessionData[currentSessionId].requestId = requestId;
112 | sessionData[currentSessionId].data = data;
113 | currentSessionId++;
114 | }
115 |
116 | function getSessionData(
117 | uint256 _sessionId
118 | ) public view returns (address, address, string memory, bytes32) {
119 | require(_sessionId < currentSessionId, "Session does not exist.");
120 | Session memory session = sessionData[_sessionId];
121 | return (
122 | session.userAddress,
123 | session.deviceAddress,
124 | session.data,
125 | session.requestId
126 | );
127 | }
128 |
129 | function getOracleResponse() public view returns (uint256) {
130 | return oracleResponse;
131 | }
132 |
133 | function getUserInformation()
134 | public
135 | view
136 | returns (string memory, string memory)
137 | {
138 | return (
139 | userInformation[msg.sender].name,
140 | userInformation[msg.sender].email
141 | );
142 | }
143 |
144 | function getTrustedDeviceInfo() public view returns (string memory) {
145 | return trustedDeviceInfo[msg.sender].deviceType;
146 | }
147 | }
148 |
--------------------------------------------------------------------------------
/contracts/Random.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity ^0.8.0;
3 |
4 | contract RandomNumberGenerator {
5 |
6 |
7 | function generateRandomNumber() external view returns (uint256) {
8 | uint256 randomNumber = uint256(keccak256(abi.encodePacked(block.timestamp, msg.sender)));
9 | return randomNumber;
10 | }
11 |
12 | }
--------------------------------------------------------------------------------
/contracts/scenario.json:
--------------------------------------------------------------------------------
1 | {
2 | "accounts": {
3 | "account{0}": "0x9f765ac659C20B4586490d72A7866B7F69B2be98"
4 | },
5 | "linkReferences": {},
6 | "transactions": [
7 | {
8 | "timestamp": 1679573769327,
9 | "record": {
10 | "value": "0",
11 | "inputs": "(string,string,uint8,uint256)",
12 | "parameters": [
13 | "Hardora",
14 | " Har",
15 | "18",
16 | "1000000000"
17 | ],
18 | "name": "",
19 | "type": "constructor",
20 | "abi": "0xb07df9f3d064d3c1d1f795430496534894c69478fe1ba82772774105c6bc7496",
21 | "contractName": "Hardora",
22 | "bytecode": "60806040523480156200001157600080fd5b50604051620024c6380380620024c6833981810160405281019062000037919062000303565b8360009081620000489190620005f4565b5082600190816200005a9190620005f4565b5081600260006101000a81548160ff021916908360ff160217905550600260009054906101000a900460ff16600a6200009491906200085e565b81620000a19190620008af565b600381905550600354600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555050505050620008fa565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620001608262000115565b810181811067ffffffffffffffff8211171562000182576200018162000126565b5b80604052505050565b600062000197620000f7565b9050620001a5828262000155565b919050565b600067ffffffffffffffff821115620001c857620001c762000126565b5b620001d38262000115565b9050602081019050919050565b60005b8381101562000200578082015181840152602081019050620001e3565b60008484015250505050565b6000620002236200021d84620001aa565b6200018b565b90508281526020810184848401111562000242576200024162000110565b5b6200024f848285620001e0565b509392505050565b600082601f8301126200026f576200026e6200010b565b5b8151620002818482602086016200020c565b91505092915050565b600060ff82169050919050565b620002a2816200028a565b8114620002ae57600080fd5b50565b600081519050620002c28162000297565b92915050565b6000819050919050565b620002dd81620002c8565b8114620002e957600080fd5b50565b600081519050620002fd81620002d2565b92915050565b6000806000806080858703121562000320576200031f62000101565b5b600085015167ffffffffffffffff81111562000341576200034062000106565b5b6200034f8782880162000257565b945050602085015167ffffffffffffffff81111562000373576200037262000106565b5b620003818782880162000257565b93505060406200039487828801620002b1565b9250506060620003a787828801620002ec565b91505092959194509250565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200040657607f821691505b6020821081036200041c576200041b620003be565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620004867fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000447565b62000492868362000447565b95508019841693508086168417925050509392505050565b6000819050919050565b6000620004d5620004cf620004c984620002c8565b620004aa565b620002c8565b9050919050565b6000819050919050565b620004f183620004b4565b620005096200050082620004dc565b84845462000454565b825550505050565b600090565b6200052062000511565b6200052d818484620004e6565b505050565b5b8181101562000555576200054960008262000516565b60018101905062000533565b5050565b601f821115620005a4576200056e8162000422565b620005798462000437565b8101602085101562000589578190505b620005a1620005988562000437565b83018262000532565b50505b505050565b600082821c905092915050565b6000620005c960001984600802620005a9565b1980831691505092915050565b6000620005e48383620005b6565b9150826002028217905092915050565b620005ff82620003b3565b67ffffffffffffffff8111156200061b576200061a62000126565b5b620006278254620003ed565b6200063482828562000559565b600060209050601f8311600181146200066c576000841562000657578287015190505b620006638582620005d6565b865550620006d3565b601f1984166200067c8662000422565b60005b82811015620006a6578489015182556001820191506020850194506020810190506200067f565b86831015620006c65784890151620006c2601f891682620005b6565b8355505b6001600288020188555050505b505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008160011c9050919050565b6000808291508390505b60018511156200076957808604811115620007415762000740620006db565b5b6001851615620007515780820291505b808102905062000761856200070a565b945062000721565b94509492505050565b60008262000784576001905062000857565b8162000794576000905062000857565b8160018114620007ad5760028114620007b857620007ee565b600191505062000857565b60ff841115620007cd57620007cc620006db565b5b8360020a915084821115620007e757620007e6620006db565b5b5062000857565b5060208310610133831016604e8410600b8410161715620008285782820a905083811115620008225762000821620006db565b5b62000857565b62000837848484600162000717565b92509050818404811115620008515762000850620006db565b5b81810290505b9392505050565b60006200086b82620002c8565b915062000878836200028a565b9250620008a77fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848462000772565b905092915050565b6000620008bc82620002c8565b9150620008c983620002c8565b9250828202620008d981620002c8565b91508282048414831517620008f357620008f2620006db565b5b5092915050565b611bbc806200090a6000396000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c806342966c68116100a2578063a409eb7b11610071578063a409eb7b146102ce578063a457c2d7146102fe578063a9059cbb1461032e578063dd62ed3e1461035e578063facd743b1461038e5761010b565b806342966c68146102345780634d238c8e1461026457806370a082311461028057806395d89b41146102b05761010b565b8063313ce567116100de578063313ce567146101ac578063359cf2b7146101ca57806335aa2e44146101d457806339509351146102045761010b565b806306fdde0314610110578063095ea7b31461012e57806318160ddd1461015e57806323b872dd1461017c575b600080fd5b6101186103be565b6040516101259190611544565b60405180910390f35b610148600480360381019061014391906115ff565b61044c565b604051610155919061165a565b60405180910390f35b61016661053e565b6040516101739190611684565b60405180910390f35b6101966004803603810190610191919061169f565b610544565b6040516101a3919061165a565b60405180910390f35b6101b4610836565b6040516101c1919061170e565b60405180910390f35b6101d2610849565b005b6101ee60048036038101906101e99190611729565b610ad2565b6040516101fb9190611765565b60405180910390f35b61021e600480360381019061021991906115ff565b610b11565b60405161022b919061165a565b60405180910390f35b61024e60048036038101906102499190611729565b610c91565b60405161025b919061165a565b60405180910390f35b61027e60048036038101906102799190611780565b610df3565b005b61029a60048036038101906102959190611780565b610f81565b6040516102a79190611684565b60405180910390f35b6102b8610f99565b6040516102c59190611544565b60405180910390f35b6102e860048036038101906102e39190611780565b611027565b6040516102f5919061165a565b60405180910390f35b610318600480360381019061031391906115ff565b611047565b604051610325919061165a565b60405180910390f35b610348600480360381019061034391906115ff565b6112d0565b604051610355919061165a565b60405180910390f35b610378600480360381019061037391906117ad565b61146f565b6040516103859190611684565b60405180910390f35b6103a860048036038101906103a39190611780565b611494565b6040516103b5919061165a565b60405180910390f35b600080546103cb9061181c565b80601f01602080910402602001604051908101604052809291908181526020018280546103f79061181c565b80156104445780601f1061041957610100808354040283529160200191610444565b820191906000526020600020905b81548152906001019060200180831161042757829003601f168201915b505050505081565b600081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161052c9190611684565b60405180910390a36001905092915050565b60035481565b600081600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156105c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105bf90611899565b60405180910390fd5b81600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610687576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067e90611905565b60405180910390fd5b81600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546106d69190611954565b9250508190555081600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461072c9190611988565b9250508190555081600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546107bf9190611954565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516108239190611684565b60405180910390a3600190509392505050565b600260009054906101000a900460ff1681565b600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166108d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108cc90611a2e565b60405180910390fd5b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610962576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095990611a9a565b60405180910390fd5b6001600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060006008805490506003546109cf9190611ae9565b905080600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610a209190611988565b925050819055503373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610a849190611684565b60405180910390a33373ffffffffffffffffffffffffffffffffffffffff167f039f711c9c18dd815b225b1424855e6118e746c6b5d688907f10c4dd29ebe92a60405160405180910390a250565b60088181548110610ae257600080fd5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b9f9190611988565b925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054604051610c7f9190611684565b60405180910390a36001905092915050565b600081600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610d15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d0c90611899565b60405180910390fd5b81600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610d649190611954565b925050819055508160036000828254610d7d9190611954565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610de29190611684565b60405180910390a360019050919050565b600660008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610e80576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e7790611b66565b60405180910390fd5b6001600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506008819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167fe366c1c0452ed8eec96861e9e54141ebff23c9ec89fe27b996b45f5ec388498760405160405180910390a250565b60046020528060005260406000206000915090505481565b60018054610fa69061181c565b80601f0160208091040260200160405190810160405280929190818152602001828054610fd29061181c565b801561101f5780601f10610ff45761010080835404028352916020019161101f565b820191906000526020600020905b81548152906001019060200180831161100257829003601f168201915b505050505081565b60076020528060005260406000206000915054906101000a900460ff1681565b600080600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050808310611157576000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506111e4565b82816111639190611954565b600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040516112bd9190611684565b60405180910390a3600191505092915050565b600081600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015611354576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161134b90611899565b60405180910390fd5b81600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546113a39190611954565b9250508190555081600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546113f99190611988565b925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161145d9190611684565b60405180910390a36001905092915050565b6005602052816000526040600020602052806000526040600020600091509150505481565b60066020528060005260406000206000915054906101000a900460ff1681565b600081519050919050565b600082825260208201905092915050565b60005b838110156114ee5780820151818401526020810190506114d3565b60008484015250505050565b6000601f19601f8301169050919050565b6000611516826114b4565b61152081856114bf565b93506115308185602086016114d0565b611539816114fa565b840191505092915050565b6000602082019050818103600083015261155e818461150b565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006115968261156b565b9050919050565b6115a68161158b565b81146115b157600080fd5b50565b6000813590506115c38161159d565b92915050565b6000819050919050565b6115dc816115c9565b81146115e757600080fd5b50565b6000813590506115f9816115d3565b92915050565b6000806040838503121561161657611615611566565b5b6000611624858286016115b4565b9250506020611635858286016115ea565b9150509250929050565b60008115159050919050565b6116548161163f565b82525050565b600060208201905061166f600083018461164b565b92915050565b61167e816115c9565b82525050565b60006020820190506116996000830184611675565b92915050565b6000806000606084860312156116b8576116b7611566565b5b60006116c6868287016115b4565b93505060206116d7868287016115b4565b92505060406116e8868287016115ea565b9150509250925092565b600060ff82169050919050565b611708816116f2565b82525050565b600060208201905061172360008301846116ff565b92915050565b60006020828403121561173f5761173e611566565b5b600061174d848285016115ea565b91505092915050565b61175f8161158b565b82525050565b600060208201905061177a6000830184611756565b92915050565b60006020828403121561179657611795611566565b5b60006117a4848285016115b4565b91505092915050565b600080604083850312156117c4576117c3611566565b5b60006117d2858286016115b4565b92505060206117e3858286016115b4565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061183457607f821691505b602082108103611847576118466117ed565b5b50919050565b7f4e6f7420656e6f7567682062616c616e63652e00000000000000000000000000600082015250565b60006118836013836114bf565b915061188e8261184d565b602082019050919050565b600060208201905081810360008301526118b281611876565b9050919050565b7f4e6f7420656e6f75676820616c6c6f77616e63652e0000000000000000000000600082015250565b60006118ef6015836114bf565b91506118fa826118b9565b602082019050919050565b6000602082019050818103600083015261191e816118e2565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061195f826115c9565b915061196a836115c9565b925082820390508181111561198257611981611925565b5b92915050565b6000611993826115c9565b915061199e836115c9565b92508282019050808211156119b6576119b5611925565b5b92915050565b7f4f6e6c792076616c696461746f72732063616e207265717565737420746f6b6560008201527f6e732e0000000000000000000000000000000000000000000000000000000000602082015250565b6000611a186023836114bf565b9150611a23826119bc565b604082019050919050565b60006020820190508181036000830152611a4781611a0b565b9050919050565b7f546f6b656e7320616c7265616479207265717565737465642e00000000000000600082015250565b6000611a846019836114bf565b9150611a8f82611a4e565b602082019050919050565b60006020820190508181036000830152611ab381611a77565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000611af4826115c9565b9150611aff836115c9565b925082611b0f57611b0e611aba565b5b828204905092915050565b7f56616c696461746f7220616c7265616479206578697374732e00000000000000600082015250565b6000611b506019836114bf565b9150611b5b82611b1a565b602082019050919050565b60006020820190508181036000830152611b7f81611b43565b905091905056fea2646970667358221220cd8e87be24b6e7de4c2c872160ff1b767da9a3fd09b11ef790aac72caafd0c9a64736f6c63430008120033",
23 | "linkReferences": {},
24 | "from": "account{0}"
25 | }
26 | }
27 | ],
28 | "abis": {
29 | "0xb07df9f3d064d3c1d1f795430496534894c69478fe1ba82772774105c6bc7496": [
30 | {
31 | "inputs": [
32 | {
33 | "internalType": "address",
34 | "name": "_validator",
35 | "type": "address"
36 | }
37 | ],
38 | "name": "addValidator",
39 | "outputs": [],
40 | "stateMutability": "nonpayable",
41 | "type": "function"
42 | },
43 | {
44 | "inputs": [
45 | {
46 | "internalType": "address",
47 | "name": "_spender",
48 | "type": "address"
49 | },
50 | {
51 | "internalType": "uint256",
52 | "name": "_value",
53 | "type": "uint256"
54 | }
55 | ],
56 | "name": "approve",
57 | "outputs": [
58 | {
59 | "internalType": "bool",
60 | "name": "success",
61 | "type": "bool"
62 | }
63 | ],
64 | "stateMutability": "nonpayable",
65 | "type": "function"
66 | },
67 | {
68 | "inputs": [
69 | {
70 | "internalType": "uint256",
71 | "name": "_value",
72 | "type": "uint256"
73 | }
74 | ],
75 | "name": "burn",
76 | "outputs": [
77 | {
78 | "internalType": "bool",
79 | "name": "success",
80 | "type": "bool"
81 | }
82 | ],
83 | "stateMutability": "nonpayable",
84 | "type": "function"
85 | },
86 | {
87 | "inputs": [
88 | {
89 | "internalType": "address",
90 | "name": "_spender",
91 | "type": "address"
92 | },
93 | {
94 | "internalType": "uint256",
95 | "name": "_addedValue",
96 | "type": "uint256"
97 | }
98 | ],
99 | "name": "increaseAllowance",
100 | "outputs": [
101 | {
102 | "internalType": "bool",
103 | "name": "success",
104 | "type": "bool"
105 | }
106 | ],
107 | "stateMutability": "nonpayable",
108 | "type": "function"
109 | },
110 | {
111 | "inputs": [],
112 | "name": "requestTokens",
113 | "outputs": [],
114 | "stateMutability": "nonpayable",
115 | "type": "function"
116 | },
117 | {
118 | "inputs": [
119 | {
120 | "internalType": "string",
121 | "name": "_name",
122 | "type": "string"
123 | },
124 | {
125 | "internalType": "string",
126 | "name": "_symbol",
127 | "type": "string"
128 | },
129 | {
130 | "internalType": "uint8",
131 | "name": "_decimals",
132 | "type": "uint8"
133 | },
134 | {
135 | "internalType": "uint256",
136 | "name": "_totalSupply",
137 | "type": "uint256"
138 | }
139 | ],
140 | "stateMutability": "nonpayable",
141 | "type": "constructor"
142 | },
143 | {
144 | "anonymous": false,
145 | "inputs": [
146 | {
147 | "indexed": true,
148 | "internalType": "address",
149 | "name": "owner",
150 | "type": "address"
151 | },
152 | {
153 | "indexed": true,
154 | "internalType": "address",
155 | "name": "spender",
156 | "type": "address"
157 | },
158 | {
159 | "indexed": false,
160 | "internalType": "uint256",
161 | "name": "value",
162 | "type": "uint256"
163 | }
164 | ],
165 | "name": "Approval",
166 | "type": "event"
167 | },
168 | {
169 | "inputs": [
170 | {
171 | "internalType": "address",
172 | "name": "_spender",
173 | "type": "address"
174 | },
175 | {
176 | "internalType": "uint256",
177 | "name": "_subtractedValue",
178 | "type": "uint256"
179 | }
180 | ],
181 | "name": "decreaseAllowance",
182 | "outputs": [
183 | {
184 | "internalType": "bool",
185 | "name": "success",
186 | "type": "bool"
187 | }
188 | ],
189 | "stateMutability": "nonpayable",
190 | "type": "function"
191 | },
192 | {
193 | "anonymous": false,
194 | "inputs": [
195 | {
196 | "indexed": true,
197 | "internalType": "address",
198 | "name": "validator",
199 | "type": "address"
200 | }
201 | ],
202 | "name": "Requested",
203 | "type": "event"
204 | },
205 | {
206 | "inputs": [
207 | {
208 | "internalType": "address",
209 | "name": "_to",
210 | "type": "address"
211 | },
212 | {
213 | "internalType": "uint256",
214 | "name": "_value",
215 | "type": "uint256"
216 | }
217 | ],
218 | "name": "transfer",
219 | "outputs": [
220 | {
221 | "internalType": "bool",
222 | "name": "success",
223 | "type": "bool"
224 | }
225 | ],
226 | "stateMutability": "nonpayable",
227 | "type": "function"
228 | },
229 | {
230 | "anonymous": false,
231 | "inputs": [
232 | {
233 | "indexed": true,
234 | "internalType": "address",
235 | "name": "from",
236 | "type": "address"
237 | },
238 | {
239 | "indexed": true,
240 | "internalType": "address",
241 | "name": "to",
242 | "type": "address"
243 | },
244 | {
245 | "indexed": false,
246 | "internalType": "uint256",
247 | "name": "value",
248 | "type": "uint256"
249 | }
250 | ],
251 | "name": "Transfer",
252 | "type": "event"
253 | },
254 | {
255 | "inputs": [
256 | {
257 | "internalType": "address",
258 | "name": "_from",
259 | "type": "address"
260 | },
261 | {
262 | "internalType": "address",
263 | "name": "_to",
264 | "type": "address"
265 | },
266 | {
267 | "internalType": "uint256",
268 | "name": "_value",
269 | "type": "uint256"
270 | }
271 | ],
272 | "name": "transferFrom",
273 | "outputs": [
274 | {
275 | "internalType": "bool",
276 | "name": "success",
277 | "type": "bool"
278 | }
279 | ],
280 | "stateMutability": "nonpayable",
281 | "type": "function"
282 | },
283 | {
284 | "anonymous": false,
285 | "inputs": [
286 | {
287 | "indexed": true,
288 | "internalType": "address",
289 | "name": "validator",
290 | "type": "address"
291 | }
292 | ],
293 | "name": "ValidatorAdded",
294 | "type": "event"
295 | },
296 | {
297 | "inputs": [
298 | {
299 | "internalType": "address",
300 | "name": "",
301 | "type": "address"
302 | },
303 | {
304 | "internalType": "address",
305 | "name": "",
306 | "type": "address"
307 | }
308 | ],
309 | "name": "allowance",
310 | "outputs": [
311 | {
312 | "internalType": "uint256",
313 | "name": "",
314 | "type": "uint256"
315 | }
316 | ],
317 | "stateMutability": "view",
318 | "type": "function"
319 | },
320 | {
321 | "inputs": [
322 | {
323 | "internalType": "address",
324 | "name": "",
325 | "type": "address"
326 | }
327 | ],
328 | "name": "balanceOf",
329 | "outputs": [
330 | {
331 | "internalType": "uint256",
332 | "name": "",
333 | "type": "uint256"
334 | }
335 | ],
336 | "stateMutability": "view",
337 | "type": "function"
338 | },
339 | {
340 | "inputs": [],
341 | "name": "decimals",
342 | "outputs": [
343 | {
344 | "internalType": "uint8",
345 | "name": "",
346 | "type": "uint8"
347 | }
348 | ],
349 | "stateMutability": "view",
350 | "type": "function"
351 | },
352 | {
353 | "inputs": [
354 | {
355 | "internalType": "address",
356 | "name": "",
357 | "type": "address"
358 | }
359 | ],
360 | "name": "hasRequested",
361 | "outputs": [
362 | {
363 | "internalType": "bool",
364 | "name": "",
365 | "type": "bool"
366 | }
367 | ],
368 | "stateMutability": "view",
369 | "type": "function"
370 | },
371 | {
372 | "inputs": [
373 | {
374 | "internalType": "address",
375 | "name": "",
376 | "type": "address"
377 | }
378 | ],
379 | "name": "isValidator",
380 | "outputs": [
381 | {
382 | "internalType": "bool",
383 | "name": "",
384 | "type": "bool"
385 | }
386 | ],
387 | "stateMutability": "view",
388 | "type": "function"
389 | },
390 | {
391 | "inputs": [],
392 | "name": "name",
393 | "outputs": [
394 | {
395 | "internalType": "string",
396 | "name": "",
397 | "type": "string"
398 | }
399 | ],
400 | "stateMutability": "view",
401 | "type": "function"
402 | },
403 | {
404 | "inputs": [],
405 | "name": "symbol",
406 | "outputs": [
407 | {
408 | "internalType": "string",
409 | "name": "",
410 | "type": "string"
411 | }
412 | ],
413 | "stateMutability": "view",
414 | "type": "function"
415 | },
416 | {
417 | "inputs": [],
418 | "name": "totalSupply",
419 | "outputs": [
420 | {
421 | "internalType": "uint256",
422 | "name": "",
423 | "type": "uint256"
424 | }
425 | ],
426 | "stateMutability": "view",
427 | "type": "function"
428 | },
429 | {
430 | "inputs": [
431 | {
432 | "internalType": "uint256",
433 | "name": "",
434 | "type": "uint256"
435 | }
436 | ],
437 | "name": "validators",
438 | "outputs": [
439 | {
440 | "internalType": "address",
441 | "name": "",
442 | "type": "address"
443 | }
444 | ],
445 | "stateMutability": "view",
446 | "type": "function"
447 | }
448 | ]
449 | }
450 | }
--------------------------------------------------------------------------------
/global.js:
--------------------------------------------------------------------------------
1 | // Inject node globals into React Native global scope.
2 | global.Buffer = require('buffer').Buffer;
3 | global.process = require('process');
4 |
5 | if (typeof btoa === 'undefined') {
6 | global.btoa = function (str) {
7 | return new Buffer.from(str, 'binary').toString('base64');
8 | };
9 | }
10 |
11 | if (typeof atob === 'undefined') {
12 | global.atob = function (b64Encoded) {
13 | return new Buffer.from(b64Encoded, 'base64').toString('binary');
14 | };
15 | }
--------------------------------------------------------------------------------
/onBoardingScreen/OnBoardingSwiper.js:
--------------------------------------------------------------------------------
1 | import { StyleSheet, Text, View } from 'react-native'
2 | import Swiper from 'react-native-swiper'
3 |
4 | function OnBoardingSwiper() {
5 | return (
6 | Next}>
7 |
8 | Hello Swiper
9 |
10 |
11 | Beautiful
12 |
13 |
14 | And simple
15 |
16 |
17 | )
18 | }
19 |
20 | export default OnBoardingSwiper;
21 |
22 | const styles = StyleSheet.create({
23 | wrapper: {},
24 | slide1: {
25 | flex: 1,
26 | justifyContent: 'center',
27 | alignItems: 'center',
28 | backgroundColor: '#9DD6EB'
29 | },
30 | slide2: {
31 | flex: 1,
32 | justifyContent: 'center',
33 | alignItems: 'center',
34 | backgroundColor: '#97CAE5'
35 | },
36 | slide3: {
37 | flex: 1,
38 | justifyContent: 'center',
39 | alignItems: 'center',
40 | backgroundColor: '#92BBD9'
41 | },
42 | text: {
43 | color: '#fff',
44 | fontSize: 30,
45 | fontWeight: 'bold'
46 | }
47 | })
48 |
--------------------------------------------------------------------------------
/onBoardingScreen/ScreenBoarding.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { Platform, ScrollView, StyleSheet, Text, View } from "react-native";
3 | import { Button, Image, } from "react-native-elements";
4 | import Onboarding from "react-native-onboarding-swiper";
5 | import { Ionicons } from "@expo/vector-icons";
6 | import { Pressable } from "react-native";
7 |
8 | const Square = ({ isLight, selected }) => {
9 | let backgroundColor;
10 | if (isLight) {
11 | backgroundColor = selected ? "rgba(0, 0, 0, 0.8)" : "rgba(0, 0, 0, 0.3)";
12 | } else {
13 | backgroundColor = selected ? "#fff" : "rgba(255, 255, 255, 0.5)";
14 | }
15 | return (
16 |
23 | );
24 | };
25 |
26 | const backgroundColor = isLight => (isLight ? "blue" : "lightblue");
27 | const color = isLight => backgroundColor(!isLight);
28 |
29 | const Done = ({ isLight, ...props }) => (
30 |
41 | );
42 |
43 | const Skip = ({ isLight, skipLabel, ...props }) => (
44 |
57 | );
58 |
59 | const Next = ({ isLight, ...props }) => (
60 |
61 |
62 |
63 | {/* */}
80 |
81 |
82 | );
83 |
84 | /*
85 | * Boarding is the onboarding component.
86 | * react-native-onboarding-swiper requires an image for every page, so we
87 | * provide an dummy View.
88 | */
89 | class ScreenBoarding extends React.Component {
90 | render() {
91 | const { navigation } = this.props;
92 |
93 | return (
94 | {
104 | // navigate to main app experience
105 | }}
106 |
107 | titleStyles={{ fontSize: 44, fontWeight: "800" }}
108 | subTitleStyles={{ fontSize: 24 }}
109 |
110 | pages={[
111 | {
112 | backgroundColor: "#fff",
113 | image: ,
114 | title: "Foobar",
115 | subtitle: "new app for you"
116 | },
117 | {
118 | image: ,
119 | title: "apple",
120 | titleStyles: { color: "white" },
121 | subtitle: "apple for you"
122 | },
123 | {
124 | image: ,
125 | title: "Triangle",
126 | subtitle: "Triangle for you",
127 | },
128 | {
129 | backgroundColor: "#fff",
130 | image: ,
131 | title: "End-User License Agreement (EULA) of Foobar",
132 | titleStyles: { color: "black", fontSize: 16 },
133 | subtitle:
134 | }
135 | ]}
136 | />
137 | );
138 | }
139 | }
140 |
141 | const Eula = () => (
142 |
143 |
144 | This End-User License Agreement ("EULA") is a legal agreement between you
145 | and Foobar Inc.
146 |
147 |
148 |
149 |
150 | );
151 |
152 | const styles = StyleSheet.create({
153 | eulaSubtitle: {
154 | fontSize: 18
155 | },
156 | });
157 |
158 | export default ScreenBoarding;
--------------------------------------------------------------------------------
/onBoardingScreen/UI/FirstScreen.js:
--------------------------------------------------------------------------------
1 | import { Ionicons } from "@expo/vector-icons";
2 | import { View, StyleSheet, SafeAreaView, Image, Pressable, Text, ScrollView } from "react-native";
3 | import { Color } from "../../constant/Color";
4 | import { useNavigation } from "@react-navigation/native";
5 |
6 | function FirstScreen() {
7 |
8 | const navigation = useNavigation();
9 |
10 | function skipHandler() {
11 | navigation.navigate('Dashboard');
12 | // console.log(navigation.navigate('Dashboard'));
13 | // navigation.goBack();
14 | }
15 | function nextHandler() {
16 | navigation.navigate('SecondScreen');
17 | }
18 |
19 | return (
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | Fast,
38 | Secure, and
39 | Decentralized
40 | A decentralized node system that removes
41 | he hurdle of third-party interference/delay.
42 |
43 |
44 |
45 |
46 |
47 | pressed && styles.pressed} onPress={skipHandler}>
48 | Skip
49 |
50 |
51 | pressed && styles.pressed, styles.nextButton]}>
52 |
53 | Next
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 | )
63 | }
64 |
65 | export default FirstScreen;
66 |
67 | const styles = StyleSheet.create({
68 | pressed: {
69 | opacity: 0.7
70 |
71 | },
72 | nextButton: {
73 | backgroundColor: '#F5F5F5',
74 | padding: 10,
75 | borderRadius: 25,
76 | },
77 | italyText: {
78 | color: 'white',
79 | fontSize: 30,
80 | fontWeight: 100,
81 | },
82 | text: {
83 | color: 'white',
84 | fontSize: 20,
85 | },
86 | buttonHolder: {
87 | marginVertical: 90,
88 | marginHorizontal: 10,
89 | flexDirection: 'row',
90 | justifyContent: 'space-between',
91 | },
92 | swiperTextHolder: {
93 | marginHorizontal: 10,
94 | },
95 | description: {
96 | color: 'white',
97 | marginTop: 10,
98 | fontSize: 16,
99 | },
100 | boldText: {
101 | color: 'white',
102 | fontWeight: 700,
103 | fontSize: 30,
104 | },
105 | imageHolder: {
106 | alignItems: 'center',
107 | justifyContent: 'center',
108 | marginVertical: 30,
109 | },
110 | logo: {
111 | marginVertical: 40,
112 | alignItems: 'center',
113 | justifyContent: 'center',
114 | },
115 | height: {
116 | height: 40
117 | },
118 | container: {
119 | flex: 1,
120 | backgroundColor: Color.bg
121 | },
122 | nob: {
123 | height: 4,
124 | width: 94,
125 | paddingHorizontal: 5,
126 | borderWidth: 1,
127 | alignItems: 'center',
128 | borderRadius: 10,
129 | },
130 | activeNob: {
131 | backgroundColor: '#D9D9D9',
132 | borderColor: '#D9D9D9',
133 | },
134 | defaultNob: {
135 | backgroundColor: '#424674',
136 | borderColor: '#424674',
137 | },
138 | nobHolder: {
139 | marginTop: 40,
140 | flexDirection: 'row',
141 | justifyContent: 'space-between',
142 | marginHorizontal: 40,
143 | },
144 | });
145 |
146 |
--------------------------------------------------------------------------------
/onBoardingScreen/UI/SecondScreen.js:
--------------------------------------------------------------------------------
1 | import { Ionicons } from "@expo/vector-icons";
2 | import { View, StyleSheet, SafeAreaView, Image, Pressable, Text, ScrollView } from "react-native";
3 | import { Color } from "../../constant/Color";
4 | // import { useNavigation } from "@react-navigation/native";
5 |
6 | function SecondScreen({ navigation }) {
7 |
8 | // const navigation = useNavigation();
9 |
10 | function skipHandler() {
11 | navigation.navigate('Dashboard');
12 | // console.log(navigation.navigate('Dashboard'));
13 | // navigation.goBack();
14 | }
15 | function nextHandler() {
16 | navigation.navigate('ThirdScreen');
17 | }
18 |
19 | return (
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | High
38 | Scalability and,
39 | Mobile-First
40 | Scalable hardware oracle that is
41 | designed to run on your mobile device faster and on the go.
42 |
43 |
44 |
45 |
46 |
47 | pressed && styles.pressed} onPress={skipHandler}>
48 | Skip
49 |
50 |
51 | pressed && styles.pressed, styles.nextButton]}>
52 |
53 | Next
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 | )
63 | }
64 |
65 | export default SecondScreen;
66 |
67 | const styles = StyleSheet.create({
68 | pressed: {
69 | opacity: 0.7
70 |
71 | },
72 | nextButton: {
73 | backgroundColor: '#F5F5F5',
74 | padding: 10,
75 | borderRadius: 25,
76 | },
77 | italyText: {
78 | color: 'white',
79 | fontSize: 30,
80 | fontWeight: 100,
81 | },
82 | text: {
83 | color: 'white',
84 | fontSize: 20,
85 | },
86 | buttonHolder: {
87 | marginVertical: 90,
88 | marginHorizontal: 10,
89 | flexDirection: 'row',
90 | justifyContent: 'space-between',
91 | },
92 | swiperTextHolder: {
93 | marginHorizontal: 10,
94 | },
95 | description: {
96 | color: 'white',
97 | marginTop: 10,
98 | fontSize: 16,
99 | },
100 | boldText: {
101 | color: 'white',
102 | fontWeight: 700,
103 | fontSize: 30,
104 | },
105 | imageHolder: {
106 | alignItems: 'center',
107 | justifyContent: 'center',
108 | marginVertical: 30,
109 | },
110 | logo: {
111 | marginVertical: 40,
112 | alignItems: 'center',
113 | justifyContent: 'center',
114 | },
115 | height: {
116 | height: 40
117 | },
118 | container: {
119 | flex: 1,
120 | backgroundColor: Color.bg
121 | },
122 | nob: {
123 | height: 4,
124 | width: 94,
125 | paddingHorizontal: 5,
126 | borderWidth: 1,
127 | alignItems: 'center',
128 | borderRadius: 10,
129 | },
130 | activeNob: {
131 | backgroundColor: '#D9D9D9',
132 | borderColor: '#D9D9D9',
133 | },
134 | defaultNob: {
135 | backgroundColor: '#424674',
136 | borderColor: '#424674',
137 | },
138 | nobHolder: {
139 | marginTop: 40,
140 | flexDirection: 'row',
141 | justifyContent: 'space-between',
142 | marginHorizontal: 40,
143 | },
144 | });
145 |
146 |
--------------------------------------------------------------------------------
/onBoardingScreen/UI/ThirdScreen.js:
--------------------------------------------------------------------------------
1 | import { Ionicons } from "@expo/vector-icons";
2 | import { View, StyleSheet, SafeAreaView, Image, Pressable, Text, ScrollView } from "react-native";
3 | import { Color } from "../../constant/Color";
4 | // import { useNavigation } from "@react-navigation/native";
5 |
6 | function ThirdScreen({ navigation }) {
7 |
8 | // const navigation = useNavigation();
9 |
10 | function nextHandler() {
11 | navigation.navigate('Dashboard');
12 | }
13 |
14 | return (
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | Simple
33 | hardware
34 | Compute-enabled
35 | Earn with a hardware compute-enabled
36 | oracle that computes “deterministic” and “non-deterministic” validation.
37 |
38 |
39 |
40 |
41 |
42 | {/* pressed && styles.pressed} onPress={skipHandler}>
43 | Skip
44 | */}
45 |
46 | pressed && styles.pressed, styles.nextButton]}>
47 |
48 | Get Started
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 | )
58 | }
59 |
60 | export default ThirdScreen;
61 |
62 | const styles = StyleSheet.create({
63 | pressed: {
64 | opacity: 0.7
65 |
66 | },
67 | nextButton: {
68 | backgroundColor: '#F5F5F5',
69 | padding: 10,
70 | borderRadius: 25,
71 | },
72 | italyText: {
73 | color: 'white',
74 | fontSize: 30,
75 | fontWeight: 100,
76 | },
77 | text: {
78 | color: 'white',
79 | fontSize: 20,
80 | },
81 | buttonHolder: {
82 | marginVertical: 90,
83 | marginHorizontal: 10,
84 | flexDirection: 'row',
85 | justifyContent: 'center',
86 | },
87 | swiperTextHolder: {
88 | marginHorizontal: 10,
89 | },
90 | description: {
91 | color: 'white',
92 | marginTop: 10,
93 | fontSize: 16,
94 | },
95 | boldText: {
96 | color: 'white',
97 | fontWeight: 700,
98 | fontSize: 30,
99 | },
100 | imageHolder: {
101 | alignItems: 'center',
102 | justifyContent: 'center',
103 | marginVertical: 30,
104 | },
105 | logo: {
106 | marginVertical: 40,
107 | alignItems: 'center',
108 | justifyContent: 'center',
109 | },
110 | height: {
111 | height: 40
112 | },
113 | container: {
114 | flex: 1,
115 | backgroundColor: Color.bg
116 | },
117 | nob: {
118 | height: 4,
119 | width: 94,
120 | paddingHorizontal: 5,
121 | borderWidth: 1,
122 | alignItems: 'center',
123 | borderRadius: 10,
124 | },
125 | activeNob: {
126 | backgroundColor: '#D9D9D9',
127 | borderColor: '#D9D9D9',
128 | },
129 | defaultNob: {
130 | backgroundColor: '#424674',
131 | borderColor: '#424674',
132 | },
133 | nobHolder: {
134 | marginTop: 40,
135 | flexDirection: 'row',
136 | justifyContent: 'space-between',
137 | marginHorizontal: 40,
138 | },
139 | });
140 |
141 |
--------------------------------------------------------------------------------
/onBoardingScreen/index.js:
--------------------------------------------------------------------------------
1 | import { Image, View } from 'react-native';
2 | import React from 'react';
3 | import { Button } from 'react-native-elements';
4 |
5 | import Onboarding from 'react-native-onboarding-swiper';
6 |
7 | const Square = ({ isLight, selected }) => {
8 | let backgroundColor;
9 | if (isLight) {
10 | backgroundColor = selected ? 'rgba(0, 0, 0, 0.8)' : 'rgba(0, 0, 0, 0.3)';
11 | } else {
12 | backgroundColor = selected ? '#fff' : 'rgba(255, 255, 255, 0.5)';
13 | }
14 | return (
15 |
23 | );
24 | };
25 |
26 | const backgroundColor = isLight => (isLight ? 'blue' : 'lightblue');
27 | const color = isLight => backgroundColor(!isLight);
28 |
29 | const Done = ({ isLight, ...props }) => (
30 |
43 | );
44 |
45 | const Skip = ({ isLight, skipLabel, ...props }) => (
46 |
60 | );
61 |
62 | const Next = ({ isLight, ...props }) => (
63 |
76 | );
77 |
78 | const CustomButtons = () => (
79 | ,
91 | title: 'Onboarding',
92 | subtitle: 'Done with React Native Onboarding Swiper',
93 | titleStyles: { color: 'red' }, // overwrite default color
94 | },
95 | {
96 | backgroundColor: '#fe6e58',
97 | image: ,
98 | title: 'The Title',
99 | subtitle: 'This is the subtitle that sumplements the title.',
100 | },
101 | {
102 | backgroundColor: '#999',
103 | image: ,
104 | title: 'Triangle',
105 | subtitle: "Beautiful, isn't it?",
106 | subtitle: "Beautiful, isn't it?",
107 |
108 | },
109 | ]}
110 | />
111 | );
112 |
113 | export default CustomButtons;
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "hardora",
3 | "version": "1.0.0",
4 | "main": "node_modules/expo/AppEntry.js",
5 | "scripts": {
6 | "start": "expo start",
7 | "android": "expo start --android",
8 | "ios": "expo start --ios",
9 | "web": "expo start --web"
10 | },
11 | "dependencies": {
12 | "@expo/vector-icons": "^13.0.0",
13 | "@openzeppelin/contracts": "^4.8.2",
14 | "@react-navigation/native": "^6.1.6",
15 | "@react-navigation/stack": "^6.3.16",
16 | "@shopify/restyle": "^2.4.1",
17 | "expo": "^48.0.9",
18 | "expo-splash-screen": "^0.18.1",
19 | "expo-status-bar": "~1.4.4",
20 | "node-libs-browser": "^2.2.1",
21 | "react": "18.2.0",
22 | "react-native": "0.71.4",
23 | "react-native-elements": "^3.4.3",
24 | "react-native-gesture-handler": "~2.9.0",
25 | "react-native-onboarding-swiper": "^1.2.0",
26 | "react-native-safe-area-context": "4.5.0",
27 | "react-native-screens": "~3.20.0",
28 | "react-native-swiper": "^1.6.0",
29 | "web3": "^1.9.0"
30 | },
31 | "devDependencies": {
32 | "@babel/core": "^7.20.0"
33 | },
34 | "private": true
35 | }
36 |
--------------------------------------------------------------------------------
/remove.json:
--------------------------------------------------------------------------------
1 | "splash": {
2 | "image": "./assets/splash.png",
3 | "resizeMode": "contain",
4 | "backgroundColor": "#ffffff"
5 | },
--------------------------------------------------------------------------------
/rn-cli.config.js:
--------------------------------------------------------------------------------
1 | import nodeLibs from 'node-libs-browser';
2 |
3 | export const resolver = {
4 | extraNodeModules: nodeLibs
5 | };
--------------------------------------------------------------------------------