Skip to content

Commit f32c3af

Browse files
author
Michael Müller
authored
Update delegator readme (#766)
1 parent 2f3b36e commit f32c3af

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed
93.2 KB
Loading

examples/delegator/README.md

+11-4
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,25 @@ It consists in total of 4 different smart contract:
99
- Subber: Decreases a value in the Accumulator smart contract
1010
- Accumulator: Owns a simple `i32` value that can be incremented or decremented
1111

12-
In order to test this bundle of smart contracts you need to do the following:
12+
In order to test this bundle of smart contracts you need to execute the
13+
following steps.
14+
15+
You can upload the contracts using our [Canvas UI](https://paritytech.github.io/canvas-ui/#/).
16+
If you want to test it locally, our [Canvas Node](https://paritytech.github.io/ink-docs/getting-started/setup#installing-the-canvas-node)
17+
is an easy way to get a local smart contract chain running.
1318

1419
1. Compile all contracts using the `./build-all.sh` script.
1520
You will receive the respective `.contract` bundles for all the smart contracts in the `target/ink/` folder:
1621
* `target/ink/delegator.contract`
1722
* `target/ink/adder/adder.contract`
1823
* `target/ink/subber/subber.contract`
1924
* `target/ink/accumulator/accumulator.contract`
20-
1. Upload the `.contract` bundle of Accumulator, Adder, Subber and the Delegator to the chain.
21-
While doing so note down their respective code hashes. You will see the contract hash on the success page
22-
(or success event) after having uploaded the contract to the chain.
25+
1. Upload the `.contract` bundle of Accumulator, Adder and Subber to the chain.
26+
1. Note down the respective code hashes of the uploaded contracts. You can
27+
copy the contract hashes [from the page of uploaded contracts](https://paritytech.github.io/canvas-ui/#/instantiate):<br/>
28+
[<img src="./.images/code-hashes.png" width="600" alt="Code Hashes Overview" />](https://paritytech.github.io/canvas-ui/#/instantiate)
2329
1. Instantiate the Delegator smart contract given all of the code hashes and a starting value.
30+
Make sure the endowment is big enough (if you're using our `canvas-node` it's `1000000`).
2431
The Delegator smart contract will take over the work of instantiating the other smart contracts for you.
2532
1. Now you are able to run the operations provided by the Delegator smart contract.
2633
Namely `delegate` to delegate the call to either the Adder or the Subber to either increase or decrease

0 commit comments

Comments
 (0)