Crating ether-js client to interact with a Simple Smart Contract Using Cursor
In order to run this demo
- deploy the smart contract on Remix
- Take note of AES key and private key
Given:
-
coti documentation provided at https://docs.coti.io,
-
the COTI smart contracted provided contract/store.sol
-
and deplyed at 0x78953065c5bbD6035D58135a73f2caa9E050A373
-
PRIVATE_KEY 0x3b8ad7ca3cf54b1273004775afa88587b8d6bd8a970c84fe216f6febb477347d
-
AesKey 63f49d1ef7b1510060edcec934828b09
Write an Ether.Js Javascript based on the examples provided at https://github.com/coti-io/coti-ethers that calls the store.sol and print the privateNumber on the screen
Make sure to use CotiNetwork.Testnet
Given: 1. coti documentation p
-
coti documentation provided at https://docs.coti.io,
-
the COTI smart contracted provided
https://github.com/plucena/simple-cursor-demo/blob/main/contract/store.sol
-
and deplyed at 0x78953065c5bbD6035D58135a73f2caa9E050A373
-
PRIVATE_KEY 0x3b8ad7ca3cf54b1273004775afa88587b8d6bd8a970c84fe216f6febb477347d
-
AesKey 63f49d1ef7b1510060edcec934828b09
Write an Ether.Js Java script based on the examples provided at https://github.com/coti-io/coti-ethers that call the store.sol and sets the privateNumber to 99
Make sure to use CotiNetwork.Testnet
create an HTML file that will load the private number from the contract using the information in @coti-ethers/readPrivateNumber.js use coti-ethers library defined on @coti-ethers/browser/public/coti-ethers.bundle.js. Display PK, AES key