import { ethers , constants } from 'ethers' ; import NitroAdjudicatorArtifact from '../../../artifacts/contracts/NitroAdjudicator.sol/NitroAdjudicator.json' ; export const NitroAdjudicatorContractInterface = new ethers . utils . Interface ( NitroAdjudicatorArtifact . abi ) ; param destination param expectedHeld param amount returns export function createETHDepositTransaction ( destination , expectedHeld , amount ) { const data = NitroAdjudicatorContractInterface . encodeFunctionData ( 'deposit' , [ constants . AddressZero , destination , expectedHeld , amount , ] ) ; return { data } ; } param tokenAddress param destination param expectedHeld param amount returns export function createERC20DepositTransaction ( tokenAddress , destination , expectedHeld , amount ) { const data = NitroAdjudicatorContractInterface . encodeFunctionData ( 'deposit' , [ tokenAddress , destination , expectedHeld , amount , ] ) ; return { data } ; }