├── front
├── Procfile
├── src
│ ├── react-app-env.d.ts
│ ├── assets
│ │ ├── ethlogo.png
│ │ └── polygonlogo.png
│ ├── setupTests.ts
│ ├── utils
│ │ └── networks.js
│ ├── index.css
│ ├── reportWebVitals.ts
│ ├── index.tsx
│ ├── components
│ │ ├── ConnectButton.tsx
│ │ ├── ConnectionStatus.tsx
│ │ ├── RecentlyMinted.tsx
│ │ └── Avatar.tsx
│ ├── logo.svg
│ ├── app.css
│ └── App.tsx
├── public
│ ├── robots.txt
│ ├── favicon.ico
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ └── index.html
├── tsconfig.json
├── package.json
└── README.md
├── .dockerignore
├── .prettierrc
├── contracts
├── artifacts
│ ├── hardhat
│ │ └── console.sol
│ │ │ ├── console.dbg.json
│ │ │ └── console.json
│ ├── contracts
│ │ └── libraries
│ │ │ ├── Base64.sol
│ │ │ ├── Base64.dbg.json
│ │ │ └── Base64.json
│ │ │ └── StringUtils.sol
│ │ │ ├── StringUtils.dbg.json
│ │ │ └── StringUtils.json
│ └── @openzeppelin
│ │ └── contracts
│ │ ├── utils
│ │ ├── Address.sol
│ │ │ ├── Address.dbg.json
│ │ │ └── Address.json
│ │ ├── Context.sol
│ │ │ ├── Context.dbg.json
│ │ │ └── Context.json
│ │ ├── Counters.sol
│ │ │ ├── Counters.dbg.json
│ │ │ └── Counters.json
│ │ ├── Strings.sol
│ │ │ ├── Strings.dbg.json
│ │ │ └── Strings.json
│ │ └── introspection
│ │ │ ├── ERC165.sol
│ │ │ ├── ERC165.dbg.json
│ │ │ └── ERC165.json
│ │ │ └── IERC165.sol
│ │ │ ├── IERC165.dbg.json
│ │ │ └── IERC165.json
│ │ └── token
│ │ └── ERC721
│ │ ├── ERC721.sol
│ │ ├── ERC721.dbg.json
│ │ └── ERC721.json
│ │ ├── IERC721.sol
│ │ ├── IERC721.dbg.json
│ │ └── IERC721.json
│ │ ├── IERC721Receiver.sol
│ │ ├── IERC721Receiver.dbg.json
│ │ └── IERC721Receiver.json
│ │ └── extensions
│ │ └── IERC721Metadata.sol
│ │ ├── IERC721Metadata.dbg.json
│ │ └── IERC721Metadata.json
├── package.json
├── README.md
├── hardhat.config.js
├── contracts
│ ├── libraries
│ │ ├── StringUtils.sol
│ │ └── Base64.sol
│ ├── ReverseDNS.sol
│ └── DNS.sol
├── scripts
│ ├── sample-script.js
│ ├── deploy.js
│ └── run.js
└── test
│ └── sample-test.js
├── nginx.conf
├── Dockerfile
├── .gitignore
├── README.md
└── .github
└── workflows
└── ci.yml
/front/Procfile:
--------------------------------------------------------------------------------
1 | web: bin/boot
--------------------------------------------------------------------------------
/front/src/react-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/front/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/front/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ekazukii/dns-polygon/HEAD/front/public/favicon.ico
--------------------------------------------------------------------------------
/front/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ekazukii/dns-polygon/HEAD/front/public/logo192.png
--------------------------------------------------------------------------------
/front/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ekazukii/dns-polygon/HEAD/front/public/logo512.png
--------------------------------------------------------------------------------
/front/src/assets/ethlogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ekazukii/dns-polygon/HEAD/front/src/assets/ethlogo.png
--------------------------------------------------------------------------------
/front/src/assets/polygonlogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ekazukii/dns-polygon/HEAD/front/src/assets/polygonlogo.png
--------------------------------------------------------------------------------
/.dockerignore:
--------------------------------------------------------------------------------
1 | contracts
2 | .env
3 | /front/node_modules
4 | /contracts/node_modules
5 | /contracts/cache
6 | /contracts/artifacts
7 | /contracts/build
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "trailingComma": "none",
3 | "tabWidth": 2,
4 | "semi": true,
5 | "singleQuote": true,
6 | "printWidth": 120,
7 | "arrowParens": "avoid"
8 | }
9 |
--------------------------------------------------------------------------------
/contracts/artifacts/hardhat/console.sol/console.dbg.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-dbg-1",
3 | "buildInfo": "../../build-info/6068a12a047154b2fff2a3bffa9e43d7.json"
4 | }
5 |
--------------------------------------------------------------------------------
/contracts/artifacts/contracts/libraries/Base64.sol/Base64.dbg.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-dbg-1",
3 | "buildInfo": "../../../build-info/6068a12a047154b2fff2a3bffa9e43d7.json"
4 | }
5 |
--------------------------------------------------------------------------------
/nginx.conf:
--------------------------------------------------------------------------------
1 | server {
2 | listen 80;
3 |
4 | location / {
5 | root /usr/share/nginx/html/;
6 | include /etc/nginx/mime.types;
7 | try_files $uri $uri/ /index.html;
8 | }
9 | }
--------------------------------------------------------------------------------
/contracts/artifacts/contracts/libraries/StringUtils.sol/StringUtils.dbg.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-dbg-1",
3 | "buildInfo": "../../../build-info/6068a12a047154b2fff2a3bffa9e43d7.json"
4 | }
5 |
--------------------------------------------------------------------------------
/contracts/artifacts/@openzeppelin/contracts/utils/Address.sol/Address.dbg.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-dbg-1",
3 | "buildInfo": "../../../../build-info/6068a12a047154b2fff2a3bffa9e43d7.json"
4 | }
5 |
--------------------------------------------------------------------------------
/contracts/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-dbg-1",
3 | "buildInfo": "../../../../build-info/6068a12a047154b2fff2a3bffa9e43d7.json"
4 | }
5 |
--------------------------------------------------------------------------------
/contracts/artifacts/@openzeppelin/contracts/utils/Counters.sol/Counters.dbg.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-dbg-1",
3 | "buildInfo": "../../../../build-info/6068a12a047154b2fff2a3bffa9e43d7.json"
4 | }
5 |
--------------------------------------------------------------------------------
/contracts/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.dbg.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-dbg-1",
3 | "buildInfo": "../../../../build-info/6068a12a047154b2fff2a3bffa9e43d7.json"
4 | }
5 |
--------------------------------------------------------------------------------
/contracts/artifacts/@openzeppelin/contracts/token/ERC721/ERC721.sol/ERC721.dbg.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-dbg-1",
3 | "buildInfo": "../../../../../build-info/6068a12a047154b2fff2a3bffa9e43d7.json"
4 | }
5 |
--------------------------------------------------------------------------------
/contracts/artifacts/@openzeppelin/contracts/token/ERC721/IERC721.sol/IERC721.dbg.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-dbg-1",
3 | "buildInfo": "../../../../../build-info/6068a12a047154b2fff2a3bffa9e43d7.json"
4 | }
5 |
--------------------------------------------------------------------------------
/contracts/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.dbg.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-dbg-1",
3 | "buildInfo": "../../../../../build-info/6068a12a047154b2fff2a3bffa9e43d7.json"
4 | }
5 |
--------------------------------------------------------------------------------
/contracts/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.dbg.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-dbg-1",
3 | "buildInfo": "../../../../../build-info/6068a12a047154b2fff2a3bffa9e43d7.json"
4 | }
5 |
--------------------------------------------------------------------------------
/contracts/artifacts/@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol/IERC721Receiver.dbg.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-dbg-1",
3 | "buildInfo": "../../../../../build-info/6068a12a047154b2fff2a3bffa9e43d7.json"
4 | }
5 |
--------------------------------------------------------------------------------
/contracts/artifacts/@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol/IERC721Metadata.dbg.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-dbg-1",
3 | "buildInfo": "../../../../../../build-info/6068a12a047154b2fff2a3bffa9e43d7.json"
4 | }
5 |
--------------------------------------------------------------------------------
/front/src/setupTests.ts:
--------------------------------------------------------------------------------
1 | // jest-dom adds custom jest matchers for asserting on DOM nodes.
2 | // allows you to do things like:
3 | // expect(element).toHaveTextContent(/react/i)
4 | // learn more: https://github.com/testing-library/jest-dom
5 | import '@testing-library/jest-dom';
6 |
--------------------------------------------------------------------------------
/contracts/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-artifact-1",
3 | "contractName": "Context",
4 | "sourceName": "@openzeppelin/contracts/utils/Context.sol",
5 | "abi": [],
6 | "bytecode": "0x",
7 | "deployedBytecode": "0x",
8 | "linkReferences": {},
9 | "deployedLinkReferences": {}
10 | }
11 |
--------------------------------------------------------------------------------
/front/src/utils/networks.js:
--------------------------------------------------------------------------------
1 | /* prettier-ignore */
2 | const networks = {
3 | "1": "Mainnet",
4 | "3": "Ropsten",
5 | "2a": "Kovan",
6 | "4": "Rinkeby",
7 | "5": "Goerli",
8 | "61": "BSC Testnet",
9 | "38": "BSC Mainnet",
10 | "89": "Polygon Mainnet",
11 | "13881": "Polygon Mumbai Testnet",
12 | "a86a": "AVAX Mainnet",
13 | }
14 |
15 | export { networks };
16 |
--------------------------------------------------------------------------------
/contracts/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "hardhat-project",
3 | "devDependencies": {
4 | "@nomiclabs/hardhat-ethers": "^2.0.5",
5 | "@nomiclabs/hardhat-waffle": "^2.0.2",
6 | "chai": "^4.3.6",
7 | "ethereum-waffle": "^3.4.0",
8 | "ethers": "^5.5.4",
9 | "hardhat": "^2.8.4",
10 | "@openzeppelin/contracts": "^4.5.0"
11 | },
12 | "dependencies": {
13 | "dotenv": "^16.0.0"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/front/src/index.css:
--------------------------------------------------------------------------------
1 | /* You can add global styles to this file, and also import other style files */
2 | body {
3 | margin: 0;
4 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans',
5 | 'Droid Sans', 'Helvetica Neue', sans-serif;
6 | -webkit-font-smoothing: antialiased;
7 | -moz-osx-font-smoothing: grayscale;
8 | }
9 |
10 | code {
11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;
12 | }
13 |
--------------------------------------------------------------------------------
/front/src/reportWebVitals.ts:
--------------------------------------------------------------------------------
1 | import { ReportHandler } from 'web-vitals';
2 |
3 | const reportWebVitals = (onPerfEntry?: ReportHandler) => {
4 | if (onPerfEntry && onPerfEntry instanceof Function) {
5 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
6 | getCLS(onPerfEntry);
7 | getFID(onPerfEntry);
8 | getFCP(onPerfEntry);
9 | getLCP(onPerfEntry);
10 | getTTFB(onPerfEntry);
11 | });
12 | }
13 | };
14 |
15 | export default reportWebVitals;
16 |
--------------------------------------------------------------------------------
/contracts/README.md:
--------------------------------------------------------------------------------
1 | # Basic Sample Hardhat Project
2 |
3 | This project demonstrates a basic Hardhat use case. It comes with a sample contract, a test for that contract, a sample script that deploys that contract, and an example of a task implementation, which simply lists the available accounts.
4 |
5 | Try running some of the following tasks:
6 |
7 | ```shell
8 | npx hardhat accounts
9 | npx hardhat compile
10 | npx hardhat clean
11 | npx hardhat test
12 | npx hardhat node
13 | node scripts/sample-script.js
14 | npx hardhat help
15 | ```
16 |
--------------------------------------------------------------------------------
/front/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/front/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "lib": [
5 | "dom",
6 | "dom.iterable",
7 | "esnext"
8 | ],
9 | "allowJs": true,
10 | "skipLibCheck": true,
11 | "esModuleInterop": true,
12 | "allowSyntheticDefaultImports": true,
13 | "strict": true,
14 | "forceConsistentCasingInFileNames": true,
15 | "noFallthroughCasesInSwitch": true,
16 | "module": "esnext",
17 | "moduleResolution": "node",
18 | "resolveJsonModule": true,
19 | "isolatedModules": true,
20 | "noEmit": true,
21 | "jsx": "react-jsx"
22 | },
23 | "include": [
24 | "src"
25 | ]
26 | }
27 |
--------------------------------------------------------------------------------
/front/src/index.tsx:
--------------------------------------------------------------------------------
1 | import { StrictMode } from 'react';
2 | import * as ReactDOM from 'react-dom';
3 | import App from './App';
4 | import './index.css';
5 | import { Web3ReactProvider } from '@web3-react/core';
6 | import { Web3Provider } from '@ethersproject/providers';
7 |
8 | function getLibrary(provider: any, connector: any) {
9 | return new Web3Provider(provider); // this will vary according to whether you use e.g. ethers or web3.js
10 | }
11 |
12 | ReactDOM.render(
13 |
14 |
15 |
16 |
17 | ,
18 |
19 | document.getElementById('root')
20 | );
21 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:16-alpine AS builder
2 | ENV NODE_ENV production
3 | # Add a work directory
4 | WORKDIR /app
5 | # Cache and Install dependencies
6 | COPY ./front/package*.json ./
7 |
8 | RUN npm install --production
9 | # Copy app files
10 | COPY ./front .
11 | # Build the app
12 | RUN npm run build
13 |
14 | # Bundle static assets with nginx
15 | FROM nginx:1.21.0-alpine as production
16 | ENV NODE_ENV production
17 | # Copy built assets from builder
18 | COPY --from=builder /app/build /usr/share/nginx/html
19 | # Add your nginx.conf
20 | COPY nginx.conf /etc/nginx/conf.d/default.conf
21 | # Expose port
22 | EXPOSE 80
23 | # Start nginx
24 | CMD ["nginx", "-g", "daemon off;"]
--------------------------------------------------------------------------------
/front/src/components/ConnectButton.tsx:
--------------------------------------------------------------------------------
1 | import { useWeb3React } from '@web3-react/core';
2 | import { InjectedConnector } from '@web3-react/injected-connector';
3 | const MetaMask = new InjectedConnector({});
4 |
5 | export default function ConnectButton() {
6 | const { activate } = useWeb3React();
7 |
8 | return (
9 |
10 |

11 |
19 |
20 | );
21 | }
22 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 |
8 | # dependencies
9 | /node_modules
10 |
11 | # IDEs and editors
12 | /.idea
13 | .project
14 | .classpath
15 | .c9/
16 | *.launch
17 | .settings/
18 | *.sublime-workspace
19 |
20 | # IDE - VSCode
21 | .vscode/*
22 | !.vscode/settings.json
23 | !.vscode/tasks.json
24 | !.vscode/launch.json
25 | !.vscode/extensions.json
26 |
27 | # misc
28 | /.sass-cache
29 | /connect.lock
30 | /coverage
31 | /libpeerconnection.log
32 | npm-debug.log
33 | yarn-error.log
34 | testem.log
35 | /typings
36 |
37 | # System Files
38 | .DS_Store
39 | Thumbs.db
40 |
41 | .env
42 | /front/node_modules
43 | /contracts/node_modules
44 | /contracts/cache
45 | /contracts/artifacts
--------------------------------------------------------------------------------
/contracts/artifacts/hardhat/console.sol/console.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-artifact-1",
3 | "contractName": "console",
4 | "sourceName": "hardhat/console.sol",
5 | "abi": [],
6 | "bytecode": "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ce5564a08297d58866847dbc3f50121e4f85c5ad3c25df0fb588222aef2a375364736f6c634300080a0033",
7 | "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ce5564a08297d58866847dbc3f50121e4f85c5ad3c25df0fb588222aef2a375364736f6c634300080a0033",
8 | "linkReferences": {},
9 | "deployedLinkReferences": {}
10 | }
11 |
--------------------------------------------------------------------------------
/contracts/artifacts/contracts/libraries/Base64.sol/Base64.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-artifact-1",
3 | "contractName": "Base64",
4 | "sourceName": "contracts/libraries/Base64.sol",
5 | "abi": [],
6 | "bytecode": "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212201a3626b945606a195ed69d5ab2b9b62dd73dc5606a4c7993f2d9d1e91111df7564736f6c634300080a0033",
7 | "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212201a3626b945606a195ed69d5ab2b9b62dd73dc5606a4c7993f2d9d1e91111df7564736f6c634300080a0033",
8 | "linkReferences": {},
9 | "deployedLinkReferences": {}
10 | }
11 |
--------------------------------------------------------------------------------
/contracts/artifacts/@openzeppelin/contracts/utils/Address.sol/Address.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-artifact-1",
3 | "contractName": "Address",
4 | "sourceName": "@openzeppelin/contracts/utils/Address.sol",
5 | "abi": [],
6 | "bytecode": "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212207e564383d47c24e1390e247e28081a8f95054095b42911da50336bcd436d490b64736f6c634300080a0033",
7 | "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212207e564383d47c24e1390e247e28081a8f95054095b42911da50336bcd436d490b64736f6c634300080a0033",
8 | "linkReferences": {},
9 | "deployedLinkReferences": {}
10 | }
11 |
--------------------------------------------------------------------------------
/contracts/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-artifact-1",
3 | "contractName": "Strings",
4 | "sourceName": "@openzeppelin/contracts/utils/Strings.sol",
5 | "abi": [],
6 | "bytecode": "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122099440b9b22744aa6daceac37707dcdde1a8e218f31caf469f99b45f1cbcc599864736f6c634300080a0033",
7 | "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122099440b9b22744aa6daceac37707dcdde1a8e218f31caf469f99b45f1cbcc599864736f6c634300080a0033",
8 | "linkReferences": {},
9 | "deployedLinkReferences": {}
10 | }
11 |
--------------------------------------------------------------------------------
/contracts/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-artifact-1",
3 | "contractName": "ERC165",
4 | "sourceName": "@openzeppelin/contracts/utils/introspection/ERC165.sol",
5 | "abi": [
6 | {
7 | "inputs": [
8 | {
9 | "internalType": "bytes4",
10 | "name": "interfaceId",
11 | "type": "bytes4"
12 | }
13 | ],
14 | "name": "supportsInterface",
15 | "outputs": [
16 | {
17 | "internalType": "bool",
18 | "name": "",
19 | "type": "bool"
20 | }
21 | ],
22 | "stateMutability": "view",
23 | "type": "function"
24 | }
25 | ],
26 | "bytecode": "0x",
27 | "deployedBytecode": "0x",
28 | "linkReferences": {},
29 | "deployedLinkReferences": {}
30 | }
31 |
--------------------------------------------------------------------------------
/contracts/artifacts/contracts/libraries/StringUtils.sol/StringUtils.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-artifact-1",
3 | "contractName": "StringUtils",
4 | "sourceName": "contracts/libraries/StringUtils.sol",
5 | "abi": [],
6 | "bytecode": "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212204d7290c6904ec1b8f7dec6209f3308ffbc1c6c0be1925e4c6043fbb0184758de64736f6c634300080a0033",
7 | "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212204d7290c6904ec1b8f7dec6209f3308ffbc1c6c0be1925e4c6043fbb0184758de64736f6c634300080a0033",
8 | "linkReferences": {},
9 | "deployedLinkReferences": {}
10 | }
11 |
--------------------------------------------------------------------------------
/contracts/artifacts/@openzeppelin/contracts/utils/Counters.sol/Counters.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-artifact-1",
3 | "contractName": "Counters",
4 | "sourceName": "@openzeppelin/contracts/utils/Counters.sol",
5 | "abi": [],
6 | "bytecode": "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212209c37a22096dfabcd60bf04148ba116a5b8e68a87d89f97e1d8f0e19469871ce064736f6c634300080a0033",
7 | "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212209c37a22096dfabcd60bf04148ba116a5b8e68a87d89f97e1d8f0e19469871ce064736f6c634300080a0033",
8 | "linkReferences": {},
9 | "deployedLinkReferences": {}
10 | }
11 |
--------------------------------------------------------------------------------
/contracts/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-artifact-1",
3 | "contractName": "IERC165",
4 | "sourceName": "@openzeppelin/contracts/utils/introspection/IERC165.sol",
5 | "abi": [
6 | {
7 | "inputs": [
8 | {
9 | "internalType": "bytes4",
10 | "name": "interfaceId",
11 | "type": "bytes4"
12 | }
13 | ],
14 | "name": "supportsInterface",
15 | "outputs": [
16 | {
17 | "internalType": "bool",
18 | "name": "",
19 | "type": "bool"
20 | }
21 | ],
22 | "stateMutability": "view",
23 | "type": "function"
24 | }
25 | ],
26 | "bytecode": "0x",
27 | "deployedBytecode": "0x",
28 | "linkReferences": {},
29 | "deployedLinkReferences": {}
30 | }
31 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # HODL name service
2 |
3 | Domain name service on the polygon network, mint your .hodl domain as an ERC721 which will bind the domain to your address and set records for your website, email, twitter tag and set a description and avatar
4 |
5 | 
6 |
7 | ## Demo
8 |
9 | Mumbai tesnet contract address -> 0x4f088e4aeb62ec260254850be255859d839f77db
10 | You can check the [demo webapp](https://hns.ekazuki.fr) deployed on the testnet
11 | You can browses minted ERC721 on [opensea](https://testnets.opensea.io/collection/hodl-name-service-uczxjenft4)
12 | ## Features
13 |
14 | - Mint an ERC721
15 | - Bind your website, email, twitter to your domain
16 | - Edit avatar records to change the ERC721 image
17 | - Browse domains on the webapp
18 |
--------------------------------------------------------------------------------
/.github/workflows/ci.yml:
--------------------------------------------------------------------------------
1 | name: ci
2 |
3 | on:
4 | push:
5 | branches:
6 | - main
7 |
8 | jobs:
9 | docker:
10 | runs-on: ubuntu-latest
11 | steps:
12 | -
13 | name: Checkout
14 | uses: actions/checkout@v3
15 |
16 | -
17 | name: Login to GitHub Container Registry
18 | uses: docker/login-action@v3
19 | with:
20 | registry: ghcr.io
21 | username: ${{ github.actor }}
22 | password: ${{ secrets.GITHUB_TOKEN }}
23 |
24 | -
25 | name: Build and push
26 | uses: docker/build-push-action@v3
27 | with:
28 | context: .
29 | file: ./Dockerfile
30 | push: true
31 | tags: |
32 | ghcr.io/${{ github.repository_owner }}/hns:latest
33 | ghcr.io/${{ github.repository_owner }}/hns:${{ github.ref_name }}
34 |
--------------------------------------------------------------------------------
/contracts/hardhat.config.js:
--------------------------------------------------------------------------------
1 | require('@nomiclabs/hardhat-waffle');
2 | const path = require('path');
3 | require('dotenv').config({ path: path.resolve(__dirname, '.env') });
4 |
5 | // This is a sample Hardhat task. To learn how to create your own go to
6 | // https://hardhat.org/guides/create-task.html
7 | task('accounts', 'Prints the list of accounts', async (taskArgs, hre) => {
8 | const accounts = await hre.ethers.getSigners();
9 |
10 | for (const account of accounts) {
11 | console.log(account.address);
12 | }
13 | });
14 |
15 | // You need to export an object to set up your config
16 | // Go to https://hardhat.org/config/ to learn more
17 |
18 | /**
19 | * @type import('hardhat/config').HardhatUserConfig
20 | */
21 | module.exports = {
22 | solidity: '0.8.10',
23 | networks: {
24 | mumbai: {
25 | url: 'https://polygon-mumbai.g.alchemy.com/v2/iy2Py0NX46ZqzbySWrBJ2Ew7sPz2s8Vf',
26 | accounts: [process.env.KEY]
27 | }
28 | }
29 | };
30 |
--------------------------------------------------------------------------------
/contracts/contracts/libraries/StringUtils.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // Source:
3 | // https://github.com/ensdomains/ens-contracts/blob/master/contracts/ethregistrar/StringUtils.sol
4 | pragma solidity >=0.8.4;
5 |
6 | library StringUtils {
7 | /**
8 | * @dev Returns the length of a given string
9 | *
10 | * @param s The string to measure the length of
11 | * @return The length of the input string
12 | */
13 | function strlen(string memory s) internal pure returns (uint) {
14 | uint len;
15 | uint i = 0;
16 | uint bytelength = bytes(s).length;
17 | for(len = 0; i < bytelength; len++) {
18 | bytes1 b = bytes(s)[i];
19 | if(b < 0x80) {
20 | i += 1;
21 | } else if (b < 0xE0) {
22 | i += 2;
23 | } else if (b < 0xF0) {
24 | i += 3;
25 | } else if (b < 0xF8) {
26 | i += 4;
27 | } else if (b < 0xFC) {
28 | i += 5;
29 | } else {
30 | i += 6;
31 | }
32 | }
33 | return len;
34 | }
35 | }
--------------------------------------------------------------------------------
/contracts/scripts/sample-script.js:
--------------------------------------------------------------------------------
1 | // We require the Hardhat Runtime Environment explicitly here. This is optional
2 | // but useful for running the script in a standalone fashion through `node