From 8d3ec4b31a141385cee81adf314da3e27c0a163f Mon Sep 17 00:00:00 2001 From: MikkySnow Date: Mon, 18 Mar 2024 10:59:52 +0000 Subject: [PATCH] test: update test --- tests/solidity/hardhat.config.js | 2 +- tests/solidity/test/ComplianceBridge.js | 24 ++++++++++++++++++++++++ tests/solidity/test/testUtils.js | 2 +- 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 tests/solidity/test/ComplianceBridge.js diff --git a/tests/solidity/hardhat.config.js b/tests/solidity/hardhat.config.js index 7824cc2d..b7b0c2cd 100644 --- a/tests/solidity/hardhat.config.js +++ b/tests/solidity/hardhat.config.js @@ -7,7 +7,7 @@ module.exports = { tronik: { url: "http://localhost:8545", accounts: [ - "F8FBAD01F31AF55D55A6967AAEA8ABB42E301F085895ADA0FB0C3BC2A5BA9371", + "DBE7E6AE8303E055B68CEFBF01DEC07E76957FF605E5333FA21B6A8022EA7B55", "13B2DE5CFDF24796472F572B87D0732406B323F70A38FA244FE0A86736B77DFA", ], chainId: 1291 diff --git a/tests/solidity/test/ComplianceBridge.js b/tests/solidity/test/ComplianceBridge.js new file mode 100644 index 00000000..cce5927b --- /dev/null +++ b/tests/solidity/test/ComplianceBridge.js @@ -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() + }) +}) \ No newline at end of file diff --git a/tests/solidity/test/testUtils.js b/tests/solidity/test/testUtils.js index ec00c0e9..84627fae 100644 --- a/tests/solidity/test/testUtils.js +++ b/tests/solidity/test/testUtils.js @@ -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 }) }