├── data ├── !blockLogs!0 ├── !blockLogs!length ├── !blocks!length ├── !blockHashes!0x0f74e4a069e1351c65f5e413aa8a59423fbb6fb28774a5bf1d15d174e72ded78 ├── !trie_db!0x41c488877f4bd7f076e7a46574f86eb2e58bb101aad9fd4da0dbf9b60ec8c949 ├── !trie_db!0x4f8ac85f76698e8e6d89a93c6289c5d9fbf770f17f408507fb4934a85a3b3d60 ├── !trie_db!0x5911f24d96912350de50f297c2d34d5d10e136757bf4cfff5fa41bfca219554a ├── !trie_db!0xb5c26fd7ffd148b8d789fbff6fb48ba94f7a213690a05cabc20150baedc3a0ba ├── !trie_db!0xbabf5f4cb3818cd560fc39c82a32be48f33e81414037aaba7195018865f8e14e ├── !trie_db!0xda019d29209036820e59b6a9d3fc0b19ea036272ffb21133f2610e16bbfe7a2a ├── !trie_db!0x54350d30b48d6984395cf168b20e31952619100e01a31e619f91393e34d80ab5 ├── !trie_db!0x14e87897e030e06525166a8bdd0b1f48eb6dc8fd04621d8019ddf4cf31d5e2c9 ├── !trie_db!0x2e19121b59afc8893fffc6f5aafa51c7e4cf2fb7e8c0b9de32f60534475d5920 ├── !trie_db!0x32fe5bcd434f4957892d28231a3fb4e46ca814ef5a79893bdba57f1f8580f936 ├── !trie_db!0x35014d7f40e0d69c0e17af80d234ebd34745267637b18435f5c96ceb6575ad97 ├── !trie_db!0x39e495c77a884486adeff235f317eac2cd8cf8ce2fd6615024a09b2e5790e123 ├── !trie_db!0x57e6c57f0696fff6d2899b68e4bd548706a79e9afdb8ae86cc1e8ade9e716e25 ├── !trie_db!0x69dd78c3e9b114b19ce013965a5ee0e321a76fe8c92b9a585e0974745acc873b ├── !trie_db!0x8f3a7302947964ab8f164e327b664e87cb5ae0d754aaf8783e3ca976cef89186 ├── !trie_db!0xc405f5c23177395c512bb32240f4334f5e033c27445b6a52ac9ce82c663f1603 ├── !trie_db!0xec15f89b38d296209dd947aaa96a603dc9c44202c6f27232d9e520aa06a62260 ├── !trie_db!0xf639b43e2dfccab48f9beba3977e7d87868f615c6b19f56ab412fa08c0a1f1c1 ├── !trie_db!0xfef353cbd1b475375fc608ccbc1ee0b24f6b6282efdf72a8e7cbd0944b355c8c ├── !trie_db!0xb2eb81dfc2aec5b14c35f3b2358e64f83d8847ae5ac5c4e37df82c81a8acd180 ├── !trie_db!0xf9692db8728415303f5dbfa78395a02b21b42f81ccda60a0692fbc00638b3f66 ├── !trie_db!0x5ba9a4e84224a755038a22871e1ac01504284e8310d9a1bead13436262df56d9 ├── !trie_db!0xa35a3f80ed8e4c7578383351268eb6912f9f04886154748e805f81e2513434f5 ├── !trie_db!0xa46c31ed72743f82f5c6f08b8c24869f5573b136a5068b585868ef3899f3b10a ├── !trie_db!0xb03ac97afc708408787858fa34238c61db6d1fbef43e7dfc52fd576a62905d33 ├── !trie_db!0x120169d23be359eb486d3045833d98b8b8ba70c46cb85230b61009e2ab021b3d ├── !trie_db!0x7990c251ed46db92faa0d4dd67c1fdd73e39bfd35826f4e8749385d8c7fbf050 ├── !trie_db!0xf956e2b82e637ac5c7498bca94b241f2d7fb8b06625006eb6f441c23cb7468c5 ├── !trie_db!0xe0521e193e31d300d3ad1c8b009a7952900965daf9d003990c08aa812dc81fb6 └── !blocks!0 ├── Truffle ├── .gitattributes ├── migrations │ ├── 1_initial_migration.js │ └── 2_deploy_contracts.js ├── scripts │ ├── contractInfo.js │ ├── devChain.js │ └── deployContract.js ├── contracts │ ├── ConvertLib.sol │ ├── Migrations.sol │ └── MetaCoin.sol ├── test │ ├── TestMetaCoin.sol │ └── metacoin.js ├── LICENSE └── truffle-config.js ├── jsconfig.json ├── src ├── components │ ├── Chains │ │ ├── index.js │ │ ├── Chains.jsx │ │ └── Logos.jsx │ ├── InchDex │ │ ├── index.js │ │ ├── components │ │ │ └── InchModal.jsx │ │ └── InchDex.jsx │ ├── Wallet │ │ ├── index.js │ │ ├── Wallet.jsx │ │ └── components │ │ │ ├── AssetSelector.jsx │ │ │ ├── Assets.jsx │ │ │ └── Transfer.jsx │ ├── ERC20Transfers │ │ ├── index.js │ │ └── ERC20Transfers.jsx │ ├── Address │ │ ├── identicon.module.css │ │ └── Address.jsx │ ├── NativeTransactions │ │ ├── index.js │ │ ├── styles.js │ │ └── NativeTransactions.jsx │ ├── NativeBalance.jsx │ ├── Ramper.jsx │ ├── Blockie.jsx │ ├── TokenPrice.jsx │ ├── Contract │ │ ├── ContractMethods.jsx │ │ └── Contract.jsx │ ├── MenuItems.jsx │ ├── ERC20Balance.jsx │ ├── Logo.jsx │ ├── Account.jsx │ ├── BaseLayout.jsx │ ├── AddressInput.jsx │ ├── NFTBalance.jsx │ └── QuickStart.jsx ├── context.js ├── pages │ ├── index.jsx │ ├── wallet.jsx │ ├── contract.jsx │ ├── nftBalance.jsx │ ├── erc20balance.jsx │ ├── quickstart.jsx │ ├── erc20transfers.jsx │ ├── nonauthenticated.jsx │ ├── 404.jsx │ ├── 1inch.jsx │ ├── onramp.jsx │ └── _app.jsx ├── hooks │ ├── useIPFS.js │ ├── useAPIContract.js │ ├── useNativeTransactions.js │ ├── useERC20Transfers.js │ ├── useERC20Balance.js │ ├── useTokenPrice.js │ └── useInchDex.js ├── uikit │ └── Flex │ │ └── Flex.jsx ├── styles │ ├── index.css │ └── style.module.css └── helpers │ ├── formatters.js │ └── networks.js ├── public ├── favicon.ico └── index.html ├── .eslintrc ├── CODING_STYLE.md ├── next.config.js ├── .env.local.example ├── .gitignore ├── LICENSE.md ├── CONTRIBUTING.md ├── package.json └── README.md /data/!blockLogs!0: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /data/!blockLogs!length: -------------------------------------------------------------------------------- 1 | 1 -------------------------------------------------------------------------------- /data/!blocks!length: -------------------------------------------------------------------------------- 1 | 1 -------------------------------------------------------------------------------- /Truffle/.gitattributes: -------------------------------------------------------------------------------- 1 | *.sol linguist-language=Solidity 2 | -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { "baseUrl": "src" } 3 | } 4 | -------------------------------------------------------------------------------- /src/components/Chains/index.js: -------------------------------------------------------------------------------- 1 | export { default } from "./Chains"; 2 | -------------------------------------------------------------------------------- /src/components/InchDex/index.js: -------------------------------------------------------------------------------- 1 | export { default } from "./InchDex"; 2 | -------------------------------------------------------------------------------- /src/components/Wallet/index.js: -------------------------------------------------------------------------------- 1 | export { default } from "./Wallet"; 2 | -------------------------------------------------------------------------------- /data/!blockHashes!0x0f74e4a069e1351c65f5e413aa8a59423fbb6fb28774a5bf1d15d174e72ded78: -------------------------------------------------------------------------------- 1 | 0 -------------------------------------------------------------------------------- /src/components/ERC20Transfers/index.js: -------------------------------------------------------------------------------- 1 | export { default } from "./ERC20Transfers"; 2 | -------------------------------------------------------------------------------- /src/components/Address/identicon.module.css: -------------------------------------------------------------------------------- 1 | .identicon { 2 | border-radius: 50px; 3 | } 4 | -------------------------------------------------------------------------------- /src/components/NativeTransactions/index.js: -------------------------------------------------------------------------------- 1 | export { default } from "./NativeTransactions"; 2 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethereum-boilerplate/ethereum-nextjs-boilerplate/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next", 3 | "root": true, 4 | "rules": { 5 | "@next/next/no-img-element": "off" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/context.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | const DappContext = React.createContext(); 4 | export default DappContext; 5 | -------------------------------------------------------------------------------- /src/pages/index.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | function Index() { 4 | return
Pppf!!
; 5 | } 6 | 7 | export default Index; 8 | -------------------------------------------------------------------------------- /Truffle/migrations/1_initial_migration.js: -------------------------------------------------------------------------------- 1 | const Migrations = artifacts.require("Migrations"); 2 | 3 | module.exports = function(deployer) { 4 | deployer.deploy(Migrations); 5 | }; 6 | -------------------------------------------------------------------------------- /src/pages/wallet.jsx: -------------------------------------------------------------------------------- 1 | import Wallet from 'components/Wallet/Wallet'; 2 | import React from 'react' 3 | 4 | function wallet() { 5 | return 6 | } 7 | 8 | export default wallet 9 | -------------------------------------------------------------------------------- /CODING_STYLE.md: -------------------------------------------------------------------------------- 1 | # Coding Style 2 | 3 | - Most importantly, match the existing code style as much as possible. 4 | - Follow the ESlint rules for code-styling and Prettier rules for formatting 5 | -------------------------------------------------------------------------------- /data/!trie_db!0x41c488877f4bd7f076e7a46574f86eb2e58bb101aad9fd4da0dbf9b60ec8c949: -------------------------------------------------------------------------------- 1 | "0xf6941000000000000000000000000000000000000000a0f956e2b82e637ac5c7498bca94b241f2d7fb8b06625006eb6f441c23cb7468c5" -------------------------------------------------------------------------------- /data/!trie_db!0x4f8ac85f76698e8e6d89a93c6289c5d9fbf770f17f408507fb4934a85a3b3d60: -------------------------------------------------------------------------------- 1 | "0xf6940000000000000000000000000000000000000000a0f956e2b82e637ac5c7498bca94b241f2d7fb8b06625006eb6f441c23cb7468c5" -------------------------------------------------------------------------------- /src/pages/contract.jsx: -------------------------------------------------------------------------------- 1 | import Contract from "components/Contract/Contract"; 2 | import React from "react"; 3 | 4 | function contract() { 5 | return ; 6 | } 7 | 8 | export default contract; 9 | -------------------------------------------------------------------------------- /src/pages/nftBalance.jsx: -------------------------------------------------------------------------------- 1 | import NFTBalance from "components/NFTBalance"; 2 | import React from "react"; 3 | 4 | function nftBalance() { 5 | return ; 6 | } 7 | 8 | export default nftBalance; 9 | -------------------------------------------------------------------------------- /next.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | images: { 3 | domains: ["cloudflare-ipfs.com", "etherscan.io"], 4 | }, 5 | assetPrefix: "/ethereum-nextjs-boilerplate/", 6 | basePath: "/ethereum-nextjs-boilerplate", 7 | }; 8 | -------------------------------------------------------------------------------- /src/pages/erc20balance.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ERC20Balance from "components/ERC20Balance"; 3 | 4 | function erc20balance() { 5 | return ; 6 | } 7 | 8 | export default erc20balance; 9 | -------------------------------------------------------------------------------- /src/pages/quickstart.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import QuickStart from "components/QuickStart"; 3 | 4 | export default function quickstart({ isServerInfo }) { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /data/!trie_db!0x5911f24d96912350de50f297c2d34d5d10e136757bf4cfff5fa41bfca219554a: -------------------------------------------------------------------------------- 1 | "0xf84920b846f8448080a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a0c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" -------------------------------------------------------------------------------- /data/!trie_db!0xb5c26fd7ffd148b8d789fbff6fb48ba94f7a213690a05cabc20150baedc3a0ba: -------------------------------------------------------------------------------- 1 | "0xf8518080a032fe5bcd434f4957892d28231a3fb4e46ca814ef5a79893bdba57f1f8580f9368080808080a014e87897e030e06525166a8bdd0b1f48eb6dc8fd04621d8019ddf4cf31d5e2c98080808080808080" -------------------------------------------------------------------------------- /data/!trie_db!0xbabf5f4cb3818cd560fc39c82a32be48f33e81414037aaba7195018865f8e14e: -------------------------------------------------------------------------------- 1 | "0xf851a0ec15f89b38d296209dd947aaa96a603dc9c44202c6f27232d9e520aa06a6226080808080a08f3a7302947964ab8f164e327b664e87cb5ae0d754aaf8783e3ca976cef891868080808080808080808080" -------------------------------------------------------------------------------- /data/!trie_db!0xda019d29209036820e59b6a9d3fc0b19ea036272ffb21133f2610e16bbfe7a2a: -------------------------------------------------------------------------------- 1 | "0xf851a04f8ac85f76698e8e6d89a93c6289c5d9fbf770f17f408507fb4934a85a3b3d60a035014d7f40e0d69c0e17af80d234ebd34745267637b18435f5c96ceb6575ad97808080808080808080808080808080" -------------------------------------------------------------------------------- /src/pages/erc20transfers.jsx: -------------------------------------------------------------------------------- 1 | import ERC20Transfers from "components/ERC20Transfers/ERC20Transfers"; 2 | import React from "react"; 3 | 4 | function erc20transfers() { 5 | return ; 6 | } 7 | 8 | export default erc20transfers; 9 | -------------------------------------------------------------------------------- /Truffle/scripts/contractInfo.js: -------------------------------------------------------------------------------- 1 | var fs = require("fs"); 2 | 3 | fs.copyFile("build/contracts/Metacoin.json", "../src/contracts/contractInfo.json", (err) => { 4 | if (err) throw err; 5 | console.log("✅ Your contract's ABI was copied to the frontend"); 6 | }); 7 | -------------------------------------------------------------------------------- /src/hooks/useIPFS.js: -------------------------------------------------------------------------------- 1 | export const useIPFS = () => { 2 | const resolveLink = (url) => { 3 | if (!url || !url.includes("ipfs://")) return url; 4 | return url.replace("ipfs://", "https://gateway.ipfs.io/ipfs/"); 5 | }; 6 | 7 | return { resolveLink }; 8 | }; 9 | -------------------------------------------------------------------------------- /data/!trie_db!0x54350d30b48d6984395cf168b20e31952619100e01a31e619f91393e34d80ab5: -------------------------------------------------------------------------------- 1 | "0xf85e95200000000000000000000000000000000000000001b846f8448080a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a0c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" -------------------------------------------------------------------------------- /src/pages/nonauthenticated.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | function nonauthenticated() { 4 | return ( 5 |
6 | <>Please login using the "Authenticate" button 7 |
8 | ); 9 | } 10 | 11 | export default nonauthenticated; 12 | -------------------------------------------------------------------------------- /data/!trie_db!0x14e87897e030e06525166a8bdd0b1f48eb6dc8fd04621d8019ddf4cf31d5e2c9: -------------------------------------------------------------------------------- 1 | "0xf8669420a8746e75304c0780e011bed21c72cd78cd535eb84ff84d8089056bc75e2d63100000a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a0c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" -------------------------------------------------------------------------------- /data/!trie_db!0x2e19121b59afc8893fffc6f5aafa51c7e4cf2fb7e8c0b9de32f60534475d5920: -------------------------------------------------------------------------------- 1 | "0xf866943ca94ef8bd5ffee41947b4585a84bda5a3d3da6eb84ff84d8089056bc75e2d63100000a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a0c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" -------------------------------------------------------------------------------- /data/!trie_db!0x32fe5bcd434f4957892d28231a3fb4e46ca814ef5a79893bdba57f1f8580f936: -------------------------------------------------------------------------------- 1 | "0xf8669420d491bde2303f2f43325b2108d26f1eaba1e32bb84ff84d8089056bc75e2d63100000a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a0c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" -------------------------------------------------------------------------------- /data/!trie_db!0x35014d7f40e0d69c0e17af80d234ebd34745267637b18435f5c96ceb6575ad97: -------------------------------------------------------------------------------- 1 | "0xf866943df62f291b2e969fb0849d99d9ce41e2f137006eb84ff84d8089056bc75e2d63100000a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a0c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" -------------------------------------------------------------------------------- /data/!trie_db!0x39e495c77a884486adeff235f317eac2cd8cf8ce2fd6615024a09b2e5790e123: -------------------------------------------------------------------------------- 1 | "0xf86694303ea8624c8c5987235048901fb614fdca89b117b84ff84d8089056bc75e2d63100000a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a0c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" -------------------------------------------------------------------------------- /data/!trie_db!0x57e6c57f0696fff6d2899b68e4bd548706a79e9afdb8ae86cc1e8ade9e716e25: -------------------------------------------------------------------------------- 1 | "0xf8669432d491bde2303f2f43325b2108d26f1eaba1e32bb84ff84d8089056bc75e2d63100000a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a0c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" -------------------------------------------------------------------------------- /data/!trie_db!0x69dd78c3e9b114b19ce013965a5ee0e321a76fe8c92b9a585e0974745acc873b: -------------------------------------------------------------------------------- 1 | "0xf866943fcf8fdee72ac11b5c542428b35eef5769c409f0b84ff84d8089056bc75e2d63100000a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a0c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" -------------------------------------------------------------------------------- /data/!trie_db!0x8f3a7302947964ab8f164e327b664e87cb5ae0d754aaf8783e3ca976cef89186: -------------------------------------------------------------------------------- 1 | "0xf8669420ced938f7991cd0dfcb48f0a06a40fa1af46ebcb84ff84d8089056bc75e2d63100000a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a0c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" -------------------------------------------------------------------------------- /data/!trie_db!0xc405f5c23177395c512bb32240f4334f5e033c27445b6a52ac9ce82c663f1603: -------------------------------------------------------------------------------- 1 | "0xf866943e5e9111ae8eb78fe1cc3bb8915d5d461f3ef9a9b84ff84d8089056bc75e2d63100000a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a0c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" -------------------------------------------------------------------------------- /data/!trie_db!0xec15f89b38d296209dd947aaa96a603dc9c44202c6f27232d9e520aa06a62260: -------------------------------------------------------------------------------- 1 | "0xf8669420f8bf6a479f320ead074411a4b0e7944ea8c9c1b84ff84d8089056bc75e2d63100000a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a0c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" -------------------------------------------------------------------------------- /data/!trie_db!0xf639b43e2dfccab48f9beba3977e7d87868f615c6b19f56ab412fa08c0a1f1c1: -------------------------------------------------------------------------------- 1 | "0xf86694311ba2b4d45eaed5996cd0823791e0c93114882db84ff84d8089056bc75e2d63100000a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a0c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" -------------------------------------------------------------------------------- /data/!trie_db!0xfef353cbd1b475375fc608ccbc1ee0b24f6b6282efdf72a8e7cbd0944b355c8c: -------------------------------------------------------------------------------- 1 | "0xf8669430f8bf6a479f320ead074411a4b0e7944ea8c9c1b84ff84d8089056bc75e2d63100000a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a0c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" -------------------------------------------------------------------------------- /src/pages/404.jsx: -------------------------------------------------------------------------------- 1 | import { useEffect } from "react"; 2 | import { useRouter } from "next/router"; 3 | 4 | export default function Custom404() { 5 | const router = useRouter(); 6 | 7 | useEffect(() => { 8 | router.replace("/quickstart"); 9 | }); 10 | 11 | return null; 12 | } 13 | -------------------------------------------------------------------------------- /Truffle/contracts/ConvertLib.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.4.25 <0.7.0; 3 | 4 | library ConvertLib{ 5 | function convert(uint amount,uint conversionRate) public pure returns (uint convertedAmount) 6 | { 7 | return amount * conversionRate; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Truffle/migrations/2_deploy_contracts.js: -------------------------------------------------------------------------------- 1 | const ConvertLib = artifacts.require("ConvertLib"); 2 | const MetaCoin = artifacts.require("MetaCoin"); 3 | 4 | module.exports = function(deployer) { 5 | deployer.deploy(ConvertLib); 6 | deployer.link(ConvertLib, MetaCoin); 7 | deployer.deploy(MetaCoin); 8 | }; 9 | -------------------------------------------------------------------------------- /data/!trie_db!0xb2eb81dfc2aec5b14c35f3b2358e64f83d8847ae5ac5c4e37df82c81a8acd180: -------------------------------------------------------------------------------- 1 | "0xf871a04f8ac85f76698e8e6d89a93c6289c5d9fbf770f17f408507fb4934a85a3b3d60a035014d7f40e0d69c0e17af80d234ebd34745267637b18435f5c96ceb6575ad97a0b5c26fd7ffd148b8d789fbff6fb48ba94f7a213690a05cabc20150baedc3a0ba8080808080808080808080808080" -------------------------------------------------------------------------------- /data/!trie_db!0xf9692db8728415303f5dbfa78395a02b21b42f81ccda60a0692fbc00638b3f66: -------------------------------------------------------------------------------- 1 | "0xf871a04f8ac85f76698e8e6d89a93c6289c5d9fbf770f17f408507fb4934a85a3b3d60a035014d7f40e0d69c0e17af80d234ebd34745267637b18435f5c96ceb6575ad97a057e6c57f0696fff6d2899b68e4bd548706a79e9afdb8ae86cc1e8ade9e716e258080808080808080808080808080" -------------------------------------------------------------------------------- /src/components/NativeBalance.jsx: -------------------------------------------------------------------------------- 1 | import { useNativeBalance } from "react-moralis"; 2 | 3 | function NativeBalance(props) { 4 | const { data: balance } = useNativeBalance(props); 5 | 6 | return
{balance.formatted}
; 7 | } 8 | 9 | export default NativeBalance; 10 | -------------------------------------------------------------------------------- /data/!trie_db!0x5ba9a4e84224a755038a22871e1ac01504284e8310d9a1bead13436262df56d9: -------------------------------------------------------------------------------- 1 | "0xf891a04f8ac85f76698e8e6d89a93c6289c5d9fbf770f17f408507fb4934a85a3b3d60a035014d7f40e0d69c0e17af80d234ebd34745267637b18435f5c96ceb6575ad97a0b5c26fd7ffd148b8d789fbff6fb48ba94f7a213690a05cabc20150baedc3a0baa0c405f5c23177395c512bb32240f4334f5e033c27445b6a52ac9ce82c663f160380808080808080808080808080" -------------------------------------------------------------------------------- /Truffle/scripts/devChain.js: -------------------------------------------------------------------------------- 1 | const { spawn } = require("child_process"); 2 | 3 | const run = () => { 4 | console.log("🚀 Starting local dev chain..."); 5 | try { 6 | spawn("ganache-cli -d --db data -i 1337 --port 7545", { 7 | shell: true, 8 | stdio: "inherit", 9 | }); 10 | } catch (e) { 11 | console.log(e); 12 | } 13 | }; 14 | run(); 15 | -------------------------------------------------------------------------------- /.env.local.example: -------------------------------------------------------------------------------- 1 | # Mandatory info for starting the app 2 | NEXT_PUBLIC_MORALIS_APPLICATION_ID = 3 | NEXT_PUBLIC_MORALIS_SERVER_URL = 4 | 5 | # Optional info for connecting your localChain and Moralis Database 6 | moralisApiKey = xxxxx 7 | moralisApiSecret = xxxxxxx 8 | frpcPath = F:\frpc\frpc.exe 9 | chain = ganache 10 | moralisSubdomain = xxxxxxx.usemoralis.com 11 | abiPath = ".\\truffle\build\contracts\Contract.json" 12 | -------------------------------------------------------------------------------- /data/!trie_db!0xa35a3f80ed8e4c7578383351268eb6912f9f04886154748e805f81e2513434f5: -------------------------------------------------------------------------------- 1 | "0xf8b1a04f8ac85f76698e8e6d89a93c6289c5d9fbf770f17f408507fb4934a85a3b3d60a035014d7f40e0d69c0e17af80d234ebd34745267637b18435f5c96ceb6575ad97a0b5c26fd7ffd148b8d789fbff6fb48ba94f7a213690a05cabc20150baedc3a0baa0c405f5c23177395c512bb32240f4334f5e033c27445b6a52ac9ce82c663f16038080808080a0fef353cbd1b475375fc608ccbc1ee0b24f6b6282efdf72a8e7cbd0944b355c8c80808080808080" -------------------------------------------------------------------------------- /data/!trie_db!0xa46c31ed72743f82f5c6f08b8c24869f5573b136a5068b585868ef3899f3b10a: -------------------------------------------------------------------------------- 1 | "0xf8b1a04f8ac85f76698e8e6d89a93c6289c5d9fbf770f17f408507fb4934a85a3b3d60a035014d7f40e0d69c0e17af80d234ebd34745267637b18435f5c96ceb6575ad97a0b5c26fd7ffd148b8d789fbff6fb48ba94f7a213690a05cabc20150baedc3a0baa0c405f5c23177395c512bb32240f4334f5e033c27445b6a52ac9ce82c663f16038080808080a0babf5f4cb3818cd560fc39c82a32be48f33e81414037aaba7195018865f8e14e80808080808080" -------------------------------------------------------------------------------- /Truffle/scripts/deployContract.js: -------------------------------------------------------------------------------- 1 | const { spawn } = require("child_process"); 2 | 3 | const run = async () => { 4 | console.log("📄 Deploying and updating contracts..."); 5 | try { 6 | spawn( 7 | "cd Truffle && truffle migrate --reset --compile-all --network develop && node scripts/contractInfo.js", 8 | { 9 | shell: true, 10 | stdio: "inherit", 11 | } 12 | ); 13 | } catch (e) { 14 | console.log(e); 15 | } 16 | }; 17 | run(); 18 | -------------------------------------------------------------------------------- /Truffle/contracts/Migrations.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.4.25 <0.7.0; 3 | 4 | contract Migrations { 5 | address public owner; 6 | uint public last_completed_migration; 7 | 8 | modifier restricted() { 9 | if (msg.sender == owner) _; 10 | } 11 | 12 | constructor() public { 13 | owner = msg.sender; 14 | } 15 | 16 | function setCompleted(uint completed) public restricted { 17 | last_completed_migration = completed; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /data/!trie_db!0xb03ac97afc708408787858fa34238c61db6d1fbef43e7dfc52fd576a62905d33: -------------------------------------------------------------------------------- 1 | "0xf8d1a04f8ac85f76698e8e6d89a93c6289c5d9fbf770f17f408507fb4934a85a3b3d60a035014d7f40e0d69c0e17af80d234ebd34745267637b18435f5c96ceb6575ad97a0b5c26fd7ffd148b8d789fbff6fb48ba94f7a213690a05cabc20150baedc3a0baa0c405f5c23177395c512bb32240f4334f5e033c27445b6a52ac9ce82c663f16038080808080a0babf5f4cb3818cd560fc39c82a32be48f33e81414037aaba7195018865f8e14ea02e19121b59afc8893fffc6f5aafa51c7e4cf2fb7e8c0b9de32f60534475d5920808080808080" -------------------------------------------------------------------------------- /src/hooks/useAPIContract.js: -------------------------------------------------------------------------------- 1 | import { useMoralisWeb3Api, useMoralisWeb3ApiCall } from "react-moralis"; 2 | 3 | export const useAPIContract = (options) => { 4 | const { native } = useMoralisWeb3Api(); 5 | 6 | const { 7 | fetch: runContractFunction, 8 | data: contractResponse, 9 | error, 10 | isLoading, 11 | } = useMoralisWeb3ApiCall(native.runContractFunction, { ...options }); 12 | 13 | return { runContractFunction, contractResponse, error, isLoading }; 14 | }; 15 | -------------------------------------------------------------------------------- /data/!trie_db!0x120169d23be359eb486d3045833d98b8b8ba70c46cb85230b61009e2ab021b3d: -------------------------------------------------------------------------------- 1 | "0xf8f1a04f8ac85f76698e8e6d89a93c6289c5d9fbf770f17f408507fb4934a85a3b3d60a035014d7f40e0d69c0e17af80d234ebd34745267637b18435f5c96ceb6575ad97a0b5c26fd7ffd148b8d789fbff6fb48ba94f7a213690a05cabc20150baedc3a0baa0c405f5c23177395c512bb32240f4334f5e033c27445b6a52ac9ce82c663f16038080808080a0babf5f4cb3818cd560fc39c82a32be48f33e81414037aaba7195018865f8e14ea02e19121b59afc8893fffc6f5aafa51c7e4cf2fb7e8c0b9de32f60534475d59208080a039e495c77a884486adeff235f317eac2cd8cf8ce2fd6615024a09b2e5790e123808080" -------------------------------------------------------------------------------- /src/components/Ramper.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | function Ramper({ ramper }) { 4 | return ( 5 |