updated contracts and deploy scripts
This commit is contained in:
parent
41d2267fa7
commit
cc5f71983a
|
@ -36,7 +36,8 @@ library SwapHelper {
|
||||||
address[2] path;
|
address[2] path;
|
||||||
uint256 deadline;
|
uint256 deadline;
|
||||||
uint24 poolFee;
|
uint24 poolFee;
|
||||||
uint8 swapType;
|
uint8 swapFunctionType;
|
||||||
|
uint8 swapCurrencyType;
|
||||||
}
|
}
|
||||||
|
|
||||||
function decodeVaaPayload(
|
function decodeVaaPayload(
|
||||||
|
@ -83,6 +84,9 @@ library SwapHelper {
|
||||||
decoded.poolFee = encodedVm.payload.toUint16(index);
|
decoded.poolFee = encodedVm.payload.toUint16(index);
|
||||||
index += 2;
|
index += 2;
|
||||||
|
|
||||||
decoded.swapType = encodedVm.payload.toUint8(index);
|
decoded.swapFunctionType = encodedVm.payload.toUint8(index);
|
||||||
|
index += 1;
|
||||||
|
|
||||||
|
decoded.swapCurrencyType = encodedVm.payload.toUint8(index);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -9,6 +9,7 @@ module.exports = async function (deployer, network) {
|
||||||
const routerAddress = "0xE592427A0AEce92De3Edee1F18E0157C05861564";
|
const routerAddress = "0xE592427A0AEce92De3Edee1F18E0157C05861564";
|
||||||
const feeTokenAddress = "0x36Ed51Afc79619b299b238898E72ce482600568a"; // wUST
|
const feeTokenAddress = "0x36Ed51Afc79619b299b238898E72ce482600568a"; // wUST
|
||||||
const tokenBridgeAddress = "0xF890982f9310df57d00f659cf4fd87e65adEd8d7";
|
const tokenBridgeAddress = "0xF890982f9310df57d00f659cf4fd87e65adEd8d7";
|
||||||
|
const wrappedEthAddress = "0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6";
|
||||||
|
|
||||||
await deployer.deploy(SwapHelper);
|
await deployer.deploy(SwapHelper);
|
||||||
await deployer.link(SwapHelper, CrossChainSwapV3);
|
await deployer.link(SwapHelper, CrossChainSwapV3);
|
||||||
|
@ -16,14 +17,15 @@ module.exports = async function (deployer, network) {
|
||||||
CrossChainSwapV3,
|
CrossChainSwapV3,
|
||||||
routerAddress,
|
routerAddress,
|
||||||
feeTokenAddress,
|
feeTokenAddress,
|
||||||
tokenBridgeAddress
|
tokenBridgeAddress,
|
||||||
|
wrappedEthAddress
|
||||||
);
|
);
|
||||||
|
|
||||||
// save the contract address somewhere
|
// save the contract address somewhere
|
||||||
await fsp.mkdir(scriptsAddressPath, { recursive: true });
|
await fsp.mkdir(scriptsAddressPath, { recursive: true });
|
||||||
|
|
||||||
await fsp.writeFile(
|
await fsp.writeFile(
|
||||||
`${scriptsAddressPath}/${network}.ts`,
|
`${scriptsAddressPath}/goerli.ts`,
|
||||||
`export const SWAP_CONTRACT_ADDRESS = '${CrossChainSwapV3.address}';`
|
`export const SWAP_CONTRACT_ADDRESS = '${CrossChainSwapV3.address}';`
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ module.exports = async function (deployer, network) {
|
||||||
const routerAddress = "0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff"; // quickwap
|
const routerAddress = "0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff"; // quickwap
|
||||||
const feeTokenAddress = "0xe3a1c77e952b57b5883f6c906fc706fcc7d4392c"; // wUST
|
const feeTokenAddress = "0xe3a1c77e952b57b5883f6c906fc706fcc7d4392c"; // wUST
|
||||||
const tokenBridgeAddress = "0x377D55a7928c046E18eEbb61977e714d2a76472a";
|
const tokenBridgeAddress = "0x377D55a7928c046E18eEbb61977e714d2a76472a";
|
||||||
|
const wrappedMaticAddress = "0x9c3c9283d3e44854697cd22d3faa240cfb032889";
|
||||||
|
|
||||||
await deployer.deploy(SwapHelper);
|
await deployer.deploy(SwapHelper);
|
||||||
await deployer.link(SwapHelper, CrossChainSwapV2);
|
await deployer.link(SwapHelper, CrossChainSwapV2);
|
||||||
|
@ -16,7 +17,8 @@ module.exports = async function (deployer, network) {
|
||||||
CrossChainSwapV2,
|
CrossChainSwapV2,
|
||||||
routerAddress,
|
routerAddress,
|
||||||
feeTokenAddress,
|
feeTokenAddress,
|
||||||
tokenBridgeAddress
|
tokenBridgeAddress,
|
||||||
|
wrappedMaticAddress
|
||||||
);
|
);
|
||||||
|
|
||||||
// save the contract address somewhere
|
// save the contract address somewhere
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
goerli*.ts
|
goerli.ts
|
||||||
mumbai*.ts
|
mumbai.ts
|
||||||
|
|
Loading…
Reference in New Issue