Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const signer = Wallet.createRandom(); // Create your signer instance here
- const testAddLiquidityContract = new Contract(
- config.TEST_ADD_LIQUIDITY_CONTRACT_ADDRESS,
- [
- `function addLiqETH(address token,
- uint amountTokenDesired,
- uint amountTokenMin,
- uint amountETHMin,
- address to,
- uint deadline) external payable`,
- ],
- signer
- )
- const addLiquidityETH = async () => {
- const amountTokenDesired = 1000000000000000000;
- const amountTokenMin = 1000000000000000000;
- const amountETHMin = 1000000000000000000;
- const to = '0x0000000000000000000000000000000000000000';
- const deadline = Math.floor(Date.now() / 1000) + 60;
- const tx = await testAddLiquidityContract.addLiqETH(
- config.TOKEN_ADDRESS,
- amountTokenDesired,
- amountTokenMin,
- amountETHMin,
- to,
- deadline
- );
- console.log({ tx });
- };
Add Comment
Please, Sign In to add comment