From b60c4ca0072fb7405ead6e45d8b634f98dc862b3 Mon Sep 17 00:00:00 2001 From: Luca Giorgino <19236900+lucagiorgino@users.noreply.github.com> Date: Tue, 14 May 2024 16:54:14 +0200 Subject: [PATCH 1/2] Update issuer-rs.md --- docs_mediterraneus/running-the-protocol/issuer-rs.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/docs_mediterraneus/running-the-protocol/issuer-rs.md b/docs_mediterraneus/running-the-protocol/issuer-rs.md index e4b18e8..f58bbce 100644 --- a/docs_mediterraneus/running-the-protocol/issuer-rs.md +++ b/docs_mediterraneus/running-the-protocol/issuer-rs.md @@ -35,15 +35,13 @@ 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/ --chain-id 11155111 +# For Sepolia +cargo run --release -- --rpc-provider https://sepolia.infura.io/v3/ --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. From f78910b4b8e069c59d3a6f82deedb530fa4b7660 Mon Sep 17 00:00:00 2001 From: Luca Giorgino <19236900+lucagiorgino@users.noreply.github.com> Date: Wed, 22 May 2024 09:28:31 +0200 Subject: [PATCH 2/2] Update issuer-rs.md --- .../running-the-protocol/issuer-rs.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/docs_mediterraneus/running-the-protocol/issuer-rs.md b/docs_mediterraneus/running-the-protocol/issuer-rs.md index f58bbce..b1dc815 100644 --- a/docs_mediterraneus/running-the-protocol/issuer-rs.md +++ b/docs_mediterraneus/running-the-protocol/issuer-rs.md @@ -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='' +L2_PRIVATE_KEY='' NON_SECURE_MNEMONIC='' KEY_STORAGE_MNEMONIC='' IDENTITY_SC_ADDRESS='
' ``` - + ## Running the Application @@ -44,7 +51,7 @@ cargo run --release -- --rpc-provider "https://json-rpc.evm.testnet.shimmer.netw cargo run --release -- --rpc-provider https://sepolia.infura.io/v3/ --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. +