Skip to content
This repository was archived by the owner on Mar 27, 2026. It is now read-only.

Verify documentation#103

Merged
lzrscg merged 24 commits into
mainfrom
verifyDocumentation
Jun 23, 2023
Merged

Verify documentation#103
lzrscg merged 24 commits into
mainfrom
verifyDocumentation

Conversation

@pynchmeister

Copy link
Copy Markdown
Collaborator

Description

  • Added documentation for contract verification at /explorer/apps/verify/README.md.

  • Added smart contract verification functionality to @modularcloud/sdk

@vercel

vercel Bot commented Jun 22, 2023

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
aeg ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 23, 2023 6:35am
apricot ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 23, 2023 6:35am
calderascan ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 23, 2023 6:35am
celestiascan ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 23, 2023 6:35am
contract-verification ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 23, 2023 6:35am
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 23, 2023 6:35am
dymscan ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 23, 2023 6:35am
explorer ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 23, 2023 6:35am
nautscan ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 23, 2023 6:35am
saga ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 23, 2023 6:35am
worlds ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 23, 2023 6:35am

Comment thread packages/@modularcloud/sdk/index.ts
Comment thread packages/@modularcloud/sdk/index.ts Outdated
Comment thread apps/verify/README.md

Responses:

* 200 OK: The operation was successful. The response body will contain the verification data for the contract. If no contract is found with the provided address, { "isVerified": false } will be returned.

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.

what is the schema if readfiles is true?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

  "id": "string",
  "createdAt": "datetime",
  "updatedAt": "datetime",
  "verificationStatus": "string",
  "contractAddress": "string",
  "chainID": "string",
  "isVerified": "boolean",
  "uploadedUrl": "string",
  "files": "Object"
}

Added this to the docs

@Aswanth-c Aswanth-c Jun 22, 2023

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Here is an example of the schema with data

{
"id": 14,
"contractAddress": "0x90cd9b9f69d1db3f66dd209784c90b92b0157b40",
"chainID": "91002",
"isVerified": true,
"createdAt": "2023-06-21T21:11:39.028Z",
"updatedAt": "2023-06-21T21:11:39.028Z",
"verificationStatus": "FULL",
"uploadedUrl": "https://verified-contracts.s3.us-west-2.amazonaws.com/0x90cd9b9f69d1db3f66dd209784c90b92b0157b40/0x90cd9b9f69d1db3f66dd209784c90b92b0157b40_sourcefiles.zip",
"files": {
"Caldera.sol": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\ncontract HelloWorld {\n\n string saySomething;\n\n constructor() {\n saySomething = "Hello World!";\n }\n\n function speak() public view returns(string memory) {\n return saySomething;\n }\n}",
"metadata.json": "{\n\t"compiler": {\n\t\t"version": "0.8.18+commit.87f61d96"\n\t},\n\t"language": "Solidity",\n\t"output": {\n\t\t"abi": [\n\t\t\t{\n\t\t\t\t"inputs": [],\n\t\t\t\t"stateMutability": "nonpayable",\n\t\t\t\t"type": "constructor"\n\t\t\t},\n\t\t\t{\n\t\t\t\t"inputs": [],\n\t\t\t\t"name": "speak",\n\t\t\t\t"outputs": [\n\t\t\t\t\t{\n\t\t\t\t\t\t"internalType": "string",\n\t\t\t\t\t\t"name": "",\n\t\t\t\t\t\t"type": "string"\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t"stateMutability": "view",\n\t\t\t\t"type": "function"\n\t\t\t}\n\t\t],\n\t\t"devdoc": {\n\t\t\t"kind": "dev",\n\t\t\t"methods": {},\n\t\t\t"version": 1\n\t\t},\n\t\t"userdoc": {\n\t\t\t"kind": "user",\n\t\t\t"methods": {},\n\t\t\t"version": 1\n\t\t}\n\t},\n\t"settings": {\n\t\t"compilationTarget": {\n\t\t\t"Caldera.sol": "HelloWorld"\n\t\t},\n\t\t"evmVersion": "paris",\n\t\t"libraries": {},\n\t\t"metadata": {\n\t\t\t"bytecodeHash": "ipfs"\n\t\t},\n\t\t"optimizer": {\n\t\t\t"enabled": false,\n\t\t\t"runs": 200\n\t\t},\n\t\t"remappings": []\n\t},\n\t"sources": {\n\t\t"Caldera.sol": {\n\t\t\t"keccak256": "0x8f54065335b9a9019f30a20b9e2cb182aeec5d823ded5c67e71c22f42422b892",\n\t\t\t"license": "MIT",\n\t\t\t"urls": [\n\t\t\t\t"bzz-raw://21b5e98caff1f4831c23977aa77c9063fe735d843cb722ebda428715f586dcf2",\n\t\t\t\t"dweb:/ipfs/QmSk3zRdU2fxWEaw7em9PJ6LJuupxWgM1snGwqbNZgBB2W"\n\t\t\t]\n\t\t}\n\t},\n\t"version": 1\n}"
}
}

Comment thread apps/verify/README.md Outdated
Comment thread apps/verify/README.md Outdated
Comment thread apps/verify/README.md
Comment thread apps/verify/README.md Outdated
Comment thread packages/@modularcloud/sdk/schemas.ts Outdated
}

const json = (await response.json()) as APIResponse;
return VerificationResponseSchema.parse(json.result);

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.

I think this is the wrong schema. Can you test this as well?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants