-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add smart contract verification
Signed-off-by: Yaroslav Markovski <[email protected]>
- Loading branch information
1 parent
531fc00
commit 9d18425
Showing
8 changed files
with
182 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
[ | ||
{ | ||
"name": "mainnet", | ||
"displayName": "MAINNET", | ||
"url": "https://mainnet-public.mirrornode.hedera.com/", | ||
"ledgerID": "00", | ||
"sourcifySetup": { | ||
"activate": true, | ||
"repoURL": "http://localhost:10000/contracts/", | ||
"serverURL": "http://localhost:5002/", | ||
"verifierURL": "http://localhost:3000/#/", | ||
"chainID": 295 | ||
} | ||
}, | ||
{ | ||
"name": "testnet", | ||
"displayName": "TESTNET", | ||
"url": "https://testnet.mirrornode.hedera.com/", | ||
"ledgerID": "01", | ||
"sourcifySetup": { | ||
"activate": true, | ||
"repoURL": "http://localhost:10000/contracts/", | ||
"serverURL": "http://localhost:5002/", | ||
"verifierURL": "http://localhost:3000/#/", | ||
"chainID": 296 | ||
} | ||
}, | ||
{ | ||
"name": "previewnet", | ||
"displayName": "PREVIEWNET", | ||
"url": "https://previewnet.mirrornode.hedera.com/", | ||
"ledgerID": "02", | ||
"sourcifySetup": { | ||
"activate": true, | ||
"repoURL": "http://localhost:10000/contracts/", | ||
"serverURL": "http://localhost:5002/", | ||
"verifierURL": "http://localhost:3000/#/", | ||
"chainID": 297 | ||
} | ||
}, | ||
{ | ||
"name": "localnode", | ||
"displayName": "LOCAL NODE", | ||
"url": "http://127.0.0.1:5551", | ||
"ledgerID": "FF", | ||
"sourcifySetup": { | ||
"activate": true, | ||
"repoURL": "http://localhost:10000/contracts/", | ||
"serverURL": "http://localhost:5555/", | ||
"verifierURL": "http://localhost:5555/#/", | ||
"chainID": 298 | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
//diff sourcify/services/server/src/config/default.js ./local.js | ||
module.exports = { | ||
server: { | ||
port: 5555, | ||
maxFileSize: 30 * 1024 * 1024, // 30 MB | ||
}, | ||
// Deprecated repository | ||
repositoryV1: { | ||
path: "/tmp/sourcify/repository", | ||
serverUrl: "http://localhost:10000", // Need to keep this as it's used in IpfsRepositoryService.ts fetchAllFileUrls. | ||
}, | ||
// Disable repositoryV2 by default for now, we will enable it once we start the synchronization script | ||
// repositoryV2: { | ||
// path: "/tmp/sourcify/repositoryV2", | ||
// }, | ||
solcRepo: "/tmp/solc-bin/linux-amd64", | ||
solJsonRepo: "/tmp/solc-bin/soljson", | ||
session: { | ||
secret: process.env.SESSION_SECRET || "CHANGE_ME", | ||
maxAge: 12 * 60 * 60 * 1000, // 12 hrs in millis | ||
secure: false, // Set Secure in the Set-Cookie header i.e. require https | ||
storeType: "memory", // Where to save the session info. "memory" is only good for testing and local development. Don't use it in production! | ||
}, | ||
// It is possible to outsource the compilation to a lambda function instead of running locally. Turned on in production. | ||
// Requires env vars AWS_REGION, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY | ||
lambdaCompiler: { | ||
enabled: false, | ||
// functionName: "compile", | ||
}, | ||
corsAllowedOrigins: [ | ||
/^https?:\/\/(?:.+\.)?sourcify.dev$/, // sourcify.dev and subdomains | ||
/^https?:\/\/(?:.+\.)?sourcify.eth$/, // sourcify.eth and subdomains | ||
/^https?:\/\/(?:.+\.)?sourcify.eth.link$/, // sourcify.eth.link and subdomains | ||
/^https?:\/\/(?:.+\.)?ipfs.dweb.link$/, // dweb links used by Brave browser etc. | ||
process.env.NODE_ENV !== "production" && /^https?:\/\/localhost(?::\d+)?$/, // localhost on any port | ||
], | ||
rateLimit: { | ||
enabled: false, | ||
// Check done with "startsWith" | ||
whitelist: [ | ||
"10.", // internal IP range | ||
"::ffff:10.", | ||
"127.0.0.1", | ||
"::ffff:127.0.0.1", | ||
"::1", | ||
], | ||
}, | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
- description: The current REST API server | ||
url: "" | ||
- description: The production REST API server | ||
url: "https://server-verify.hashscan.io" | ||
- description: The staging REST API server | ||
url: "https://server-sourcify.hedera-devops.com" | ||
- description: Local development server address on default port 5555 | ||
url: "http://localhost:5555" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"295": { | ||
"sourcifyName": "Hedera Mainnet", | ||
"supported": true | ||
}, | ||
"296": { | ||
"sourcifyName": "Hedera Testnet", | ||
"supported": true | ||
}, | ||
"297": { | ||
"sourcifyName": "Hedera Previewnet", | ||
"supported": true | ||
}, | ||
"298": { | ||
"sourcifyName": "Hedera Localnet", | ||
"supported": true, | ||
"rpc": [ | ||
"http://host.docker.internal:7546" | ||
] | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.