mirror of
https://github.com/tornadocash/tornado-nova
synced 2024-02-02 14:53:56 +01:00
16 lines
531 B
JavaScript
16 lines
531 B
JavaScript
const { ethers } = require('hardhat')
|
|
|
|
const abi = new ethers.utils.AbiCoder()
|
|
|
|
function encodeDataForBridge({ proof, extData }) {
|
|
return abi.encode(
|
|
[
|
|
'tuple(bytes proof,bytes32 root,bytes32[] inputNullifiers,bytes32[2] outputCommitments,uint256 publicAmount,bytes32 extDataHash)',
|
|
'tuple(address recipient,int256 extAmount,address relayer,uint256 fee,bytes encryptedOutput1,bytes encryptedOutput2,bool isL1Withdrawal,uint256 l1Fee)',
|
|
],
|
|
[proof, extData],
|
|
)
|
|
}
|
|
|
|
module.exports = { encodeDataForBridge }
|