-
Notifications
You must be signed in to change notification settings - Fork 153
[M1] Add Otterscan & Sourcify integration to playground #4000
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
base: main
Are you sure you want to change the base?
[M1] Add Otterscan & Sourcify integration to playground #4000
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
I have read the CLA Document and I hereby sign the CLA |
MartinquaXD
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for you contribution! 🚀
Other than the small modification I had to apply, this worked like a charm on my first simple test. Will play a bit more with it over the holidays and do a full review.
| case "${SOURCIFY_MODE:-cloud}" in | ||
| local) | ||
| echo "Using LOCAL Sourcify as primary source" | ||
| cat > "$CONFIG_FILE" << 'EOF' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to remove the ' to enable variable expansion. With 'EOF' this command literally wrote ${ERIGON_URL} into the file instead of http://127.0.0.1:8545.
| cat > "$CONFIG_FILE" << 'EOF' | |
| cat > "$CONFIG_FILE" << EOF |
| ;; | ||
| cloud|*) | ||
| echo "Using CLOUD Sourcify as primary source" | ||
| cat > "$CONFIG_FILE" << 'EOF' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
| cat > "$CONFIG_FILE" << 'EOF' | |
| cat > "$CONFIG_FILE" << EOF |
Summary
This PR delivers Milestone 1: Otterscan Integration of the CoW Grants Program RFP: CoW Protocol Playground Block Explorer Integration proposal by CoBuilders.
Integrates Otterscan block explorer with Sourcify contract verification into the CoW Protocol Playground, enabling developers to browse transactions and view verified contract source code locally.
Milestone 1 Deliverables
Otterscan Integration
Contract Verification Setup
SOURCIFY_MODEenv var)Success Criteria
http://localhost:8003http://localhost:5555Commits
872d4dbd6e322b3c11ff26e8acb68519ffa98fa7ecff75c1ff7e8ff50660cb8f92810aChanges
New Files
Dockerfile.sourcifyDockerfile.otterscansourcify-entrypoint.shotterscan-entrypoint.shSOURCIFY_MODEsourcify-chains.jsonModified Files
docker-compose.fork.ymldocker-compose.non-interactive.yml.env.exampleSOURCIFY_MODEconfiguration variableREADME.mdDockerfileArchitecture
Configuration Options
Sourcify Mode
The
SOURCIFY_MODEenvironment variable controls which Sourcify source Otterscan uses:cloud(default)localAfter changing, recreate the Otterscan container:
Contract Verification
Using Foundry:
Using Sourcify API:
Testing
Start the playground:
Verify services are healthy:
Test cloud mode (default): View any well-known contract in Otterscan - source code should be visible
Test local mode:
SOURCIFY_MODE=localin.envNext Milestones
Submitted by CoBuilders as part of the CoW Grants Program