Skip to content

Commit

Permalink
Chopsticks RegionX (#48)
Browse files Browse the repository at this point in the history
* Chopsticks RegionX

* fix coremask

* region data
  • Loading branch information
Szegoo authored Jun 4, 2024
1 parent 1d82166 commit 692b08c
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 7 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,8 @@ cd Coretime-Mock
npm i
# This will run a parallel copy of the Coretime chain
npm run chopsticks
npm run chopsticks-coretime
# In a new terminal:
# This will add some mock data to the Coretime chain
npm run chopsticks-init
# It is also possible to run a parallel copy of the RegionX chain (assuming it is available on port 9920).
npm run chopsticks-regionx
```
66 changes: 66 additions & 0 deletions configs/regionx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
endpoint: ws://127.0.0.1:9920
mock-signature-host: true
db: ./db.sqlite

import-storage:
System:
Account:
- - - 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
- providers: 1
data:
free: 1000000000000000
Regions:
Regions:
[
[
[{ core: 0, begin: 8, mask: "0xffffffffffffffffffff" }],
{
owner: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,
locked: true,
record:
{
Available:
{
end: 100,
owner: "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
paid: null,
},
},
},
],
[
[{ core: 1, begin: 8, mask: "0xffffffffffffffffffff" }],
{
owner: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,
locked: true,
record:
{
Available:
{
end: 100,
owner: "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
paid: null,
},
},
},
],
]
Market:
Listings: [
[
[{ core: 0, begin: 8, mask: "0xffffffffffffffffffff" }],
{
seller: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,
timeslice_price: 100000000000, # 0.1 ROC / timeslice
sale_recipient: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,
},
],
[
[{ core: 1, begin: 8, mask: "0xffffffffffffffffffff" }],
{
seller: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,
timeslice_price: 1500000000000, # 0.15 ROC / timeslice
sale_recipient: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,
},
],
]
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"description": "",
"main": "index.js",
"scripts": {
"chopsticks": "npx @acala-network/chopsticks@latest -c ./configs/coretime-rococo.yml",
"chopsticks-coretime": "npx @acala-network/chopsticks@latest -c ./configs/coretime-rococo.yml",
"chopsticks-regionx": "npx @acala-network/chopsticks@latest -c ./configs/regionx.yml",
"zombienet": "./scripts/run_zombienet.sh full",
"chopsticks-init": "npx ts-node src/chopsticks.init.ts",
"init": "npx ts-node src/zombienet.init.ts",
"prettier": "prettier --write src/",
"lint": "eslint src --ext .ts,.tsx",
Expand Down

0 comments on commit 692b08c

Please sign in to comment.