mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
proxy updated
This commit is contained in:
parent
cb2db91f17
commit
f8e1e83213
|
|
@ -7,7 +7,7 @@ import "./interface.sol";
|
|||
|
||||
contract Helpers is Basic {
|
||||
|
||||
IUniLimitOrder public constant limitCon_ = IUniLimitOrder(0xfC428E6535dC5Fee30fb57cFc93EBB1D92fdCf6e);
|
||||
IUniLimitOrder public constant limitCon_ = IUniLimitOrder(0x94F401fAD3ebb89fB7380f5fF6E875A88E6Af916);
|
||||
|
||||
struct MintParams {
|
||||
address token0;
|
||||
|
|
@ -39,11 +39,11 @@ contract Helpers is Basic {
|
|||
|
||||
if(params_.token0to1){
|
||||
amountSend_ = params_.amount == type(uint128).max ? getTokenBal(TokenInterface(params_.token0)) : params_.amount;
|
||||
convertMaticToWmatic(address(token0_) == wmaticAddr, token0_, amountSend_);
|
||||
convertMaticToWmatic(address(token0_) == maticAddr, token0_, amountSend_);
|
||||
approve(token0_, address(limitCon_), amountSend_);
|
||||
} else {
|
||||
amountSend_ = params_.amount == type(uint128).max ? getTokenBal(TokenInterface(params_.token1)) : params_.amount;
|
||||
convertMaticToWmatic(address(token1_) == wmaticAddr, token1_, amountSend_);
|
||||
convertMaticToWmatic(address(token1_) == maticAddr, token1_, amountSend_);
|
||||
approve(token1_, address(limitCon_), amountSend_);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ contract LimitOrderConnector is Helpers {
|
|||
int24 tickUpper_,
|
||||
uint256 amount_,
|
||||
bool token0to1_,
|
||||
uint256 getId_,
|
||||
uint256 setId_
|
||||
)
|
||||
external
|
||||
|
|
@ -38,8 +37,6 @@ contract LimitOrderConnector is Helpers {
|
|||
token0to1_
|
||||
);
|
||||
|
||||
params_.amount = getUint(getId_, amount_);
|
||||
|
||||
(
|
||||
uint256 tokenId_,
|
||||
uint256 liquidity_,
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ const mnemonic =
|
|||
|
||||
const networkGasPriceConfig: Record<string, string> = {
|
||||
"mainnet": "160",
|
||||
"polygon": "50",
|
||||
"polygon": "100",
|
||||
"avalanche": "50",
|
||||
"arbitrum": "2"
|
||||
}
|
||||
|
|
|
|||
32
scripts/deployment/deployLimit.js
Normal file
32
scripts/deployment/deployLimit.js
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
// We require the Hardhat Runtime Environment explicitly here. This is optional
|
||||
// but useful for running the script in a standalone fashion through `node <script>`.
|
||||
//
|
||||
// When running the script with `npx hardhat run <script>` you'll find the Hardhat
|
||||
// Runtime Environment's members available in the global scope.
|
||||
const hre = require("hardhat");
|
||||
|
||||
async function main() {
|
||||
// Hardhat always runs the compile task when running scripts with its command
|
||||
// line interface.
|
||||
//
|
||||
// If this script is run directly using `node` you may want to call compile
|
||||
// manually to make sure everything is compiled
|
||||
// await hre.run('compile');
|
||||
|
||||
// We get the contract to deploy
|
||||
const Greeter = await hre.ethers.getContractFactory("ConnectV2LimitOrder");
|
||||
const greeter = await Greeter.deploy();
|
||||
|
||||
await greeter.deployed();
|
||||
|
||||
console.log("Greeter deployed to:", greeter.address);
|
||||
}
|
||||
|
||||
// We recommend this pattern to be able to use async/await everywhere
|
||||
// and properly handle errors.
|
||||
main()
|
||||
.then(() => process.exit(0))
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
process.exit(1);
|
||||
});
|
||||
Loading…
Reference in New Issue
Block a user