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

Docs mediterraneus #12

Merged
merged 2 commits into from
May 22, 2024
Merged
Changes from all commits
Commits
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
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
Loading