Skip to content
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

24/Service registry #28

Draft
wants to merge 23 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions VDA-Service-Registry/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ETHERSCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1
ROPSTEN_URL=https://eth-ropsten.alchemyapi.io/v2/<YOUR ALCHEMY KEY>
PRIVATE_KEY=0xabc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1
4 changes: 4 additions & 0 deletions VDA-Service-Registry/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
artifacts
cache
coverage
24 changes: 24 additions & 0 deletions VDA-Service-Registry/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
module.exports = {
env: {
browser: false,
es2021: true,
mocha: true,
node: true,
},
plugins: ["@typescript-eslint"],
extends: [
"standard",
"plugin:prettier/recommended",
"plugin:node/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 12,
},
rules: {
"node/no-unsupported-features/es-syntax": [
"error",
{ ignores: ["modules"] },
],
},
};
9 changes: 9 additions & 0 deletions VDA-Service-Registry/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
node_modules
.env
coverage
coverage.json
typechain

#Hardhat files
cache
artifacts
3 changes: 3 additions & 0 deletions VDA-Service-Registry/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
hardhat.config.ts
scripts
test
5 changes: 5 additions & 0 deletions VDA-Service-Registry/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
artifacts
cache
coverage*
gasReporterOutput.json
1 change: 1 addition & 0 deletions VDA-Service-Registry/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
7 changes: 7 additions & 0 deletions VDA-Service-Registry/.solhint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "solhint:recommended",
"rules": {
"compiler-version": ["error", "^0.8.0"],
"func-visibility": ["warn", { "ignoreConstructors": true }]
}
}
1 change: 1 addition & 0 deletions VDA-Service-Registry/.solhintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
44 changes: 44 additions & 0 deletions VDA-Service-Registry/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Service Registry Contract
## About

https://github.com/verida/blockchain-contracts/issues/24
## Installation
```shell
$ yarn install
```
## Usage
### Build
```shell
$ yarn compile
$ npx hardhat compile
```
### Test
```shell
$ yarn test
$ npx hardhat Test
```

## Deploying contracts to Testnet (Public)

### Deploy CLI
```shell
$ yarn deploy [NETWORK_NAME]
$ npx hardhat run scripts/deploy.ts --network [NETWORK_NAME]
```

### Verify Contract
```shell
$ yarn verify [NETWORK_NAME] [CONTRACT_ADDRESS] [...CONSTRUCTOR_PARAMS]
$ npx hardhat verify --network [NETWORK_NAME] [CONTRACT_ADDRESS] [...CONSTRUCTOR_PARAMS]
```
### Environment variable

Create a `.env` using `.env.example` file.

- .env.example
```
INFURA_API_KEY = "INFURA_API_KEY"
PRIVATE_KEY = "YOUR_PRIVATE_KEY"
MNEMONIC = "YOUR MNEMONIC"
REPORT_GAS = true/false
```
Loading