Successful deploy the FundMe by script DeployFundMe,but fail to verify #2238
qingqingjian
started this conversation in
General
Replies: 3 comments 9 replies
-
![]() |
Beta Was this translation helpful? Give feedback.
3 replies
-
It seems to work fine for me. Please show your Deployment script loyalty@Loyaltys-MBP FOUNDRYFUNDME % make deploy-sepolia
[⠒] Compiling...
No files changed, compilation skipped
Traces:
[873382] DeployFundMe::run()
├─ [415752] → new HelperConfig@0xC7f2Cf4845C6db0e1a1e91ED41Bcd0FcC1b0E141
│ └─ ← [Return] 1966 bytes of code
├─ [210] HelperConfig::getSepoliaNetworkConfig() [staticcall]
│ └─ ← [Return] 0x694AA1769357215DE4FAC081bf1f309aDC325306
├─ [0] VM::startBroadcast()
│ └─ ← [Return]
├─ [360887] → new FundMe@0x900A5f51B199EAeD962A19F4214953Aa2e59b8cA
│ └─ ← [Return] 1801 bytes of code
├─ [0] VM::stopBroadcast()
│ └─ ← [Return]
└─ ← [Return] FundMe: [0x900A5f51B199EAeD962A19F4214953Aa2e59b8cA]
Script ran successfully.
== Return ==
0: contract FundMe 0x900A5f51B199EAeD962A19F4214953Aa2e59b8cA
## Setting up 1 EVM.
==========================
Simulated On-chain Traces:
[360887] → new FundMe@0x900A5f51B199EAeD962A19F4214953Aa2e59b8cA
└─ ← [Return] 1801 bytes of code
==========================
Chain 11155111
Estimated gas price: 9.054677151 gwei
Estimated total gas used for script: 576468
Estimated amount required: 0.005219731627882668 ETH
==========================
##### sepolia
✅ [Success]Hash: 0x5ca3c023705a96a0e4ed77fad7f161a07d4d8ea5e3e994b92fd270c64956e149
Contract Address: 0x900A5f51B199EAeD962A19F4214953Aa2e59b8cA
Block: 6497653
Paid: 0.002140590708779344 ETH (443437 gas * 4.827271312 gwei)
✅ Sequence #1 on sepolia | Total Paid: 0.002140590708779344 ETH (443437 gas * avg 4.827271312 gwei)
==========================
ONCHAIN EXECUTION COMPLETE & SUCCESSFUL.
##
Start verification for (1) contracts
Start verifying contract `0x900A5f51B199EAeD962A19F4214953Aa2e59b8cA` deployed on sepolia
Submitting verification for [src/FundMe.sol:FundMe] 0x900A5f51B199EAeD962A19F4214953Aa2e59b8cA.
Submitted contract for verification:
Response: `OK`
GUID: `v1ljqekmjwfrrdkpdx36z6hn9dqf7mxcjtvuvvsif6gpie2te1`
URL: https://sepolia.etherscan.io/address/0x900a5f51b199eaed962a19f4214953aa2e59b8ca
Contract verification status:
Response: `NOTOK`
Details: `Pending in queue`
Contract verification status:
Response: `OK`
Details: `Pass - Verified`
Contract successfully verified
All (1) contracts were verified! |
Beta Was this translation helpful? Give feedback.
2 replies
-
Quiet similar issue! Seems you are also a China developer by your ID. I guess it's a network issue. How is you going with this problem, bro? fu@DESKTOP-GE6ATEH:~/foundry-cu/foundry-fund-me$ make fu-deploy-sepolia
forge script script/DeployFundMe.s.sol:DeployFundMe --rpc-url $$$$$$$$ --private-key $$$$$$$$$$$$$ --broadcast --verify --etherscan-api-key $$$$$$$$$$$$$$$$-vvvv
[⠊] Compiling...
No files changed, compilation skipped
Traces:
[1202460] DeployFundMe::run()
├─ [646049] → new HelperConfig@0xC7f2Cf4845C6db0e1a1e91ED41Bcd0FcC1b0E141
│ └─ ← [Return] 2894 bytes of code
├─ [793] HelperConfig::getConfigByChainId(11155111 [1.115e7])
│ └─ ← [Return] NetworkConfig({ priceFeed: 0x694AA1769357215DE4FAC081bf1f309aDC325306 })
├─ [0] VM::startBroadcast()
│ └─ ← [Return]
├─ [486134] → new FundMe@0x0b4A7d57Da3202F83A951838dd2C4294a51Df1d8
│ └─ ← [Return] 2316 bytes of code
├─ [0] VM::stopBroadcast()
│ └─ ← [Return]
└─ ← [Return] FundMe: [0x0b4A7d57Da3202F83A951838dd2C4294a51Df1d8], HelperConfig: [0xC7f2Cf4845C6db0e1a1e91ED41Bcd0FcC1b0E141]
Script ran successfully.
== Return ==
0: contract FundMe 0x0b4A7d57Da3202F83A951838dd2C4294a51Df1d8
1: contract HelperConfig 0xC7f2Cf4845C6db0e1a1e91ED41Bcd0FcC1b0E141
## Setting up 1 EVM.
==========================
Simulated On-chain Traces:
[486134] → new FundMe@0x0b4A7d57Da3202F83A951838dd2C4294a51Df1d8
└─ ← [Return] 2316 bytes of code
==========================
Chain 11155111
Estimated gas price: 3.230600233 gwei
Estimated total gas used for script: 749400
Estimated amount required: 0.0024210118146102 ETH
==========================
##### sepolia
✅ [Success] Hash: 0xdb0f8730cb88ba978c5a824ad9c3e344bbd7641b7f49dfdef2e2e0adc80b1f62
Contract Address: 0x0b4A7d57Da3202F83A951838dd2C4294a51Df1d8
Block: 7705888
Paid: 0.000803790720109668 ETH (576462 gas * 1.394351614 gwei)
✅ Sequence #1 on sepolia | Total Paid: 0.000803790720109668 ETH (576462 gas * avg 1.394351614 gwei)
==========================
ONCHAIN EXECUTION COMPLETE & SUCCESSFUL.
##
Start verification for (1) contracts
Start verifying contract `0x0b4A7d57Da3202F83A951838dd2C4294a51Df1d8` deployed on sepolia
Compiler version: 0.8.19
Optimizations: 200
Constructor args: 000000000000000000000000694aa1769357215de4fac081bf1f309adc325306
Submitting verification for [src/FundMe.sol:FundMe] 0x0b4A7d57Da3202F83A951838dd2C4294a51Df1d8.
2025-02-14T12:28:37.215923Z ERROR forge_verify::etherscan: Failed to submit verification args="{\"contractaddress\":\"0x0b4a7d57da3202f83a951838dd2c4294a51df1d8\",\"sourceCode\":\"{\\\"language\\\":\\\"Solidity\\\",\\\"sources\\\":{\\\"src/FundMe.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// 1. Pragma\\\\npragma solidity 0.8.19;\\\\n// 2. Imports\\\\n\\\\nimport {AggregatorV3Interface} from \\\\\\\"@chainlink/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol\\\\\\\";\\\\nimport {PriceConverter} from \\\\\\\"./PriceConverter.sol\\\\\\\";\\\\n\\\\n// 3. Interfaces, Libraries, Contracts\\\\nerror FundMe__NotOwner();\\\\n\\\\n/**\\\\n * @title A sample Funding Contract\\\\n * @author Patrick Collins\\\\n * @notice This contract is for creating a sample funding contract\\\\n * @dev This implements price feeds as our library\\\\n */\\\\ncontract FundMe {\\\\n // Type Declarations\\\\n using PriceConverter for uint256;\\\\n\\\\n // State variables\\\\n uint256 public constant MINIMUM_USD = 5 * 10 ** 18;\\\\n address private immutable i_owner;\\\\n address[] private s_funders;\\\\n mapping(address => uint256) private s_addressToAmountFunded;\\\\n AggregatorV3Interface private s_priceFeed;\\\\n\\\\n // Events (we have none!)\\\\n\\\\n // Modifiers\\\\n modifier onlyOwner() {\\\\n // require(msg.sender == i_owner);\\\\n if (msg.sender != i_owner) revert FundMe__NotOwner();\\\\n _;\\\\n }\\\\n\\\\n // Functions Order:\\\\n //// constructor\\\\n //// receive\\\\n //// fallback\\\\n //// external\\\\n //// public\\\\n //// internal\\\\n //// private\\\\n //// view / pure\\\\n\\\\n constructor(address priceFeed) {\\\\n s_priceFeed = AggregatorV3Interface(priceFeed);\\\\n i_owner = msg.sender;\\\\n }\\\\n\\\\n /// @notice Funds our contract based on the ETH/USD price\\\\n function fund() public payable {\\\\n require(\\\\n msg.value.getConversionRate(s_priceFeed) >= MINIMUM_USD,\\\\n \\\\\\\"You need to spend more ETH!\\\\\\\"\\\\n );\\\\n // require(PriceConverter.getConversionRate(msg.value) >= MINIMUM_USD, \\\\\\\"You need to spend more ETH!\\\\\\\");\\\\n s_addressToAmountFunded[msg.sender] += msg.value;\\\\n s_funders.push(msg.sender);\\\\n }\\\\n\\\\n function withdraw() public onlyOwner {\\\\n for (\\\\n uint256 funderIndex = 0;\\\\n funderIndex < s_funders.length;\\\\n funderIndex++\\\\n ) {\\\\n address funder = s_funders[funderIndex];\\\\n s_addressToAmountFunded[funder] = 0;\\\\n }\\\\n s_funders = new address[](0);\\\\n // Transfer vs call vs Send\\\\n // payable(msg.sender).transfer(address(this).balance);\\\\n (bool success, ) = i_owner.call{value: address(this).balance}(\\\\\\\"\\\\\\\");\\\\n require(success);\\\\n }\\\\n\\\\n function cheaperWithdraw() public onlyOwner {\\\\n address[] memory funders = s_funders;\\\\n // mappings can't be in memory, sorry!\\\\n for (\\\\n uint256 funderIndex = 0;\\\\n funderIndex < funders.length;\\\\n funderIndex++\\\\n ) {\\\\n address funder = funders[funderIndex];\\\\n s_addressToAmountFunded[funder] = 0;\\\\n }\\\\n s_funders = new address[](0);\\\\n // payable(msg.sender).transfer(address(this).balance);\\\\n (bool success, ) = i_owner.call{value: address(this).balance}(\\\\\\\"\\\\\\\");\\\\n require(success);\\\\n }\\\\n\\\\n /**\\\\n * Getter Functions\\\\n */\\\\n\\\\n /**\\\\n * @notice Gets the amount that an address has funded\\\\n * @param fundingAddress the address of the funder\\\\n * @return the amount funded\\\\n */\\\\n function getAddressToAmountFunded(\\\\n address fundingAddress\\\\n ) public view returns (uint256) {\\\\n return s_addressToAmountFunded[fundingAddress];\\\\n }\\\\n\\\\n function getVersion() public view returns (uint256) {\\\\n return s_priceFeed.version();\\\\n }\\\\n\\\\n function getFunder(uint256 index) public view returns (address) {\\\\n return s_funders[index];\\\\n }\\\\n\\\\n function getOwner() public view returns (address) {\\\\n return i_owner;\\\\n }\\\\n\\\\n function getPriceFeed() public view returns (AggregatorV3Interface) {\\\\n return s_priceFeed;\\\\n }\\\\n}\\\\n\\\"},\\\"lib/chainlink-brownie-contracts/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\n// solhint-disable-next-line interface-starts-with-i\\\\ninterface AggregatorV3Interface {\\\\n function decimals() external view returns (uint8);\\\\n\\\\n function description() external view returns (string memory);\\\\n\\\\n function version() external view returns (uint256);\\\\n\\\\n function getRoundData(\\\\n uint80 _roundId\\\\n ) external view returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\\\n\\\\n function latestRoundData()\\\\n external\\\\n view\\\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\\\n}\\\\n\\\"},\\\"src/PriceConverter.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.18;\\\\n\\\\nimport {AggregatorV3Interface} from \\\\\\\"@chainlink/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol\\\\\\\";\\\\n\\\\n// Why is this a library and not abstract?\\\\n// Why not an interface?\\\\nlibrary PriceConverter {\\\\n // We could make this public, but then we'd have to deploy it\\\\n function getPrice(\\\\n AggregatorV3Interface priceFeed\\\\n ) internal view returns (uint256) {\\\\n // Sepolia ETH / USD Address\\\\n // https://docs.chain.link/data-feeds/price-feeds/addresses\\\\n\\\\n (, int256 answer, , , ) = priceFeed.latestRoundData();\\\\n // ETH/USD rate in 18 digit\\\\n return uint256(answer * 10000000000);\\\\n }\\\\n\\\\n // 1000000000\\\\n function getConversionRate(\\\\n uint256 ethAmount,\\\\n AggregatorV3Interface priceFeed\\\\n ) internal view returns (uint256) {\\\\n uint256 ethPrice = getPrice(priceFeed);\\\\n uint256 ethAmountInUsd = (ethPrice * ethAmount) / 1000000000000000000;\\\\n // the actual ETH/USD conversion rate, after adjusting the extra 0s.\\\\n return ethAmountInUsd;\\\\n }\\\\n}\\\\n\\\"}},\\\"settings\\\":{\\\"remappings\\\":[\\\"@chainlink/contracts/=lib/chainlink-brownie-contracts/contracts/\\\",\\\"chainlink-brownie-contracts/=lib/chainlink-brownie-contracts/\\\",\\\"forge-std/=lib/forge-std/src/\\\",\\\"foundry-devops/=lib/foundry-devops/\\\"],\\\"optimizer\\\":{\\\"enabled\\\":true,\\\"runs\\\":200},\\\"metadata\\\":{\\\"useLiteralContent\\\":false,\\\"bytecodeHash\\\":\\\"ipfs\\\",\\\"appendCBOR\\\":true},\\\"outputSelection\\\":{\\\"*\\\":{\\\"*\\\":[\\\"abi\\\",\\\"evm.bytecode.object\\\",\\\"evm.bytecode.sourceMap\\\",\\\"evm.bytecode.linkReferences\\\",\\\"evm.deployedBytecode.object\\\",\\\"evm.deployedBytecode.sourceMap\\\",\\\"evm.deployedBytecode.linkReferences\\\",\\\"evm.deployedBytecode.immutableReferences\\\",\\\"evm.methodIdentifiers\\\",\\\"metadata\\\"]}},\\\"evmVersion\\\":\\\"paris\\\",\\\"viaIR\\\":false,\\\"libraries\\\":{}}}\",\"codeformat\":\"solidity-standard-json-input\",\"contractname\":\"src/FundMe.sol:FundMe\",\"compilerversion\":\"v0.8.19+commit.7dd6d404\",\"constructorArguements\":\"000000000000000000000000694aa1769357215de4fac081bf1f309adc325306\",\"constructorArguments\":\"000000000000000000000000694aa1769357215de4fac081bf1f309adc325306\"}"
Warning: Failed to submit contract verification, payload:
{"contractaddress":"0x0b4a7d57da3202f83a951838dd2c4294a51df1d8","sourceCode":"{\"language\":\"Solidity\",\"sources\":{\"src/FundMe.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// 1. Pragma\\npragma solidity 0.8.19;\\n// 2. Imports\\n\\nimport {AggregatorV3Interface} from \\\"@chainlink/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol\\\";\\nimport {PriceConverter} from \\\"./PriceConverter.sol\\\";\\n\\n// 3. Interfaces, Libraries, Contracts\\nerror FundMe__NotOwner();\\n\\n/**\\n * @title A sample Funding Contract\\n * @author Patrick Collins\\n * @notice This contract is for creating a sample funding contract\\n * @dev This implements price feeds as our library\\n */\\ncontract FundMe {\\n // Type Declarations\\n using PriceConverter for uint256;\\n\\n // State variables\\n uint256 public constant MINIMUM_USD = 5 * 10 ** 18;\\n address private immutable i_owner;\\n address[] private s_funders;\\n mapping(address => uint256) private s_addressToAmountFunded;\\n AggregatorV3Interface private s_priceFeed;\\n\\n // Events (we have none!)\\n\\n // Modifiers\\n modifier onlyOwner() {\\n // require(msg.sender == i_owner);\\n if (msg.sender != i_owner) revert FundMe__NotOwner();\\n _;\\n }\\n\\n // Functions Order:\\n //// constructor\\n //// receive\\n //// fallback\\n //// external\\n //// public\\n //// internal\\n //// private\\n //// view / pure\\n\\n constructor(address priceFeed) {\\n s_priceFeed = AggregatorV3Interface(priceFeed);\\n i_owner = msg.sender;\\n }\\n\\n /// @notice Funds our contract based on the ETH/USD price\\n function fund() public payable {\\n require(\\n msg.value.getConversionRate(s_priceFeed) >= MINIMUM_USD,\\n \\\"You need to spend more ETH!\\\"\\n );\\n // require(PriceConverter.getConversionRate(msg.value) >= MINIMUM_USD, \\\"You need to spend more ETH!\\\");\\n s_addressToAmountFunded[msg.sender] += msg.value;\\n s_funders.push(msg.sender);\\n }\\n\\n function withdraw() public onlyOwner {\\n for (\\n uint256 funderIndex = 0;\\n funderIndex < s_funders.length;\\n funderIndex++\\n ) {\\n address funder = s_funders[funderIndex];\\n s_addressToAmountFunded[funder] = 0;\\n }\\n s_funders = new address[](0);\\n // Transfer vs call vs Send\\n // payable(msg.sender).transfer(address(this).balance);\\n (bool success, ) = i_owner.call{value: address(this).balance}(\\\"\\\");\\n require(success);\\n }\\n\\n function cheaperWithdraw() public onlyOwner {\\n address[] memory funders = s_funders;\\n // mappings can't be in memory, sorry!\\n for (\\n uint256 funderIndex = 0;\\n funderIndex < funders.length;\\n funderIndex++\\n ) {\\n address funder = funders[funderIndex];\\n s_addressToAmountFunded[funder] = 0;\\n }\\n s_funders = new address[](0);\\n // payable(msg.sender).transfer(address(this).balance);\\n (bool success, ) = i_owner.call{value: address(this).balance}(\\\"\\\");\\n require(success);\\n }\\n\\n /**\\n * Getter Functions\\n */\\n\\n /**\\n * @notice Gets the amount that an address has funded\\n * @param fundingAddress the address of the funder\\n * @return the amount funded\\n */\\n function getAddressToAmountFunded(\\n address fundingAddress\\n ) public view returns (uint256) {\\n return s_addressToAmountFunded[fundingAddress];\\n }\\n\\n function getVersion() public view returns (uint256) {\\n return s_priceFeed.version();\\n }\\n\\n function getFunder(uint256 index) public view returns (address) {\\n return s_funders[index];\\n }\\n\\n function getOwner() public view returns (address) {\\n return i_owner;\\n }\\n\\n function getPriceFeed() public view returns (AggregatorV3Interface) {\\n return s_priceFeed;\\n }\\n}\\n\"},\"lib/chainlink-brownie-contracts/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// solhint-disable-next-line interface-starts-with-i\\ninterface AggregatorV3Interface {\\n function decimals() external view returns (uint8);\\n\\n function description() external view returns (string memory);\\n\\n function version() external view returns (uint256);\\n\\n function getRoundData(\\n uint80 _roundId\\n ) external view returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n\\n function latestRoundData()\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n}\\n\"},\"src/PriceConverter.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.18;\\n\\nimport {AggregatorV3Interface} from \\\"@chainlink/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol\\\";\\n\\n// Why is this a library and not abstract?\\n// Why not an interface?\\nlibrary PriceConverter {\\n // We could make this public, but then we'd have to deploy it\\n function getPrice(\\n AggregatorV3Interface priceFeed\\n ) internal view returns (uint256) {\\n // Sepolia ETH / USD Address\\n // https://docs.chain.link/data-feeds/price-feeds/addresses\\n\\n (, int256 answer, , , ) = priceFeed.latestRoundData();\\n // ETH/USD rate in 18 digit\\n return uint256(answer * 10000000000);\\n }\\n\\n // 1000000000\\n function getConversionRate(\\n uint256 ethAmount,\\n AggregatorV3Interface priceFeed\\n ) internal view returns (uint256) {\\n uint256 ethPrice = getPrice(priceFeed);\\n uint256 ethAmountInUsd = (ethPrice * ethAmount) / 1000000000000000000;\\n // the actual ETH/USD conversion rate, after adjusting the extra 0s.\\n return ethAmountInUsd;\\n }\\n}\\n\"}},\"settings\":{\"remappings\":[\"@chainlink/contracts/=lib/chainlink-brownie-contracts/contracts/\",\"chainlink-brownie-contracts/=lib/chainlink-brownie-contracts/\",\"forge-std/=lib/forge-std/src/\",\"foundry-devops/=lib/foundry-devops/\"],\"optimizer\":{\"enabled\":true,\"runs\":200},\"metadata\":{\"useLiteralContent\":false,\"bytecodeHash\":\"ipfs\",\"appendCBOR\":true},\"outputSelection\":{\"*\":{\"*\":[\"abi\",\"evm.bytecode.object\",\"evm.bytecode.sourceMap\",\"evm.bytecode.linkReferences\",\"evm.deployedBytecode.object\",\"evm.deployedBytecode.sourceMap\",\"evm.deployedBytecode.linkReferences\",\"evm.deployedBytecode.immutableReferences\",\"evm.methodIdentifiers\",\"metadata\"]}},\"evmVersion\":\"paris\",\"viaIR\":false,\"libraries\":{}}}","codeformat":"solidity-standard-json-input","contractname":"src/FundMe.sol:FundMe","compilerversion":"v0.8.19+commit.7dd6d404","constructorArguements":"000000000000000000000000694aa1769357215de4fac081bf1f309adc325306","constructorArguments":"000000000000000000000000694aa1769357215de4fac081bf1f309adc325306"}; error sending request for url (https://api-sepolia.etherscan.io/api); client error (Connect); tcp connect error: Connection timed out (os error 110); waiting 5 seconds before trying again (4 tries remaining)
``````````````````````` |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I try to use makefile to deploy and verify FundMe contract on sepolia,the deploy is successful, but verify is failed. Anyone can help with this one? Thanks.
Here is my script:
here is my fundme contract:
here is my makefile:
here is the error :
Beta Was this translation helpful? Give feedback.
All reactions