Skip to content

Commit

Permalink
generic factory not working
Browse files Browse the repository at this point in the history
  • Loading branch information
daopunk committed Jan 4, 2024
1 parent ca5a467 commit 73b7710
Show file tree
Hide file tree
Showing 5 changed files with 386 additions and 329 deletions.
160 changes: 160 additions & 0 deletions broadcast/DeployFactories.s.sol/421614/run-1704405632.json

Large diffs are not rendered by default.

160 changes: 160 additions & 0 deletions broadcast/DeployFactories.s.sol/421614/run-1704405654.json

Large diffs are not rendered by default.

377 changes: 52 additions & 325 deletions broadcast/DeployFactories.s.sol/421614/run-latest.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions script/Registry.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ address constant RELAYER_DATA = 0x1F17CB9B80192E5C6E9BbEdAcc5F722a4e93f16e;
address constant ROUTER = 0x2a004eA6266eA1A340D1a7D78F1e0F4e9Ae2e685;

// Camelot Relayer
address constant CAMELOT_RELAYER_FACTORY = 0x6C87b6e2E651cc4ebcE3Ba782037898dDDB445bF; // from pre-deployment
address constant CAMELOT_RELAYER_FACTORY = 0x92Bfb4D96f0b8dcA8F6e5E0fc4713DEa8243d9D6; // from pre-deployment
address constant RELAYER_ONE = 0xa430DD704aC39756fbA7C26FEAF9A220741c05b0;

// Chainlink Relayer
address constant CHAINLINK_RELAYER_FACTORY = 0x253c08EeB065F8940A8277901c91Ab4931d19044; // from pre-deployment
address constant CHAINLINK_RELAYER_FACTORY = 0x321D55f347095cdA4Ec8d10B63cD099396D1eb29; // from pre-deployment

// Denominated Oracle
address constant DENOMINATED_ORACLE_FACTORY = 0xD2823Cf1F062b2E92Fc33cd733a359fEFBA607dC; // from pre-deployment
address constant DENOMINATED_ORACLE_FACTORY = 0xaF3A59b1794d0E51197CED02AEb87E14DEf07aCf; // from pre-deployment

// Chainlink feeds
address constant SEPOLIA_CHAINLINK_ETH_USD_FEED = 0xd30e2101a97dcbAeBCBC04F14C3f624E67A35165;
Expand Down
12 changes: 11 additions & 1 deletion script/dexrelayer/CallResult.s.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.7.6;
pragma abicoder v2;

import '@script/Registry.s.sol';
import {Script} from 'forge-std/Script.sol';
import {Test} from 'forge-std/Test.sol';
import {IAlgebraPool} from '@algebra-core/interfaces/IAlgebraPool.sol';
import {ICamelotRelayer} from '@interfaces/oracles/ICamelotRelayer.sol';
import {Data} from '@contracts/for-test/Data.sol';
Expand All @@ -13,7 +15,7 @@ import {Data} from '@contracts/for-test/Data.sol';
// SIMULATE
// source .env && forge script CallResult --with-gas-price 2000000000 -vvvvv --rpc-url $ARB_SEPOLIA_RPC

contract CallResult is Script {
contract CallResult is Script, Test {
Data public data = Data(RELAYER_DATA);

ICamelotRelayer public relayer = data.camelotRelayer();
Expand All @@ -30,6 +32,14 @@ contract CallResult is Script {
bool unlocked
) = getGlobalState(IAlgebraPool(relayer.algebraPool()));

emit log_named_uint('Price :', price);
emit log_named_uint('Fee :', fee);
emit log_named_uint('TimePntIndex:', timepointIndex);
emit log_named_uint('CommunityFee:', communityFee);
emit log_named_int('Tick :', tick);
emit log_named_int('PrevInitTick:', prevInitializedTick);
assertTrue(unlocked);

relayer.getResultWithValidity();
vm.stopBroadcast();
}
Expand Down

0 comments on commit 73b7710

Please sign in to comment.