Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

部署Factory报错了 #3

Open
tianheng2017 opened this issue Sep 19, 2024 · 2 comments
Open

部署Factory报错了 #3

tianheng2017 opened this issue Sep 19, 2024 · 2 comments

Comments

@tianheng2017
Copy link

PS C:\Users\tianh\Desktop\project\uniswap-v2-contract> yarn run env-cmd -f ./envs/env.bsctestnet yarn run hardhat UniswapV2:deploy --gas-price 5 --wait-num 1 --network 97
yarn run v1.22.22
$ C:\Users\tianh\Desktop\project\uniswap-v2-contract\node_modules.bin\env-cmd -f ./envs/env.bsctestnet yarn run hardhat UniswapV2:deploy --gas-price 5 --wait-num 1 --network 97
$ C:\Users\tianh\Desktop\project\uniswap-v2-contract\node_modules.bin\hardhat UniswapV2:deploy --gas-price 5 --wait-num 1 --network 97
{"level":30,"time":1726756412509,"pid":17972,"hostname":"12-29-2","msg":"deploy WETH9"}
{"level":30,"time":1726756412519,"pid":17972,"hostname":"12-29-2","msg":"skip transaction:0,deploy WETH9"}
{"level":30,"time":1726756412520,"pid":17972,"hostname":"12-29-2","msg":"WETH9 deployed proxy at 0x9e43D890091022F8d336dd556A1B7E4e670f8Ba9,impl at 0x9e43D890091022F8d336dd556A1B7E4e670f8Ba9,version 1.0.0,fromBlock 44011788"}
{"level":30,"time":1726756412520,"pid":17972,"hostname":"12-29-2","msg":"deploy UniswapV2Factory"}
{"level":30,"time":1726756412526,"pid":17972,"hostname":"12-29-2","msg":"execute operation transaction:1, deploy UniswapV2Factory, try 1"}
An unexpected error occurred:

ProviderError: max code size exceeded
at HttpProvider.request (C:\Users\tianh\Desktop\project\uniswap-v2-contract\node_modules.pnpm\[email protected][email protected]_ts-node@10.9.2_@types+node@[email protected]__types_bcg7xnpe6opkidhlikokziquzi\node_modules\hardhat\src\internal\core\providers\http.ts:107:21)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async EthersProviderWrapper.send (C:\Users\tianh\Desktop\project\uniswap-v2-contract\node_modules.pnpm\[email protected][email protected]_bufferutil@[email protected]__hard_u4gwodvwyxoqfgbpjgy45uirsq\node_modules\hardhat-deploy-ethers\src\internal\ethers-provider-wrapper.ts:13:20)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
PS C:\Users\tianh\Desktop\project\uniswap-v2-contract>

@tianheng2017
Copy link
Author

修改参数后解决,哈哈哈,病急乱投医:
yarn run env-cmd -f ./envs/env.bsctestnet yarn run hardhat UniswapV2:deploy --gas-price 100 --wait-num 10 --network 97

@tianheng2017
Copy link
Author

验证合约不行,我太菜了:

PS C:\Users\tianh\Desktop\project\uniswap-v2-contract> yarn run env-cmd -f ./envs/env.bsctestnet yarn run hardhat UniswapV2:verify --network 97
yarn run v1.22.22
$ C:\Users\tianh\Desktop\project\uniswap-v2-contract\node_modules.bin\env-cmd -f ./envs/env.bsctestnet yarn run hardhat UniswapV2:verify --network 97
$ C:\Users\tianh\Desktop\project\uniswap-v2-contract\node_modules.bin\hardhat UniswapV2:verify --network 97
failed to get chainId, falling back on net_version...
An unexpected error occurred:

ConnectTimeoutError: Connect Timeout Error
at onConnectTimeout (C:\Users\tianh\Desktop\project\uniswap-v2-contract\node_modules.pnpm\[email protected]\node_modules\undici\lib\core\connect.js:186:24)
at C:\Users\tianh\Desktop\project\uniswap-v2-contract\node_modules.pnpm\[email protected]\node_modules\undici\lib\core\connect.js:133:46
at Immediate._onImmediate (C:\Users\tianh\Desktop\project\uniswap-v2-contract\node_modules.pnpm\[email protected]\node_modules\undici\lib\core\connect.js:172:33)
at processImmediate (node:internal/timers:483:21) {
code: 'UND_ERR_CONNECT_TIMEOUT'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant