Skip to content

Commit

Permalink
Update smart contract instance
Browse files Browse the repository at this point in the history
  • Loading branch information
DOBEN committed May 1, 2024
1 parent 4c10842 commit 172733f
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion trackAndTrace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ For this to work, you should do the following:
e.g.

```bash
TRACK_AND_TRACE_CONTRACT_ADDRESS="<8886,0>" TRACK_AND_TRACE_PRIVATE_KEY_FILE="./private-keys/4SizPU2ipqQQza9Xa6fUkQBCDjyd1vTNUNDGbBeiRGpaJQc6qX.export" docker-compose up
TRACK_AND_TRACE_CONTRACT_ADDRESS="<8901,0>" TRACK_AND_TRACE_PRIVATE_KEY_FILE="./private-keys/4SizPU2ipqQQza9Xa6fUkQBCDjyd1vTNUNDGbBeiRGpaJQc6qX.export" docker-compose up
```

5. Access the frontend at `http://localhost:8080`
Expand Down
4 changes: 2 additions & 2 deletions trackAndTrace/frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ yarn dev
e.g.

```bash
TRACK_AND_TRACE_CONTRACT_ADDRESS="<8886,0>" yarn dev
TRACK_AND_TRACE_CONTRACT_ADDRESS="<8901,0>" yarn dev
```

This will launch a development server with hot module replacement enabled.
Expand All @@ -54,7 +54,7 @@ You must always set `TRACK_AND_TRACE_CONTRACT_ADDRESS`. The rest have default va
When hosting the frontend via the [backend server](../indexer), the values environment variables are passed in via the server.

```bash
TRACK_AND_TRACE_CONTRACT_ADDRESS=<8886,0> # Contract address of the track and trace contract. *Must be set.*
TRACK_AND_TRACE_CONTRACT_ADDRESS=<8901,0> # Contract address of the track and trace contract. *Must be set.*
TRACK_AND_TRACE_NETWORK=testnet # The network to use mainnet/testnet (defaults to 'testnet')
TRACK_AND_TRACE_NODE=https://grpc.testnet.concordium.com:20000 # The gRPC endpoint of a node in the chosen network (defaults to 'https://grpc.testnet.concordium.com:20000')
TRACK_AND_TRACE_SPONSORED_BACKEND_API=http://localhost:8000 # Endpoint to the sponsored transaction service (defaults to 'http://localhost:8000')
Expand Down
2 changes: 1 addition & 1 deletion trackAndTrace/frontend/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function validateAccountAddress(accountAddress: string | undefined) {
try {
AccountAddress.fromBase58(accountAddress);
} catch (e) {
return `Please enter a valid account address. It is a base58 string with a fixed length of 50 characters.Original error: ${
return `Please enter a valid account address. It is a base58 string with a fixed length of 50 characters. Original error: ${
(e as Error).message
}.`;
}
Expand Down
6 changes: 3 additions & 3 deletions trackAndTrace/indexer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Each event can be uniquely identified by the `transaction_hash` and `event_index
## Run the `indexer`

```console
cargo run --bin indexer -- --node https://grpc.testnet.concordium.com:20000 --contract "<8886,0>" --log-level debug
cargo run --bin indexer -- --node https://grpc.testnet.concordium.com:20000 --contract "<8901,0>" --log-level debug
```

## Configure the `indexer`
Expand All @@ -64,7 +64,7 @@ There are a few options to configure the indexer:

- `--node` is the endpoint to the Concordium node grpc v2 API. If not specified, the default value `https://grpc.testnet.concordium.com:20000` is used.

- `--contract` is the contract index of the track-and-trace smart contract, e.g. <8886,0>.
- `--contract` is the contract index of the track-and-trace smart contract, e.g. <8901,0>.

- `--db-connection` should specify your postgreSQL database connection. If not specified, the default value `host=localhost dbname=indexer user=postgres password=password port=5432` is used.

Expand Down Expand Up @@ -111,5 +111,5 @@ cargo run --bin server -- --contract-address <YOUR_CONTRACT_ADDRESS>
An example to run the service with some filled in example settings would be:

``` console
cargo run --bin server -- --contract-address "<8886,0>"
cargo run --bin server -- --contract-address "<8901,0>"
```
2 changes: 1 addition & 1 deletion trackAndTrace/sponsored-transaction-service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ cargo run --release -- \
--node https://grpc.testnet.concordium.com:20000 \
--private-key-file 3PXwJYYPf6fyVb4GJquxSZU8puxrHfzc4XogdMVot8MUQK53tW.export \
--allowed-accounts "3rsc7HNLVKnFz9vmKkAaEMVpNkFA4hZxJpZinCtUTJbBh58yYi 3kBx2h5Y2veb4hZgAJWPrr8RyQESKm5TjzF3ti1QQ4VSYLwK1G" \
--allowed-contracts "<8886,0> <111,0> <222,0>"
--allowed-contracts "<8901,0> <111,0> <222,0>"
```

To get your account file (the `3PXwJYYPf6fyVb4GJquxSZU8puxrHfzc4XogdMVot8MUQK53tW.export` file in the above example), [export it from the Concordium Browser wallet for web](https://developer.concordium.software/en/mainnet/net/guides/export-key.html).
Expand Down
6 changes: 3 additions & 3 deletions trackAndTrace/test-scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,18 @@ To run the script use for example the following command in this folder:
cargo run --release -- --node https://grpc.testnet.concordium.com:20000 --admin-key-file ./4bbdAUCDK2D6cUvUeprGr4FaSaHXKuYmYVjyCa4bXSCu3NUXzA.export --module ../smart-contract/concordium-out/module.wasm.v1 --num-items 2 --input-parameter-file ./inputParameter.json
```

assuming the wallet export file `/4SizPU2ipqQQza9Xa6fUkQBCDjyd1vTNUNDGbBeiRGpaJQc6qX.export` is in this directory.
assuming the wallet export file `/4bbdAUCDK2D6cUvUeprGr4FaSaHXKuYmYVjyCa4bXSCu3NUXzA.export` is in this directory.


To get your account file (the `4SizPU2ipqQQza9Xa6fUkQBCDjyd1vTNUNDGbBeiRGpaJQc6qX.export` file in the above example), export it from the [Concordium Browser wallet for web](http://developer.concordium.software/en/mainnet/net/guides/export-key.html).
To get your account file (the `4bbdAUCDK2D6cUvUeprGr4FaSaHXKuYmYVjyCa4bXSCu3NUXzA.export` file in the above example), export it from the [Concordium Browser wallet for web](http://developer.concordium.software/en/mainnet/net/guides/export-key.html).


###

The script will run a series of transactions. The output will be similar to:

```
Starting script with admin account 4SizPU2ipqQQza9Xa6fUkQBCDjyd1vTNUNDGbBeiRGpaJQc6qX.
Starting script with admin account 4bbdAUCDK2D6cUvUeprGr4FaSaHXKuYmYVjyCa4bXSCu3NUXzA.
Source module with reference f94a1503030142b4dfdd6667875403783e6f457eafb020f0a957270cfe7499e9 already exists.
The maximum amount of NRG allowed for the transaction is 4075.
Transaction a2cc66c2e674af64e5a7b85ec1b97e87f9433a21f5ffdc795c038c0f7195a712 submitted. Waiting for finalization.
Expand Down

0 comments on commit 172733f

Please sign in to comment.