Comments (9)
@Enigmatic331 it seems that plugin is working properly now
from truffle-plugin-verify.
Hi @Julio77. Truffle plugins were introduced in Truffle v5.0, so you should update your Truffle installation to use truffle-plugin-verify!
from truffle-plugin-verify.
Hey, thanks for opening this issue. I tried to do a test with a SimpleStorage instance on Rinkeby, and I got the same results. I outputted the data I sent to the Etherscan API:
{ apikey: <redacted>,
module: 'contract',
action: 'verifysourcecode',
contractaddress: '0x818887C7AE9057FBa6380EcE5f8034b3B85D197a',
sourceCode:
'pragma solidity ^0.5.0;\n\n\ncontract SimpleStorage {\n uint storedData;\n\n function set(uint x) public {\n storedData = x;\n }\n\n function get() public view returns (uint) {\n return storedData;\n }\n}',
codeformat: 'solidity-single-file',
contractname: 'SimpleStorage',
compilerversion: 'v0.5.8+commit.23d335f2',
optimizationUsed: 0,
runs: 200,
constructorArguements: '',
evmversion: undefined,
licenseType: 1 }
I tried copy-pasting these values into the Etherscan verify web form. This worked correctly.
So then I tried copy-pasting these values into the Etherscan verify API demo. This did not work.
This leads me to believe that there might be an issue with the Etherscan verify API at the moment, since both truffle-plugin-verify and the API demo did not work, while the web form did work.
@mtbitcoin, are there any known issues with the verify API at this time?
from truffle-plugin-verify.
We are looking into this. We did recently push some changes to support submitting standard input json contract verification
from truffle-plugin-verify.
Hey @rkalis - Have done a quick test using the same source through the Rinkeby's verify API demo - Seemed to work fine on my end with the contract: https://rinkeby.etherscan.io/address/0xa70e7FB5aad8f9FF2dDec26bbf54dAA026f72FbD#code
Likewise for Kovan: https://kovan.etherscan.io/address/0x7Ff1037803575eE91B13C25A145d68D5Adb6E8A6#code
A quick screencap on the settings (perhaps some bits of the setting requirements changed in between these couple of days):
I will give it a shot through the Truffle Verify Plugin itself to see if there might be anything I am missing (though I have to admit, I hadn't been using Truffle for a while now).
ADD: Ah! I reckon it was Single File verification which was causing issues - Retrying.
from truffle-plugin-verify.
Hey @rkalis - Fixes were pushed across and a few tests were done (e.g.: https://kovan.etherscan.io/address/0x144f09D87A02719c869cfE407b5e1188a7DB59fa#code)
Any chance for a retry to see if it looks good now, please?
Many thanks!
from truffle-plugin-verify.
Thanks for the quick fixes @mtbitcoin @Enigmatic331!
from truffle-plugin-verify.
Hi @rkalis ,
I am trying to verify the contracts deployed by truffle, but I get the following:
x:> truffle run verify Contrato1 Contrato2 --network rinkeby
Truffle v4.1.11 - a development framework for Ethereum
Usage: truffle <command> [options]
Commands:
init Initialize new and empty Ethereum project
compile Compile contract source files
migrate Run migrations to deploy contracts
deploy (alias for migrate)
build Execute build pipeline (if configuration present)
test Run JavaScript and Solidity tests
debug Interactively debug any transaction on the blockchain (experimental)
opcode Print the compiled opcodes for a given contract
console Run a console with contract abstractions and commands available
develop Open a console with a local development blockchain
create Helper to create new contracts, migrations and tests
install Install a package from the Ethereum Package Registry
publish Publish a package to the Ethereum Package Registry
networks Show addresses for deployed contracts on each network
watch Watch filesystem for changes and rebuild the project automatically
serve Serve the build directory on localhost and watch for changes
exec Execute a JS module within this Truffle environment
unbox Download a Truffle Box, a pre-built Truffle project
version Show version number and exit
See more at http://truffleframework.com/docs
Versions:
Truffle v4.1.11
TestNet: Rinkeby
Solidity 0.4.24
My Config
const HDWalletProvider = require('@truffle/hdwallet-provider');
require('dotenv').config();
const fs = require('fs');
const mnemonic = fs.readFileSync(".secret").toString().trim();
module.exports = {
networks: {
rinkeby: {
provider: () => new HDWalletProvider(mnemonic, "https://rinkeby.infura.io/v3/key"),
network_id: 4,
gas: 4500000,
gasPrice: 10000000000,
},
},
plugins: [
'truffle-plugin-verify'
],
api_keys: {
etherscan: process.env.ETHERSCAN_API_KEY
},
// Set default mocha options here, use special reporters etc.
mocha: {
// timeout: 100000
},
// Configure your compilers
compilers: {
solc: {
version: "0.4.24", // Fetch exact version from solc-bin (default: truffle's version)
// docker: true, // Use "0.5.1" you've installed locally with docker (default: false)
settings: { // See the solidity docs for advice about optimization and evmVersion
optimizer: {
enabled: false,
runs: 200
},
// evmVersion: "byzantium"
}
}
}
}
Dependences
npm install truffle-plugin-verify
Contracts:
Contract 1
Contract 2
Regards.
from truffle-plugin-verify.
Hi @rkalis
Thanks, nice, i will try again with this code.
from truffle-plugin-verify.
Related Issues (20)
- Proxy handling working well only for initial deployment, not for update case HOT 1
- Unable to verify since 0.8.16 HOT 2
- verifying smart contract fails when using viaIR is true in truffle config HOT 8
- Etherscan has no support for network arbitrum_goerli with chain id 421613 HOT 2
- Zcore 3331 HOT 1
- support for sepolia HOT 2
- Add support for Subscan based verification HOT 2
- TypeError: (intermediate value).hostname.split(...).at is not a function HOT 4
- Fail with TypeError: (intermediate value).hostname.split(...).at at Goerli HOT 1
- Couldn't verify Contracts on Etherscan using truffle-plugin-verify HOT 4
- I cannot verify an updateable contract on the poligon testnet. HOT 2
- KAVA verification HOT 3
- Fail - Unable to verify. HOT 10
- Verification fails when contracts import "truffle/console.sol", etc. HOT 1
- sourcify fails with 500 error code HOT 9
- Failed to connect to Etherscan API at url - tunneling socket could not be established, cause=socket hang up
- Cannot read properties of undefined (reading "address") during verification HOT 2
- Cannot read properties of undefined (reading "address") during verification HOT 8
- Cannot read properties of undefined (reading 'includes') on verification HOT 3
- celo testnet explorer is not correct HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from truffle-plugin-verify.