Skip to content

Commit

Permalink
quick-fix: assertion contracts tests (#2924)
Browse files Browse the repository at this point in the history
* add secrets

* add sleep

* add secret

* fmt

* remove console

* adding contracts to file-filter
  • Loading branch information
0xverin authored Jul 23, 2024
1 parent 10ee4c2 commit da4792b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/file-filter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ tee_test: &tee_test
- 'tee-worker/cli/*.sh'
- 'docker/**'
- 'tee-worker/docker/*.yml'
- 'tee-worker/litentry/core/assertion-build/src/dynamic/contracts/**'

bitacross_src: &bitacross_src
- 'bitacross-worker/**/*.rs'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@ describe('Test Vc (direct request)', function () {
const assertionId = '0x0000000000000000000000000000000000000003';
const createAssertionEventsPromise = subscribeToEvents('evmAssertions', 'AssertionCreated', context.api);

const proposal = context.api.tx.evmAssertions.createAssertion(assertionId, contractBytecode, [secret]);
const proposal = context.api.tx.evmAssertions.createAssertion(assertionId, contractBytecode, [
// At least three secrets are required here.
secret,
secret,
secret,
]);
await context.api.tx.developerCommittee.execute(proposal, proposal.encodedLength).signAndSend(alice);

const event = (await createAssertionEventsPromise).map((e) => e);
Expand Down Expand Up @@ -127,11 +132,12 @@ describe('Test Vc (direct request)', function () {

const abiCoder = new ethers.utils.AbiCoder();
const encodedData = abiCoder.encode(['string'], ['bnb']);

const assertion = {
dynamic: context.api.createType('DynamicParams', [
Uint8Array.from(Buffer.from('0000000000000000000000000000000000000003', 'hex')),
encodedData,
false,
true,
]),
};

Expand Down

0 comments on commit da4792b

Please sign in to comment.