Skip to content

Commit

Permalink
Update docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
philllau committed Mar 13, 2023
1 parent 1e58008 commit 71d4602
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion mapclients/eth/deploy/config.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mapclients/eth/tasks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ task("initializeData",
"Write initialization data required by LightNode",
require("./initializeData")
)
.addParam("epoch", "The account's address")
.addParam("epoch", "The epoch number")
2 changes: 1 addition & 1 deletion mapclients/eth/tasks/initializeData.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ module.exports = async (taskArgs,hre) => {

fs.writeFileSync('./deploy/config.js', datar);

console.log(`write in epco ${data.result.epoch} success`)
console.log(`write in epoch ${data.result.epoch} success`)
}
2 changes: 1 addition & 1 deletion mapclients/near/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ EPOCH_ID=300 # get the information of this epoch id to initialize the MAP light

## Upgrade the contract

**NOTE**: currently the script works on MacOS only. Below `scripts` is in directory `../../mcs/near/map-cross-chain-service/`.
**NOTE**: currently the script works on MacOS only. Below `scripts` is in directory `../../mos/near/`.
```shell
MAP_CLIENT_WASM_FILE=/path/to/map/client/contract # new MAP light client contract wasm file

Expand Down
4 changes: 2 additions & 2 deletions mos/near/scripts/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ MASTER_ACCOUNT="maplabs.testnet" # make sure the account is already created on N
MCS_FACTORY_NAME=mfac # the name of mcs factory contract to be created, the account ID will be $MCS_FACTORY_NAME.$MASTER_ACCOUNT

# multisig contract
MULTISIG_NAME="multisig" # the name of multisig contract to be created, the account ID will be $MULTISIG_NAME.$MCS_FACTORY_NAME.$MASTER_ACCOUNT
MULTISIG_NAME="multisig2" # the name of multisig contract to be created, the account ID will be $MULTISIG_NAME.$MCS_FACTORY_NAME.$MASTER_ACCOUNT
MEMBERS=(m0.maplabs.testnet m1.maplabs.testnet m2.maplabs.testnet) # the multisig members list, make sure these accounts have been created on NEAR blockchain
CONFIRMS=2 # the multisig confirmation number to trigger the execution of the request
REQUEST_LOCK=3600 # request cooldown period in seconds (time before a request can be executed)
Expand All @@ -15,7 +15,7 @@ MAP_MCS_ADDRESS="B6c1b689291532D11172Fb4C204bf13169EC0dCA" # the mcs contract a
WNEAR_ACCOUNT="wrap.testnet" # wrapped near contract account on NEAR blockchain
NEAR_CHAIN_ID=5566818579631833089 # NEAR blockchain ID
MAP_CHAIN_ID=212 # MAP blockchain ID
CLIENT_ACCOUNT="client.cfac2.maplabs.testnet" # the account ID of the map light client contract which has already been deployed
CLIENT_ACCOUNT="client3.cfac2.maplabs.testnet" # the account ID of the map light client contract which has already been deployed

export MCS_FACTORY_ACCOUNT=$MCS_FACTORY_NAME.$MASTER_ACCOUNT
export MCS_ACCOUNT=$MCS_NAME.$MCS_FACTORY_ACCOUNT
Expand Down
4 changes: 3 additions & 1 deletion protocol/tasks/clientGetRange.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ module.exports = async (taskArgs,hre) => {
console.log("light client manager address:", managerAddress);
let manager = await ethers.getContractAt('LightClientManager', managerAddress);

let lightnode = await manager.lightClientContract(taskArgs.chain);

let header = await manager.headerHeight(taskArgs.chain);

let range = await manager.verifiableHeaderRange(taskArgs.chain);

console.log(`chain ${taskArgs.chain} height(${header}) verifiable header min(${range[0]}), max(${range[1]})`);
console.log(`chain ${taskArgs.chain} address(${lightnode}) height(${header}) verifiable header min(${range[0]}), max(${range[1]})`);
}
2 changes: 1 addition & 1 deletion protocol/tasks/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

task("LightClientRegister",
task("clientRegister",
"Deploy LightClientRegister",
require("./clientRegister")
)
Expand Down

0 comments on commit 71d4602

Please sign in to comment.