From 0dd85a7fa729451549471d9ca7febd2409d0c9a8 Mon Sep 17 00:00:00 2001 From: "denjohn@qq.com" <371363622@qq.com> Date: Wed, 21 Feb 2024 18:46:57 +0800 Subject: [PATCH] copy from scaffold --- .github/ISSUE_TEMPLATE/bug_report.yml | 58 + .github/ISSUE_TEMPLATE/config.yml | 8 + .github/pull_request_template.md | 16 + .github/workflows/lint.yaml | 43 + .gitignore | 141 +- .husky/pre-commit | 4 + .lintstagedrc.js | 21 + .yarn/plugins/@yarnpkg/plugin-typescript.cjs | 9 + .yarn/releases/yarn-3.2.3.cjs | 783 + .yarnrc.yml | 11 + CONTRIBUTING.md | 86 + LICENCE | 21 + README.md | 80 + package.json | 42 + packages/hardhat/.env.example | 11 + packages/hardhat/.eslintignore | 8 + packages/hardhat/.eslintrc.json | 17 + packages/hardhat/.gitignore | 17 + packages/hardhat/.prettierrc.json | 19 + packages/hardhat/contracts/NFTMintDN404.sol | 147 + packages/hardhat/contracts/SimpleDN404.sol | 62 + .../hardhat/deploy/00_deploy_your_contract.ts | 49 + .../hardhat/deploy/01_deploy_your_contract.ts | 50 + packages/hardhat/deploy/99_generateTsAbis.ts | 133 + packages/hardhat/hardhat.config.ts | 145 + packages/hardhat/package.json | 54 + packages/hardhat/scripts/generateAccount.ts | 45 + packages/hardhat/scripts/listAccount.ts | 42 + packages/hardhat/test/YourContract.ts | 28 + packages/hardhat/tsconfig.json | 10 + packages/nextjs/.env.example | 13 + packages/nextjs/.eslintignore | 11 + packages/nextjs/.eslintrc.json | 15 + packages/nextjs/.gitignore | 38 + packages/nextjs/.npmrc | 1 + packages/nextjs/.prettierrc.json | 8 + .../_components/AddressCodeTab.tsx | 25 + .../_components/AddressComponent.tsx | 35 + .../_components/AddressLogsTab.tsx | 21 + .../_components/AddressStorageTab.tsx | 61 + .../blockexplorer/_components/BackButton.tsx | 12 + .../_components/ContractTabs.tsx | 92 + .../_components/PaginationButton.tsx | 39 + .../blockexplorer/_components/SearchBar.tsx | 49 + .../_components/TransactionHash.tsx | 39 + .../_components/TransactionsTable.tsx | 71 + .../app/blockexplorer/_components/index.tsx | 7 + .../blockexplorer/address/[address]/page.tsx | 85 + packages/nextjs/app/blockexplorer/layout.tsx | 12 + packages/nextjs/app/blockexplorer/page.tsx | 62 + .../transaction/[txHash]/page.tsx | 153 + .../app/debug/_components/DebugContracts.tsx | 66 + .../_components/contract/ContractInput.tsx | 84 + .../contract/ContractReadMethods.tsx | 43 + .../debug/_components/contract/ContractUI.tsx | 103 + .../contract/ContractVariables.tsx | 50 + .../contract/ContractWriteMethods.tsx | 49 + .../_components/contract/DisplayVariable.tsx | 73 + .../contract/InheritanceTooltip.tsx | 14 + .../contract/ReadOnlyFunctionForm.tsx | 93 + .../app/debug/_components/contract/Tuple.tsx | 44 + .../debug/_components/contract/TupleArray.tsx | 139 + .../debug/_components/contract/TxReceipt.tsx | 48 + .../contract/WriteOnlyFunctionForm.tsx | 145 + .../app/debug/_components/contract/index.tsx | 8 + .../_components/contract/utilsContract.tsx | 149 + .../_components/contract/utilsDisplay.tsx | 56 + packages/nextjs/app/debug/page.tsx | 28 + packages/nextjs/app/layout.tsx | 57 + packages/nextjs/app/page.tsx | 71 + packages/nextjs/components/Footer.tsx | 80 + packages/nextjs/components/Header.tsx | 110 + .../ScaffoldEthAppWithProviders.tsx | 60 + packages/nextjs/components/SwitchTheme.tsx | 44 + packages/nextjs/components/ThemeProvider.tsx | 9 + .../components/assets/BuidlGuidlLogo.tsx | 18 + .../components/scaffold-eth/Address.tsx | 136 + .../components/scaffold-eth/Balance.tsx | 67 + .../components/scaffold-eth/BlockieAvatar.tsx | 17 + .../nextjs/components/scaffold-eth/Faucet.tsx | 132 + .../components/scaffold-eth/FaucetButton.tsx | 71 + .../scaffold-eth/Input/AddressInput.tsx | 90 + .../scaffold-eth/Input/Bytes32Input.tsx | 30 + .../scaffold-eth/Input/BytesInput.tsx | 27 + .../scaffold-eth/Input/EtherInput.tsx | 134 + .../scaffold-eth/Input/InputBase.tsx | 49 + .../scaffold-eth/Input/IntegerInput.tsx | 64 + .../components/scaffold-eth/Input/index.ts | 9 + .../components/scaffold-eth/Input/utils.ts | 111 + .../components/scaffold-eth/ProgressBar.tsx | 72 + .../AddressInfoDropdown.tsx | 136 + .../AddressQRCodeModal.tsx | 33 + .../NetworkOptions.tsx | 48 + .../WrongNetworkDropdown.tsx | 32 + .../RainbowKitCustomConnectButton/index.tsx | 68 + .../nextjs/components/scaffold-eth/index.tsx | 7 + .../nextjs/contracts/deployedContracts.ts | 636 + .../nextjs/contracts/externalContracts.ts | 16 + packages/nextjs/hooks/scaffold-eth/index.ts | 16 + .../hooks/scaffold-eth/useAccountBalance.ts | 36 + .../hooks/scaffold-eth/useAnimationConfig.ts | 20 + .../hooks/scaffold-eth/useAutoConnect.ts | 82 + .../hooks/scaffold-eth/useBurnerWallet.ts | 143 + .../hooks/scaffold-eth/useContractLogs.ts | 37 + .../scaffold-eth/useDeployedContractInfo.ts | 46 + .../hooks/scaffold-eth/useFetchBlocks.ts | 133 + .../scaffold-eth/useNativeCurrencyPrice.ts | 34 + .../hooks/scaffold-eth/useNetworkColor.ts | 22 + .../hooks/scaffold-eth/useOutsideClick.ts | 23 + .../hooks/scaffold-eth/useScaffoldContract.ts | 49 + .../scaffold-eth/useScaffoldContractRead.ts | 48 + .../scaffold-eth/useScaffoldContractWrite.ts | 103 + .../scaffold-eth/useScaffoldEventHistory.ts | 184 + .../useScaffoldEventSubscriber.ts | 38 + .../hooks/scaffold-eth/useTargetNetwork.ts | 29 + .../hooks/scaffold-eth/useTransactor.tsx | 105 + packages/nextjs/next-env.d.ts | 5 + packages/nextjs/next.config.js | 19 + packages/nextjs/package.json | 57 + packages/nextjs/postcss.config.js | 6 + packages/nextjs/public/favicon.png | Bin 0 -> 5745 bytes packages/nextjs/public/logo.svg | 10 + packages/nextjs/public/manifest.json | 5 + packages/nextjs/public/thumbnail.jpg | Bin 0 -> 19855 bytes packages/nextjs/scaffold.config.ts | 43 + packages/nextjs/services/store/store.ts | 26 + .../web3/wagmi-burner/BurnerConnector.ts | 155 + .../wagmi-burner/BurnerConnectorErrors.ts | 23 + .../web3/wagmi-burner/BurnerConnectorTypes.ts | 10 + .../web3/wagmi-burner/burnerWalletConfig.ts | 39 + packages/nextjs/services/web3/wagmiConfig.tsx | 8 + .../nextjs/services/web3/wagmiConnectors.tsx | 76 + packages/nextjs/styles/globals.css | 32 + packages/nextjs/tailwind.config.js | 86 + packages/nextjs/tsconfig.json | 28 + packages/nextjs/types/abitype/abi.d.ts | 15 + packages/nextjs/types/utils.ts | 3 + packages/nextjs/utils/scaffold-eth/block.ts | 17 + packages/nextjs/utils/scaffold-eth/common.ts | 3 + .../nextjs/utils/scaffold-eth/contract.ts | 295 + .../utils/scaffold-eth/contractsData.ts | 7 + .../nextjs/utils/scaffold-eth/decodeTxData.ts | 59 + .../scaffold-eth/fetchPriceFromUniswap.ts | 71 + .../nextjs/utils/scaffold-eth/getMetadata.ts | 34 + .../utils/scaffold-eth/getParsedError.ts | 31 + packages/nextjs/utils/scaffold-eth/index.ts | 6 + .../nextjs/utils/scaffold-eth/networks.ts | 112 + .../utils/scaffold-eth/notification.tsx | 90 + yarn.lock | 14804 ++++++++++++++++ 149 files changed, 23829 insertions(+), 129 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/lint.yaml create mode 100644 .husky/pre-commit create mode 100644 .lintstagedrc.js create mode 100644 .yarn/plugins/@yarnpkg/plugin-typescript.cjs create mode 100644 .yarn/releases/yarn-3.2.3.cjs create mode 100644 .yarnrc.yml create mode 100644 CONTRIBUTING.md create mode 100644 LICENCE create mode 100644 README.md create mode 100644 package.json create mode 100644 packages/hardhat/.env.example create mode 100644 packages/hardhat/.eslintignore create mode 100644 packages/hardhat/.eslintrc.json create mode 100644 packages/hardhat/.gitignore create mode 100644 packages/hardhat/.prettierrc.json create mode 100644 packages/hardhat/contracts/NFTMintDN404.sol create mode 100644 packages/hardhat/contracts/SimpleDN404.sol create mode 100644 packages/hardhat/deploy/00_deploy_your_contract.ts create mode 100644 packages/hardhat/deploy/01_deploy_your_contract.ts create mode 100644 packages/hardhat/deploy/99_generateTsAbis.ts create mode 100644 packages/hardhat/hardhat.config.ts create mode 100644 packages/hardhat/package.json create mode 100644 packages/hardhat/scripts/generateAccount.ts create mode 100644 packages/hardhat/scripts/listAccount.ts create mode 100644 packages/hardhat/test/YourContract.ts create mode 100644 packages/hardhat/tsconfig.json create mode 100644 packages/nextjs/.env.example create mode 100644 packages/nextjs/.eslintignore create mode 100644 packages/nextjs/.eslintrc.json create mode 100644 packages/nextjs/.gitignore create mode 100644 packages/nextjs/.npmrc create mode 100644 packages/nextjs/.prettierrc.json create mode 100644 packages/nextjs/app/blockexplorer/_components/AddressCodeTab.tsx create mode 100644 packages/nextjs/app/blockexplorer/_components/AddressComponent.tsx create mode 100644 packages/nextjs/app/blockexplorer/_components/AddressLogsTab.tsx create mode 100644 packages/nextjs/app/blockexplorer/_components/AddressStorageTab.tsx create mode 100644 packages/nextjs/app/blockexplorer/_components/BackButton.tsx create mode 100644 packages/nextjs/app/blockexplorer/_components/ContractTabs.tsx create mode 100644 packages/nextjs/app/blockexplorer/_components/PaginationButton.tsx create mode 100644 packages/nextjs/app/blockexplorer/_components/SearchBar.tsx create mode 100644 packages/nextjs/app/blockexplorer/_components/TransactionHash.tsx create mode 100644 packages/nextjs/app/blockexplorer/_components/TransactionsTable.tsx create mode 100644 packages/nextjs/app/blockexplorer/_components/index.tsx create mode 100644 packages/nextjs/app/blockexplorer/address/[address]/page.tsx create mode 100644 packages/nextjs/app/blockexplorer/layout.tsx create mode 100644 packages/nextjs/app/blockexplorer/page.tsx create mode 100644 packages/nextjs/app/blockexplorer/transaction/[txHash]/page.tsx create mode 100644 packages/nextjs/app/debug/_components/DebugContracts.tsx create mode 100644 packages/nextjs/app/debug/_components/contract/ContractInput.tsx create mode 100644 packages/nextjs/app/debug/_components/contract/ContractReadMethods.tsx create mode 100644 packages/nextjs/app/debug/_components/contract/ContractUI.tsx create mode 100644 packages/nextjs/app/debug/_components/contract/ContractVariables.tsx create mode 100644 packages/nextjs/app/debug/_components/contract/ContractWriteMethods.tsx create mode 100644 packages/nextjs/app/debug/_components/contract/DisplayVariable.tsx create mode 100644 packages/nextjs/app/debug/_components/contract/InheritanceTooltip.tsx create mode 100644 packages/nextjs/app/debug/_components/contract/ReadOnlyFunctionForm.tsx create mode 100644 packages/nextjs/app/debug/_components/contract/Tuple.tsx create mode 100644 packages/nextjs/app/debug/_components/contract/TupleArray.tsx create mode 100644 packages/nextjs/app/debug/_components/contract/TxReceipt.tsx create mode 100644 packages/nextjs/app/debug/_components/contract/WriteOnlyFunctionForm.tsx create mode 100644 packages/nextjs/app/debug/_components/contract/index.tsx create mode 100644 packages/nextjs/app/debug/_components/contract/utilsContract.tsx create mode 100644 packages/nextjs/app/debug/_components/contract/utilsDisplay.tsx create mode 100644 packages/nextjs/app/debug/page.tsx create mode 100644 packages/nextjs/app/layout.tsx create mode 100644 packages/nextjs/app/page.tsx create mode 100644 packages/nextjs/components/Footer.tsx create mode 100644 packages/nextjs/components/Header.tsx create mode 100644 packages/nextjs/components/ScaffoldEthAppWithProviders.tsx create mode 100644 packages/nextjs/components/SwitchTheme.tsx create mode 100644 packages/nextjs/components/ThemeProvider.tsx create mode 100644 packages/nextjs/components/assets/BuidlGuidlLogo.tsx create mode 100644 packages/nextjs/components/scaffold-eth/Address.tsx create mode 100644 packages/nextjs/components/scaffold-eth/Balance.tsx create mode 100644 packages/nextjs/components/scaffold-eth/BlockieAvatar.tsx create mode 100644 packages/nextjs/components/scaffold-eth/Faucet.tsx create mode 100644 packages/nextjs/components/scaffold-eth/FaucetButton.tsx create mode 100644 packages/nextjs/components/scaffold-eth/Input/AddressInput.tsx create mode 100644 packages/nextjs/components/scaffold-eth/Input/Bytes32Input.tsx create mode 100644 packages/nextjs/components/scaffold-eth/Input/BytesInput.tsx create mode 100644 packages/nextjs/components/scaffold-eth/Input/EtherInput.tsx create mode 100644 packages/nextjs/components/scaffold-eth/Input/InputBase.tsx create mode 100644 packages/nextjs/components/scaffold-eth/Input/IntegerInput.tsx create mode 100644 packages/nextjs/components/scaffold-eth/Input/index.ts create mode 100644 packages/nextjs/components/scaffold-eth/Input/utils.ts create mode 100644 packages/nextjs/components/scaffold-eth/ProgressBar.tsx create mode 100644 packages/nextjs/components/scaffold-eth/RainbowKitCustomConnectButton/AddressInfoDropdown.tsx create mode 100644 packages/nextjs/components/scaffold-eth/RainbowKitCustomConnectButton/AddressQRCodeModal.tsx create mode 100644 packages/nextjs/components/scaffold-eth/RainbowKitCustomConnectButton/NetworkOptions.tsx create mode 100644 packages/nextjs/components/scaffold-eth/RainbowKitCustomConnectButton/WrongNetworkDropdown.tsx create mode 100644 packages/nextjs/components/scaffold-eth/RainbowKitCustomConnectButton/index.tsx create mode 100644 packages/nextjs/components/scaffold-eth/index.tsx create mode 100644 packages/nextjs/contracts/deployedContracts.ts create mode 100644 packages/nextjs/contracts/externalContracts.ts create mode 100644 packages/nextjs/hooks/scaffold-eth/index.ts create mode 100644 packages/nextjs/hooks/scaffold-eth/useAccountBalance.ts create mode 100644 packages/nextjs/hooks/scaffold-eth/useAnimationConfig.ts create mode 100644 packages/nextjs/hooks/scaffold-eth/useAutoConnect.ts create mode 100644 packages/nextjs/hooks/scaffold-eth/useBurnerWallet.ts create mode 100644 packages/nextjs/hooks/scaffold-eth/useContractLogs.ts create mode 100644 packages/nextjs/hooks/scaffold-eth/useDeployedContractInfo.ts create mode 100644 packages/nextjs/hooks/scaffold-eth/useFetchBlocks.ts create mode 100644 packages/nextjs/hooks/scaffold-eth/useNativeCurrencyPrice.ts create mode 100644 packages/nextjs/hooks/scaffold-eth/useNetworkColor.ts create mode 100644 packages/nextjs/hooks/scaffold-eth/useOutsideClick.ts create mode 100644 packages/nextjs/hooks/scaffold-eth/useScaffoldContract.ts create mode 100644 packages/nextjs/hooks/scaffold-eth/useScaffoldContractRead.ts create mode 100644 packages/nextjs/hooks/scaffold-eth/useScaffoldContractWrite.ts create mode 100644 packages/nextjs/hooks/scaffold-eth/useScaffoldEventHistory.ts create mode 100644 packages/nextjs/hooks/scaffold-eth/useScaffoldEventSubscriber.ts create mode 100644 packages/nextjs/hooks/scaffold-eth/useTargetNetwork.ts create mode 100644 packages/nextjs/hooks/scaffold-eth/useTransactor.tsx create mode 100644 packages/nextjs/next-env.d.ts create mode 100644 packages/nextjs/next.config.js create mode 100644 packages/nextjs/package.json create mode 100644 packages/nextjs/postcss.config.js create mode 100644 packages/nextjs/public/favicon.png create mode 100644 packages/nextjs/public/logo.svg create mode 100644 packages/nextjs/public/manifest.json create mode 100644 packages/nextjs/public/thumbnail.jpg create mode 100644 packages/nextjs/scaffold.config.ts create mode 100644 packages/nextjs/services/store/store.ts create mode 100644 packages/nextjs/services/web3/wagmi-burner/BurnerConnector.ts create mode 100644 packages/nextjs/services/web3/wagmi-burner/BurnerConnectorErrors.ts create mode 100644 packages/nextjs/services/web3/wagmi-burner/BurnerConnectorTypes.ts create mode 100644 packages/nextjs/services/web3/wagmi-burner/burnerWalletConfig.ts create mode 100644 packages/nextjs/services/web3/wagmiConfig.tsx create mode 100644 packages/nextjs/services/web3/wagmiConnectors.tsx create mode 100644 packages/nextjs/styles/globals.css create mode 100644 packages/nextjs/tailwind.config.js create mode 100644 packages/nextjs/tsconfig.json create mode 100644 packages/nextjs/types/abitype/abi.d.ts create mode 100644 packages/nextjs/types/utils.ts create mode 100644 packages/nextjs/utils/scaffold-eth/block.ts create mode 100644 packages/nextjs/utils/scaffold-eth/common.ts create mode 100644 packages/nextjs/utils/scaffold-eth/contract.ts create mode 100644 packages/nextjs/utils/scaffold-eth/contractsData.ts create mode 100644 packages/nextjs/utils/scaffold-eth/decodeTxData.ts create mode 100644 packages/nextjs/utils/scaffold-eth/fetchPriceFromUniswap.ts create mode 100644 packages/nextjs/utils/scaffold-eth/getMetadata.ts create mode 100644 packages/nextjs/utils/scaffold-eth/getParsedError.ts create mode 100644 packages/nextjs/utils/scaffold-eth/index.ts create mode 100644 packages/nextjs/utils/scaffold-eth/networks.ts create mode 100644 packages/nextjs/utils/scaffold-eth/notification.tsx create mode 100644 yarn.lock diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..13ea6fb --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,58 @@ +name: Bug Report +description: File a bug/issue +title: 'bug: