Skip to content

Commit

Permalink
Merge pull request #12 from Cybersecurity-LINKS/docs-mediterraneus
Browse files Browse the repository at this point in the history
Docs mediterraneus
  • Loading branch information
lucagiorgino committed May 22, 2024
2 parents 5a32a71 + f78910b commit f8627a6
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions docs_mediterraneus/running-the-protocol/issuer-rs.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,24 @@ description: Issuer of verifiable credentials using smart contracts to bind Exte

## Prepare environment

0. Generate contract bindings (to be done once or if contract change)
```bash
# assuming the mediterraneus-smart-contracts folder is located in the same root folder of mediterraneus-connector-rs
cd abigen
cargo run -- --contract Identity --abi-source "../../mediterraneus-smart-contracts/artifacts/contracts/Identity.sol/Identity.json"
```

1. Create a `.env` file starting from `.env.example` and update the values accordingly to your development enviroment.

```editorconfig
PRIVATE_KEY='<issuer private key>'
L2_PRIVATE_KEY='<issuer private key>'
NON_SECURE_MNEMONIC='<iota wallet mnemonic>'
KEY_STORAGE_MNEMONIC='<identity key storage mnemonic>'
IDENTITY_SC_ADDRESS='<address of the Identity smart contract>'
```

<!--
Optional:
- Update the `abi/identity_sc.json` file if there are changes to the Identity Smart Contract.
- Update the `abi/identity_sc.json` file if there are changes to the Identity Smart Contract. -->

## Running the Application

Expand All @@ -35,18 +42,16 @@ docker compose up -d
2. Run the issuer service
```shell
# For local node Provider
cargo run --release -- -l
# cargo run --release -- --custom-node http://127.0.0.1:8545/ --chain-id 31337
cargo run --release -- --rpc-provider "http://127.0.0.1:8545/" --chain-id 31337

# For Shimmer Provider
cargo run --release
# cargo run --release -- --custom-node https://json-rpc.evm.testnet.shimmer.network --chain-id 1072
cargo run --release -- --rpc-provider "https://json-rpc.evm.testnet.shimmer.network" --chain-id 1073

# For custom Provider (example Sepolia)
cargo run --release -- --custom-node https://sepolia.infura.io/v3/<API_KEY> --chain-id 11155111
# For Sepolia
cargo run --release -- --rpc-provider https://sepolia.infura.io/v3/<API_KEY> --chain-id 11155111
```

Keep in mind that when using the local node setup, the Identity ABI needs to be manually copied into the `abi` folder. Additionally, ensure that the file is named `idsc_abi.json`. On the other hand, when working with a public network, consider publishing the ABI and dynamically loading it through an API.
<!-- Keep in mind that when using the local node setup, the Identity ABI needs to be manually copied into the `abi` folder. Additionally, ensure that the file is named `idsc_abi.json`. On the other hand, when working with a public network, consider publishing the ABI and dynamically loading it through an API. -->

<!--
## Issuer initialization
Expand Down

0 comments on commit f8627a6

Please sign in to comment.