Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c0e7183
add cross-env&&dotenv
0xverin Nov 30, 2022
1425dea
set env
0xverin Nov 30, 2022
9baf628
random shard for testing
0xverin Nov 30, 2022
93d6634
Change the versions of @polkadot
0xverin Nov 30, 2022
c88e52f
change the version of @polkadot/types
0xverin Nov 30, 2022
782d6a7
Merge branch 'bugfix-ts-tests' into ts-tests
0xverin Nov 30, 2022
fb5bd53
rm yarn.lock
0xverin Nov 30, 2022
2999730
change yarn.lock
0xverin Dec 2, 2022
bd5b780
generateChallengeCode
0xverin Dec 2, 2022
c51f03c
modify yarn run command
0xverin Dec 2, 2022
40eb6e5
change defaultSinger
0xverin Dec 2, 2022
737dcd7
add getSinger
0xverin Dec 2, 2022
5380b94
add Sign functions
0xverin Dec 2, 2022
c88261c
add getSinger && generateChallengeCode
0xverin Dec 2, 2022
964f199
add ID_HUB_URL for sign message
0xverin Dec 2, 2022
fb2dde8
modify defaultSigner
0xverin Dec 2, 2022
2c983bf
Merge branch 'tee-dev' into ts-tests
0xverin Dec 2, 2022
9a52341
modify shard
0xverin Dec 5, 2022
7784235
add ethers provider&&wallet
0xverin Dec 6, 2022
38a1dd6
add eth endpoint
0xverin Dec 6, 2022
60048ee
add @ethersproject/providers&&ethers
0xverin Dec 7, 2022
d42c0c8
substrate&&ethereum tests
0xverin Dec 7, 2022
96d6eb2
web3 types
0xverin Dec 7, 2022
794a196
nonce
0xverin Dec 7, 2022
35ba8fd
Merge branch 'tee-dev' into ts-tests
0xverin Dec 7, 2022
fa0876c
change methods name
0xverin Dec 7, 2022
99a9cd5
change methods name
0xverin Dec 7, 2022
bce9612
change events
0xverin Dec 7, 2022
a407f90
change methods name
0xverin Dec 8, 2022
9626f4a
change event
0xverin Dec 8, 2022
c8a4c37
modify method name
0xverin Dec 8, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
modify shard
  • Loading branch information
0xverin committed Dec 5, 2022
commit 9a523418e869993594934b3210d163770e42c64c
24 changes: 12 additions & 12 deletions tee-worker/ts-tests/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,20 @@ export async function initIntegrationTestContext(
types: teeTypes,
});
await cryptoWaitReady();
// const keys = (await api.query.sidechain.workerForShard.entries()) as [StorageKey, Codec][];
// let shard = "";
// for (let i = 0; i < keys.length; i++) {
// //TODO shard may be different from mr_enclave. The default value of shard is mr_enclave
// shard = keys[i][0].args[0].toHex();
// console.log("query worker shard: ", shard);
// break;
// }
// if (shard == "") {
// throw new Error("shard not found");
// }
const keys = (await api.query.sidechain.workerForShard.entries()) as [StorageKey, Codec][];
let shard = "";
for (let i = 0; i < keys.length; i++) {
//TODO shard may be different from mr_enclave. The default value of shard is mr_enclave
shard = keys[i][0].args[0].toHex();
console.log("query worker shard: ", shard);
break;
}
if (shard == "") {
throw new Error("shard not found");
}

// random shard for testing
let shard = randomAsHex(32);
// let shard = randomAsHex(32);

// const endpoint = "wss://localhost:2000"
const wsp = new WebSocketAsPromised(workerEndpoint, <Options>(<unknown>{
Expand Down