Skip to content

YaruLabs/simple_contract

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crating ether-js client to interact with a Simple Smart Contract Using Cursor

In order to run this demo

  1. deploy the smart contract on Remix
  2. Take note of AES key and private key

read-private-number

Given:

  1. coti documentation provided at https://docs.coti.io,

  2. the COTI smart contracted provided contract/store.sol

  3. and deplyed at 0x78953065c5bbD6035D58135a73f2caa9E050A373

  4. PRIVATE_KEY 0x3b8ad7ca3cf54b1273004775afa88587b8d6bd8a970c84fe216f6febb477347d

  5. 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

set private number

Given: 1. coti documentation p

  1. coti documentation provided at https://docs.coti.io,

  2. the COTI smart contracted provided

https://github.com/plucena/simple-cursor-demo/blob/main/contract/store.sol

  1. and deplyed at 0x78953065c5bbD6035D58135a73f2caa9E050A373

  2. PRIVATE_KEY 0x3b8ad7ca3cf54b1273004775afa88587b8d6bd8a970c84fe216f6febb477347d

  3. 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 UI

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published