Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/pool fees #10

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
4 changes: 2 additions & 2 deletions packages/foundry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ Our tests don't cover Automation & Functions, once the JavaScript code is still
- contracts/ConceroChildPool.sol
- contracts/ConceroAutomation.sol
- contracts/LPToken.sol**
- Libraries/ParentStorage.sol - it's ParentPool.sol Storage
- Libraries/ChildStorage.sol - it's ConceroChildPool.sol Storage
- Libraries/ParentPoolStorage.sol - it's ParentPool.sol Storage
- Libraries/ChildPoolStorage.sol - it's ConceroChildPool.sol Storage
- Proxy/ParentPoolProxy.sol***
- Proxy/ChildPoolProxy.sol***
```
Expand Down
408 changes: 0 additions & 408 deletions packages/foundry/coverage.txt

This file was deleted.

304 changes: 304 additions & 0 deletions packages/foundry/coverageTwo.txt

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions packages/foundry/script/ChildPoolDeploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,18 @@ contract ChildPoolDeploy is Script {

function run(
address _orchestratorProxy,
address _masterPoolProxyAddress,
address _childProxy,
address _link,
address _ccipRouter,
uint64 _destinationChainSelector,
address _usdc,
address _owner
) public returns(ConceroChildPool child){
vm.startBroadcast();
child = new ConceroChildPool(
_orchestratorProxy,
_masterPoolProxyAddress,
_childProxy,
_link,
_ccipRouter,
_destinationChainSelector,
_usdc,
_owner
);
Expand Down
6 changes: 3 additions & 3 deletions packages/foundry/script/ParentPoolDeploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity 0.8.20;

import {Script, console2} from "../lib/forge-std/src/Script.sol";
import {ParentPool} from "contracts/ParentPool.sol";
import {ConceroParentPool} from "contracts/ConceroParentPool.sol";

contract ParentPoolDeploy is Script {

Expand All @@ -19,9 +19,9 @@ contract ParentPoolDeploy is Script {
address _automation,
address _orchestrator,
address _owner
) public returns(ParentPool pool){
) public returns(ConceroParentPool pool){
vm.startBroadcast();
pool = new ParentPool(
pool = new ConceroParentPool(
_proxy,
_link,
_donId,
Expand Down
6 changes: 1 addition & 5 deletions packages/foundry/script/TestnetChildPoolDeploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,19 @@ import {ConceroChildPool} from "contracts/ConceroChildPool.sol";
contract TestnetChildPoolDeploy is Script {

address _orchestratorProxy = address(0);
address _masterPoolProxyAddress = 0x4f4549e3349144C1eFD843f778FDcAaAbc65C9E3;
address _childProxy = 0xb9b4eb0088cD3d98fF7A30a8e7DeE5eCdcC290B2;
address _link = 0xE4aB69C077896252FAFBD49EFD26B5D171A32410;
address _ccipRouter = 0xD3b06cEbF099CE7DA4AcCf578aaebFDBd6e88a93;
uint64 _destinationChainSelector = 10344971235874465080;
address _usdc = 0x036CbD53842c5426634e7929541eC2318f3dCF7e;
address _owner = 0x5FA769922a6428758fb44453815e2c436c57C3c7;

function run() public returns(ConceroChildPool child){
vm.startBroadcast();
child = new ConceroChildPool(
_orchestratorProxy,
_masterPoolProxyAddress,
_childProxy,
_link,
_ccipRouter,
_destinationChainSelector,
_ccipRouter,
_usdc,
_owner
);
Expand Down
6 changes: 3 additions & 3 deletions packages/foundry/script/TestnetParentPoolDeploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity 0.8.20;

import {Script, console2} from "../lib/forge-std/src/Script.sol";
import {ParentPool} from "contracts/ParentPool.sol";
import {ConceroParentPool} from "contracts/ConceroParentPool.sol";

contract TestnetParentPoolDeploy is Script {
address _proxy = 0x4f4549e3349144C1eFD843f778FDcAaAbc65C9E3;
Expand All @@ -17,9 +17,9 @@ contract TestnetParentPoolDeploy is Script {
address _orchestrator = address(0);
address _owner = 0xd2Cb8786C0Ec3680C55C9256371F3577fE1C6A9e;

function run() public returns(ParentPool pool){
function run() public returns(ConceroParentPool pool){
vm.startBroadcast();
pool = new ParentPool(
pool = new ConceroParentPool(
_proxy,
_link,
_donId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {Test, console} from "forge-std/Test.sol";

//Master & Infra Contracts
import {DexSwap} from "contracts/DexSwap.sol";
import {ParentPool} from "contracts/ParentPool.sol";
import {ConceroParentPool} from "contracts/ConceroParentPool.sol";
import {ConceroBridge} from "contracts/ConceroBridge.sol";
import {Orchestrator} from "contracts/Orchestrator.sol";
import {LPToken} from "contracts/LPToken.sol";
Expand Down Expand Up @@ -69,7 +69,7 @@ contract InfraIntegration is Test {

//==== Instantiate Base Contracts
DexSwap public dex;
ParentPool public pool;
ConceroParentPool public pool;
ConceroBridge public concero;
Orchestrator public orch;
Orchestrator public orchEmpty;
Expand Down Expand Up @@ -114,7 +114,7 @@ contract InfraIntegration is Test {
//==== Wrapped contract
Orchestrator wInfraSrc;
Orchestrator wInfraDst;
ParentPool wMaster;
ConceroParentPool wMaster;
ConceroChildPool wChild;


Expand Down Expand Up @@ -296,7 +296,7 @@ contract InfraIntegration is Test {
vm.prank(ProxyOwner);
proxyInterfaceMaster.upgradeToAndCall(address(pool), "");

wMaster = ParentPool(payable(address(masterProxy)));
wMaster = ConceroParentPool(payable(address(masterProxy)));

//====== Update the MINTER on the LP Token
vm.prank(Tester);
Expand Down Expand Up @@ -365,11 +365,9 @@ contract InfraIntegration is Test {

child = childDeployArbitrum.run(
address(proxyDst),
address(masterProxy),
address(childProxy),
link,
ccipRouterLocalDst,
localChainSelector,
address(mUSDC),
Tester
);
Expand Down Expand Up @@ -409,7 +407,7 @@ contract InfraIntegration is Test {

//Parent Pool
wMaster.setConceroContractSender(localChainSelector, address(wChild), 1);
wMaster.setPoolsToSend(localChainSelector, address(wChild));
wMaster.setPools(localChainSelector, address(wChild), false);

//Child Pool
wChild.setConceroContractSender(localChainSelector, address(wMaster), 1);
Expand Down
Loading