Skip to content

Commit

Permalink
test: update test
Browse files Browse the repository at this point in the history
  • Loading branch information
MikkySnow committed Mar 18, 2024
1 parent 76d3301 commit 8d3ec4b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/solidity/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = {
tronik: {
url: "http://localhost:8545",
accounts: [
"F8FBAD01F31AF55D55A6967AAEA8ABB42E301F085895ADA0FB0C3BC2A5BA9371",
"DBE7E6AE8303E055B68CEFBF01DEC07E76957FF605E5333FA21B6A8022EA7B55",
"13B2DE5CFDF24796472F572B87D0732406B323F70A38FA244FE0A86736B77DFA",
],
chainId: 1291
Expand Down
24 changes: 24 additions & 0 deletions tests/solidity/test/ComplianceBridge.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
const { expect } = require("chai");
const { ethers } = require("hardhat")
const { sendShieldedTransaction, sendShieldedQuery } = require("./testUtils")

describe('ComplianceBridge', () => {
let contract

before(async () => {
const Counter = await ethers.getContractFactory('ComplianceProxy')
contract = await Counter.deploy()
await contract.deployed()
})

it('Should be able to add verification details', async () => {
const [signer] = await ethers.getSigners()

const tx = await sendShieldedTransaction(
signer,
contract.address,
contract.interface.encodeFunctionData("markUserAsVerified", [signer.address])
)
await tx.wait()
})
})
2 changes: 1 addition & 1 deletion tests/solidity/test/testUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports.sendShieldedTransaction = async (signer, destination, data, value
to: destination,
data: encryptedData,
value,
// gasPrice: 0 // We're using 0 gas price in tests. Comment it, if you're running tests on actual network
gasPrice: 0 // We're using 0 gas price in tests. Comment it, if you're running tests on actual network
})
}

Expand Down

0 comments on commit 8d3ec4b

Please sign in to comment.