import {
Token,
AMM,
Trade,
TradeType,
} from '@friendlymarket/friendly-swap-sdk';
import { CLPublicKey, DeployUtil } from 'casper-js-sdk';
const ETH = new Token(
'Ethereum',
'ETH',
18,
'012f8f3689ddf5c7a92ddeb54a311afb660051bb5fab3568dbb3d796809be8c6',
'012f8f3689ddf5c7a92ddeb54a311afb660051bb5fab3568dbb3d796809be8c6'
);
const WCSPR = new Token(
'Wrapped Casper',
'WCSPR',
9,
'40bd4a45c414df61be3832e28ff6dcedc479744707c611fd97fea0d90619146f',
'40bd4a45c414df61be3832e28ff6dcedc479744707c611fd97fea0d90619146f'
);
const route = await Route.getPath(
ETH,
USDC,
'http://localhost:5123/api/v1/amm/pair'
);
const trade = new Trade({
route,
amount: 1,
tradeType: TradeType.EXACT_INPUT,
});
const deploy: DeployUtil.Deploy = trade.getDeploy({
traderPublicKey: CLPublicKey.fromHex(''),
deadline: new Date().getTime() + 1000 * 60 * 20, // 20 minutes
paymentAmount: 'GAS_PAYMENT_AMOUNT',
});