Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add Multi-File Etherscan Verification Option#630

Open
naszam wants to merge 24 commits into
dapphub:master from
naszam:verify_multiple
Open

Add Multi-File Etherscan Verification Option #630
naszam wants to merge 24 commits into
dapphub:master from
naszam:verify_multiple

Conversation

@naszam

@naszam naszam commented Mar 29, 2021

Copy link
Copy Markdown

Description:

Add --multiple opt to dapp-verify-contract

@d-xo d-xo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the submission! Very much appreciated ✨ 🙏

I'm wondering if this should be the default verification method used in dapp create --verify, @MrChico do you have opinions here?

Comment thread src/dapp/libexec/dapp/dapp-verify-contract Outdated
Comment thread src/dapp/libexec/dapp/dapp-verify-contract Outdated

MrChico commented Apr 20, 2021

Copy link
Copy Markdown
Member

I don't think this should be the default verification method right now

d-xo, brockelmore, and mds1 reacted with thumbs up emoji

naszam commented Apr 20, 2021

Copy link
Copy Markdown
Author

If the proposed changes are ok, just need to explore the inputJSON a bit more, if working on the missing libraries field or trying to fix and use mk-standard-json instead to generate the inputJSON (that currently doesn't work out-of-the-box), then it will be ready for testing.

MrChico commented Apr 28, 2021

Copy link
Copy Markdown
Member

the changes so far look good! With mk-standard-json accomodated as discussed this should make for a nice improvement!

naszam reacted with thumbs up emoji

d-xo commented May 10, 2021

Copy link
Copy Markdown
Contributor

I'm getting a syntax error in dapp-mk-standard-json when I try to run dapp init with the latest state of this branch:

> /home/me/code/dapphub/dapptools/verify_multiple/result/bin/dapp init
+ git init
Initialized empty Git repository in /tmp/tmp.cJ7ZCxPb4l/.git/
+ mkdir -p lib src
+ git add .gitignore
+ git add .gitattributes
+ git add Makefile
+ git add src/TmpCj7zcxpb4l.sol
+ git add src/TmpCj7zcxpb4l.t.sol
+ git commit -m 'dapp init TmpCj7zcxpb4l'
[master (root-commit) e94620b] dapp init TmpCj7zcxpb4l
 5 files changed, 31 insertions(+)
 create mode 100644 .gitattributes
 create mode 100644 .gitignore
 create mode 100644 Makefile
 create mode 100644 src/TmpCj7zcxpb4l.sol
 create mode 100644 src/TmpCj7zcxpb4l.t.sol
+ dapp install ds-test
+ git submodule add --force https://github.com/dapphub/ds-test lib/ds-test
Cloning into '/tmp/tmp.cJ7ZCxPb4l/lib/ds-test'...
remote: Enumerating objects: 166, done.
remote: Counting objects: 100% (70/70), done.
remote: Compressing objects: 100% (29/29), done.
remote: Total 166 (delta 29), reused 60 (delta 26), pack-reused 96
Receiving objects: 100% (166/166), 41.74 KiB | 689.00 KiB/s, done.
Resolving deltas: 100% (67/67), done.
+ git submodule update --init --recursive lib/ds-test
+ git commit -m 'dapp install ds-test'
[master 3ee0723] dapp install ds-test
 2 files changed, 4 insertions(+)
 create mode 100644 .gitmodules
 create mode 160000 lib/ds-test
++ dapp-remappings
+ DAPP_REMAPPINGS='ds-test/=lib/ds-test/src/
ds-test=lib/ds-test/src/index.sol'
+ make test
dapp test
 File "/nix/store/vn3bkvdds4gx1gz3xym2dvjfgd9455z1-dapp-0.32.2/libexec/dapp/dapp-mk-standard-json", line 34
 else
 ^
SyntaxError: invalid syntax
* Line 2, Column 1
 Syntax error: value, object or array expected.
* Line 1, Column 1
 A valid JSON document must be either an array or an object value.
make: *** [Makefile:3: test] Error 1
naszam reacted with thumbs up emoji

@d-xo d-xo left a comment
edited
Loading

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

---verify seems to be broken now. I consistently get Fail - Unable to verify when running dapp create --verify on kovan with this branch.

and you're still missing an entry for --verify-multiple in the OPTS string here so right now I get an error: unknown option 'verify-multiple' when I try dapp create --verify-multiple

naszam reacted with thumbs up emoji

d-xo commented May 11, 2021

Copy link
Copy Markdown
Contributor

oh, also please update the readme to mention these new options

naszam reacted with thumbs up emoji

@d-xo d-xo closed this May 11, 2021
@d-xo d-xo reopened this May 11, 2021

d-xo commented May 11, 2021

Copy link
Copy Markdown
Contributor

the close was an accident 🤦‍♀️

Comment thread src/dapp/libexec/dapp/dapp-mk-standard-json Outdated

Copy link
Copy Markdown
Contributor

any blockers here? i much prefer multi-file verification

I don't think this should be the default verification method right now

why so? 🤔

naszam commented Sep 3, 2021
edited
Loading

Copy link
Copy Markdown
Author

Hi @transmissions11,

Thanks for your interest!

The only blocker so far is the dapp-mk-standard-json that doesn't work out-of-the-box for multi-file verification as it's used mainly in dapp-build to compile source code.
We tried to adjust it but we had a blocker with the remappings to get all the imported contract dependencies (cc: @WilfredTA).
The idea is to write a new script from scratch (probably in python) to generate a standard inputJSON for multi-file verification inspired by truffle-plugin-verify or hardhat-deploy and then use it inside dapp-verify-contracts instead of dapp-mk-standard-json.
I think @e18r will give it a try, but feel free to jump in if you like!
Thanks! 🙂

transmissions11 reacted with thumbs up emoji transmissions11 reacted with heart emoji

Copy link
Copy Markdown
Contributor

Ah interesting. The compilation stuff is a bit out of my league sadly.

Thanks for all the work on this so far 🙏

naszam reacted with thumbs up emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@d-xo d-xo d-xo left review comments

+1 more reviewer

@WilfredTA WilfredTA WilfredTA left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /