@optimex-xyz/market-maker-sdk 0.9.0-dev-896c690 → 0.9.0-dev-d2e92dd

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -5,8 +5,6 @@ type Environment = 'development' | 'prelive' | 'production' | 'staging';
5
5
  interface EnvironmentConfig {
6
6
  backendUrl: string;
7
7
  rpcUrl: string;
8
- paymentAddressMap: Record<string, string>;
9
- liquidationAddressMap: Record<string, string>;
10
8
  protocolFetcherProxyAddress: string;
11
9
  isTestnet: boolean;
12
10
  }
@@ -38,8 +36,6 @@ declare class Config {
38
36
  get(): AppConfig;
39
37
  getBackendUrl(): string;
40
38
  getRpcUrl(): string;
41
- getPaymentAddress(networkId: string): string;
42
- getLiquidationAddress(networkId: string): string;
43
39
  getProtocolFetcherAddress(): string;
44
40
  isTestnet(): boolean;
45
41
  }
@@ -1509,15 +1505,23 @@ declare namespace ITypes$2 {
1509
1505
  };
1510
1506
  }
1511
1507
  interface ProtocolFetcherProxyInterface extends Interface {
1512
- getFunction(nameOrSignature: "getLatestMPCInfo" | "getMPCInfo" | "getManagementOwner" | "getPFeeRate" | "getPMMAccounts" | "getProtocolState" | "getTokens" | "getVault" | "isMPCNode" | "isSolver" | "isValidNetwork" | "isValidPMM" | "isValidPMMAccount" | "isValidPubkey" | "isValidToken" | "numOfPMMAccounts" | "numOfSupportedTokens" | "pManagement" | "registry" | "router" | "setProtocolManagement" | "setRouter" | "setSignerExtension" | "setVaultRegistry" | "signerExtension"): FunctionFragment;
1508
+ getFunction(nameOrSignature: "DEFAULT_ADMIN_ROLE" | "getLatestMPCInfo" | "getMPCInfo" | "getManagementOwner" | "getPFeeRate" | "getPMMAccounts" | "getProtocolState" | "getRoleAdmin" | "getRoleMember" | "getRoleMemberCount" | "getRoleMembers" | "getTokens" | "getVault" | "grantRole" | "hasRole" | "isMPCNode" | "isSolver" | "isValidNetwork" | "isValidPMM" | "isValidPMMAccount" | "isValidPubkey" | "isValidToken" | "numOfPMMAccounts" | "numOfSupportedTokens" | "pManagement" | "registry" | "renounceRole" | "revokeRole" | "router" | "setProtocolManagement" | "setRouter" | "setSignerExtension" | "setVaultRegistry" | "signerExtension" | "supportsInterface"): FunctionFragment;
1509
+ getEvent(nameOrSignatureOrTopic: "RoleAdminChanged" | "RoleGranted" | "RoleRevoked"): EventFragment;
1510
+ encodeFunctionData(functionFragment: "DEFAULT_ADMIN_ROLE", values?: undefined): string;
1513
1511
  encodeFunctionData(functionFragment: "getLatestMPCInfo", values: [BytesLike]): string;
1514
1512
  encodeFunctionData(functionFragment: "getMPCInfo", values: [BytesLike, BytesLike]): string;
1515
1513
  encodeFunctionData(functionFragment: "getManagementOwner", values?: undefined): string;
1516
1514
  encodeFunctionData(functionFragment: "getPFeeRate", values: [[BytesLike, BytesLike, BytesLike, BytesLike]]): string;
1517
1515
  encodeFunctionData(functionFragment: "getPMMAccounts", values: [BytesLike, BigNumberish, BigNumberish]): string;
1518
1516
  encodeFunctionData(functionFragment: "getProtocolState", values?: undefined): string;
1517
+ encodeFunctionData(functionFragment: "getRoleAdmin", values: [BytesLike]): string;
1518
+ encodeFunctionData(functionFragment: "getRoleMember", values: [BytesLike, BigNumberish]): string;
1519
+ encodeFunctionData(functionFragment: "getRoleMemberCount", values: [BytesLike]): string;
1520
+ encodeFunctionData(functionFragment: "getRoleMembers", values: [BytesLike]): string;
1519
1521
  encodeFunctionData(functionFragment: "getTokens", values: [BigNumberish, BigNumberish]): string;
1520
1522
  encodeFunctionData(functionFragment: "getVault", values: [BytesLike, BytesLike]): string;
1523
+ encodeFunctionData(functionFragment: "grantRole", values: [BytesLike, AddressLike]): string;
1524
+ encodeFunctionData(functionFragment: "hasRole", values: [BytesLike, AddressLike]): string;
1521
1525
  encodeFunctionData(functionFragment: "isMPCNode", values: [AddressLike]): string;
1522
1526
  encodeFunctionData(functionFragment: "isSolver", values: [AddressLike]): string;
1523
1527
  encodeFunctionData(functionFragment: "isValidNetwork", values: [BytesLike]): string;
@@ -1529,20 +1533,30 @@ interface ProtocolFetcherProxyInterface extends Interface {
1529
1533
  encodeFunctionData(functionFragment: "numOfSupportedTokens", values?: undefined): string;
1530
1534
  encodeFunctionData(functionFragment: "pManagement", values?: undefined): string;
1531
1535
  encodeFunctionData(functionFragment: "registry", values?: undefined): string;
1536
+ encodeFunctionData(functionFragment: "renounceRole", values: [BytesLike, AddressLike]): string;
1537
+ encodeFunctionData(functionFragment: "revokeRole", values: [BytesLike, AddressLike]): string;
1532
1538
  encodeFunctionData(functionFragment: "router", values?: undefined): string;
1533
1539
  encodeFunctionData(functionFragment: "setProtocolManagement", values: [AddressLike]): string;
1534
1540
  encodeFunctionData(functionFragment: "setRouter", values: [AddressLike]): string;
1535
1541
  encodeFunctionData(functionFragment: "setSignerExtension", values: [AddressLike]): string;
1536
1542
  encodeFunctionData(functionFragment: "setVaultRegistry", values: [AddressLike]): string;
1537
1543
  encodeFunctionData(functionFragment: "signerExtension", values?: undefined): string;
1544
+ encodeFunctionData(functionFragment: "supportsInterface", values: [BytesLike]): string;
1545
+ decodeFunctionResult(functionFragment: "DEFAULT_ADMIN_ROLE", data: BytesLike): Result;
1538
1546
  decodeFunctionResult(functionFragment: "getLatestMPCInfo", data: BytesLike): Result;
1539
1547
  decodeFunctionResult(functionFragment: "getMPCInfo", data: BytesLike): Result;
1540
1548
  decodeFunctionResult(functionFragment: "getManagementOwner", data: BytesLike): Result;
1541
1549
  decodeFunctionResult(functionFragment: "getPFeeRate", data: BytesLike): Result;
1542
1550
  decodeFunctionResult(functionFragment: "getPMMAccounts", data: BytesLike): Result;
1543
1551
  decodeFunctionResult(functionFragment: "getProtocolState", data: BytesLike): Result;
1552
+ decodeFunctionResult(functionFragment: "getRoleAdmin", data: BytesLike): Result;
1553
+ decodeFunctionResult(functionFragment: "getRoleMember", data: BytesLike): Result;
1554
+ decodeFunctionResult(functionFragment: "getRoleMemberCount", data: BytesLike): Result;
1555
+ decodeFunctionResult(functionFragment: "getRoleMembers", data: BytesLike): Result;
1544
1556
  decodeFunctionResult(functionFragment: "getTokens", data: BytesLike): Result;
1545
1557
  decodeFunctionResult(functionFragment: "getVault", data: BytesLike): Result;
1558
+ decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result;
1559
+ decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result;
1546
1560
  decodeFunctionResult(functionFragment: "isMPCNode", data: BytesLike): Result;
1547
1561
  decodeFunctionResult(functionFragment: "isSolver", data: BytesLike): Result;
1548
1562
  decodeFunctionResult(functionFragment: "isValidNetwork", data: BytesLike): Result;
@@ -1554,12 +1568,70 @@ interface ProtocolFetcherProxyInterface extends Interface {
1554
1568
  decodeFunctionResult(functionFragment: "numOfSupportedTokens", data: BytesLike): Result;
1555
1569
  decodeFunctionResult(functionFragment: "pManagement", data: BytesLike): Result;
1556
1570
  decodeFunctionResult(functionFragment: "registry", data: BytesLike): Result;
1571
+ decodeFunctionResult(functionFragment: "renounceRole", data: BytesLike): Result;
1572
+ decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result;
1557
1573
  decodeFunctionResult(functionFragment: "router", data: BytesLike): Result;
1558
1574
  decodeFunctionResult(functionFragment: "setProtocolManagement", data: BytesLike): Result;
1559
1575
  decodeFunctionResult(functionFragment: "setRouter", data: BytesLike): Result;
1560
1576
  decodeFunctionResult(functionFragment: "setSignerExtension", data: BytesLike): Result;
1561
1577
  decodeFunctionResult(functionFragment: "setVaultRegistry", data: BytesLike): Result;
1562
1578
  decodeFunctionResult(functionFragment: "signerExtension", data: BytesLike): Result;
1579
+ decodeFunctionResult(functionFragment: "supportsInterface", data: BytesLike): Result;
1580
+ }
1581
+ declare namespace RoleAdminChangedEvent {
1582
+ type InputTuple = [
1583
+ role: BytesLike,
1584
+ previousAdminRole: BytesLike,
1585
+ newAdminRole: BytesLike
1586
+ ];
1587
+ type OutputTuple = [
1588
+ role: string,
1589
+ previousAdminRole: string,
1590
+ newAdminRole: string
1591
+ ];
1592
+ interface OutputObject {
1593
+ role: string;
1594
+ previousAdminRole: string;
1595
+ newAdminRole: string;
1596
+ }
1597
+ type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
1598
+ type Filter = TypedDeferredTopicFilter<Event>;
1599
+ type Log = TypedEventLog<Event>;
1600
+ type LogDescription = TypedLogDescription<Event>;
1601
+ }
1602
+ declare namespace RoleGrantedEvent {
1603
+ type InputTuple = [
1604
+ role: BytesLike,
1605
+ account: AddressLike,
1606
+ sender: AddressLike
1607
+ ];
1608
+ type OutputTuple = [role: string, account: string, sender: string];
1609
+ interface OutputObject {
1610
+ role: string;
1611
+ account: string;
1612
+ sender: string;
1613
+ }
1614
+ type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
1615
+ type Filter = TypedDeferredTopicFilter<Event>;
1616
+ type Log = TypedEventLog<Event>;
1617
+ type LogDescription = TypedLogDescription<Event>;
1618
+ }
1619
+ declare namespace RoleRevokedEvent {
1620
+ type InputTuple = [
1621
+ role: BytesLike,
1622
+ account: AddressLike,
1623
+ sender: AddressLike
1624
+ ];
1625
+ type OutputTuple = [role: string, account: string, sender: string];
1626
+ interface OutputObject {
1627
+ role: string;
1628
+ account: string;
1629
+ sender: string;
1630
+ }
1631
+ type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
1632
+ type Filter = TypedDeferredTopicFilter<Event>;
1633
+ type Log = TypedEventLog<Event>;
1634
+ type LogDescription = TypedLogDescription<Event>;
1563
1635
  }
1564
1636
  interface ProtocolFetcherProxy extends BaseContract {
1565
1637
  connect(runner?: ContractRunner | null): ProtocolFetcherProxy;
@@ -1574,6 +1646,7 @@ interface ProtocolFetcherProxy extends BaseContract {
1574
1646
  listeners<TCEvent extends TypedContractEvent>(event: TCEvent): Promise<Array<TypedListener<TCEvent>>>;
1575
1647
  listeners(eventName?: string): Promise<Array<Listener>>;
1576
1648
  removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>;
1649
+ DEFAULT_ADMIN_ROLE: TypedContractMethod<[], [string], "view">;
1577
1650
  getLatestMPCInfo: TypedContractMethod<[
1578
1651
  networkId: BytesLike
1579
1652
  ], [
@@ -1599,6 +1672,15 @@ interface ProtocolFetcherProxy extends BaseContract {
1599
1672
  string[]
1600
1673
  ], "view">;
1601
1674
  getProtocolState: TypedContractMethod<[], [bigint], "view">;
1675
+ getRoleAdmin: TypedContractMethod<[role: BytesLike], [string], "view">;
1676
+ getRoleMember: TypedContractMethod<[
1677
+ role: BytesLike,
1678
+ index: BigNumberish
1679
+ ], [
1680
+ string
1681
+ ], "view">;
1682
+ getRoleMemberCount: TypedContractMethod<[role: BytesLike], [bigint], "view">;
1683
+ getRoleMembers: TypedContractMethod<[role: BytesLike], [string[]], "view">;
1602
1684
  getTokens: TypedContractMethod<[
1603
1685
  fromIdx: BigNumberish,
1604
1686
  toIdx: BigNumberish
@@ -1611,6 +1693,18 @@ interface ProtocolFetcherProxy extends BaseContract {
1611
1693
  ], [
1612
1694
  string
1613
1695
  ], "view">;
1696
+ grantRole: TypedContractMethod<[
1697
+ role: BytesLike,
1698
+ account: AddressLike
1699
+ ], [
1700
+ void
1701
+ ], "nonpayable">;
1702
+ hasRole: TypedContractMethod<[
1703
+ role: BytesLike,
1704
+ account: AddressLike
1705
+ ], [
1706
+ boolean
1707
+ ], "view">;
1614
1708
  isMPCNode: TypedContractMethod<[account: AddressLike], [boolean], "view">;
1615
1709
  isSolver: TypedContractMethod<[account: AddressLike], [boolean], "view">;
1616
1710
  isValidNetwork: TypedContractMethod<[
@@ -1641,6 +1735,18 @@ interface ProtocolFetcherProxy extends BaseContract {
1641
1735
  numOfSupportedTokens: TypedContractMethod<[], [bigint], "view">;
1642
1736
  pManagement: TypedContractMethod<[], [string], "view">;
1643
1737
  registry: TypedContractMethod<[], [string], "view">;
1738
+ renounceRole: TypedContractMethod<[
1739
+ role: BytesLike,
1740
+ callerConfirmation: AddressLike
1741
+ ], [
1742
+ void
1743
+ ], "nonpayable">;
1744
+ revokeRole: TypedContractMethod<[
1745
+ role: BytesLike,
1746
+ account: AddressLike
1747
+ ], [
1748
+ void
1749
+ ], "nonpayable">;
1644
1750
  router: TypedContractMethod<[], [string], "view">;
1645
1751
  setProtocolManagement: TypedContractMethod<[
1646
1752
  newManagement: AddressLike
@@ -1663,7 +1769,13 @@ interface ProtocolFetcherProxy extends BaseContract {
1663
1769
  void
1664
1770
  ], "nonpayable">;
1665
1771
  signerExtension: TypedContractMethod<[], [string], "view">;
1772
+ supportsInterface: TypedContractMethod<[
1773
+ interfaceId: BytesLike
1774
+ ], [
1775
+ boolean
1776
+ ], "view">;
1666
1777
  getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
1778
+ getFunction(nameOrSignature: "DEFAULT_ADMIN_ROLE"): TypedContractMethod<[], [string], "view">;
1667
1779
  getFunction(nameOrSignature: "getLatestMPCInfo"): TypedContractMethod<[
1668
1780
  networkId: BytesLike
1669
1781
  ], [
@@ -1689,6 +1801,15 @@ interface ProtocolFetcherProxy extends BaseContract {
1689
1801
  string[]
1690
1802
  ], "view">;
1691
1803
  getFunction(nameOrSignature: "getProtocolState"): TypedContractMethod<[], [bigint], "view">;
1804
+ getFunction(nameOrSignature: "getRoleAdmin"): TypedContractMethod<[role: BytesLike], [string], "view">;
1805
+ getFunction(nameOrSignature: "getRoleMember"): TypedContractMethod<[
1806
+ role: BytesLike,
1807
+ index: BigNumberish
1808
+ ], [
1809
+ string
1810
+ ], "view">;
1811
+ getFunction(nameOrSignature: "getRoleMemberCount"): TypedContractMethod<[role: BytesLike], [bigint], "view">;
1812
+ getFunction(nameOrSignature: "getRoleMembers"): TypedContractMethod<[role: BytesLike], [string[]], "view">;
1692
1813
  getFunction(nameOrSignature: "getTokens"): TypedContractMethod<[
1693
1814
  fromIdx: BigNumberish,
1694
1815
  toIdx: BigNumberish
@@ -1701,6 +1822,18 @@ interface ProtocolFetcherProxy extends BaseContract {
1701
1822
  ], [
1702
1823
  string
1703
1824
  ], "view">;
1825
+ getFunction(nameOrSignature: "grantRole"): TypedContractMethod<[
1826
+ role: BytesLike,
1827
+ account: AddressLike
1828
+ ], [
1829
+ void
1830
+ ], "nonpayable">;
1831
+ getFunction(nameOrSignature: "hasRole"): TypedContractMethod<[
1832
+ role: BytesLike,
1833
+ account: AddressLike
1834
+ ], [
1835
+ boolean
1836
+ ], "view">;
1704
1837
  getFunction(nameOrSignature: "isMPCNode"): TypedContractMethod<[account: AddressLike], [boolean], "view">;
1705
1838
  getFunction(nameOrSignature: "isSolver"): TypedContractMethod<[account: AddressLike], [boolean], "view">;
1706
1839
  getFunction(nameOrSignature: "isValidNetwork"): TypedContractMethod<[networkId: BytesLike], [boolean], "view">;
@@ -1727,6 +1860,18 @@ interface ProtocolFetcherProxy extends BaseContract {
1727
1860
  getFunction(nameOrSignature: "numOfSupportedTokens"): TypedContractMethod<[], [bigint], "view">;
1728
1861
  getFunction(nameOrSignature: "pManagement"): TypedContractMethod<[], [string], "view">;
1729
1862
  getFunction(nameOrSignature: "registry"): TypedContractMethod<[], [string], "view">;
1863
+ getFunction(nameOrSignature: "renounceRole"): TypedContractMethod<[
1864
+ role: BytesLike,
1865
+ callerConfirmation: AddressLike
1866
+ ], [
1867
+ void
1868
+ ], "nonpayable">;
1869
+ getFunction(nameOrSignature: "revokeRole"): TypedContractMethod<[
1870
+ role: BytesLike,
1871
+ account: AddressLike
1872
+ ], [
1873
+ void
1874
+ ], "nonpayable">;
1730
1875
  getFunction(nameOrSignature: "router"): TypedContractMethod<[], [string], "view">;
1731
1876
  getFunction(nameOrSignature: "setProtocolManagement"): TypedContractMethod<[newManagement: AddressLike], [void], "nonpayable">;
1732
1877
  getFunction(nameOrSignature: "setRouter"): TypedContractMethod<[newRouter: AddressLike], [void], "nonpayable">;
@@ -1737,7 +1882,18 @@ interface ProtocolFetcherProxy extends BaseContract {
1737
1882
  ], "nonpayable">;
1738
1883
  getFunction(nameOrSignature: "setVaultRegistry"): TypedContractMethod<[newRegistry: AddressLike], [void], "nonpayable">;
1739
1884
  getFunction(nameOrSignature: "signerExtension"): TypedContractMethod<[], [string], "view">;
1740
- filters: {};
1885
+ getFunction(nameOrSignature: "supportsInterface"): TypedContractMethod<[interfaceId: BytesLike], [boolean], "view">;
1886
+ getEvent(key: "RoleAdminChanged"): TypedContractEvent<RoleAdminChangedEvent.InputTuple, RoleAdminChangedEvent.OutputTuple, RoleAdminChangedEvent.OutputObject>;
1887
+ getEvent(key: "RoleGranted"): TypedContractEvent<RoleGrantedEvent.InputTuple, RoleGrantedEvent.OutputTuple, RoleGrantedEvent.OutputObject>;
1888
+ getEvent(key: "RoleRevoked"): TypedContractEvent<RoleRevokedEvent.InputTuple, RoleRevokedEvent.OutputTuple, RoleRevokedEvent.OutputObject>;
1889
+ filters: {
1890
+ "RoleAdminChanged(bytes32,bytes32,bytes32)": TypedContractEvent<RoleAdminChangedEvent.InputTuple, RoleAdminChangedEvent.OutputTuple, RoleAdminChangedEvent.OutputObject>;
1891
+ RoleAdminChanged: TypedContractEvent<RoleAdminChangedEvent.InputTuple, RoleAdminChangedEvent.OutputTuple, RoleAdminChangedEvent.OutputObject>;
1892
+ "RoleGranted(bytes32,address,address)": TypedContractEvent<RoleGrantedEvent.InputTuple, RoleGrantedEvent.OutputTuple, RoleGrantedEvent.OutputObject>;
1893
+ RoleGranted: TypedContractEvent<RoleGrantedEvent.InputTuple, RoleGrantedEvent.OutputTuple, RoleGrantedEvent.OutputObject>;
1894
+ "RoleRevoked(bytes32,address,address)": TypedContractEvent<RoleRevokedEvent.InputTuple, RoleRevokedEvent.OutputTuple, RoleRevokedEvent.OutputObject>;
1895
+ RoleRevoked: TypedContractEvent<RoleRevokedEvent.InputTuple, RoleRevokedEvent.OutputTuple, RoleRevokedEvent.OutputObject>;
1896
+ };
1741
1897
  }
1742
1898
 
1743
1899
  declare namespace ITypes$1 {
@@ -4564,6 +4720,22 @@ declare class ProtocolFetcherProxy__factory {
4564
4720
  }];
4565
4721
  readonly stateMutability: "nonpayable";
4566
4722
  readonly type: "constructor";
4723
+ }, {
4724
+ readonly inputs: readonly [];
4725
+ readonly name: "AccessControlBadConfirmation";
4726
+ readonly type: "error";
4727
+ }, {
4728
+ readonly inputs: readonly [{
4729
+ readonly internalType: "address";
4730
+ readonly name: "account";
4731
+ readonly type: "address";
4732
+ }, {
4733
+ readonly internalType: "bytes32";
4734
+ readonly name: "neededRole";
4735
+ readonly type: "bytes32";
4736
+ }];
4737
+ readonly name: "AccessControlUnauthorizedAccount";
4738
+ readonly type: "error";
4567
4739
  }, {
4568
4740
  readonly inputs: readonly [];
4569
4741
  readonly name: "AddressZero";
@@ -4572,6 +4744,76 @@ declare class ProtocolFetcherProxy__factory {
4572
4744
  readonly inputs: readonly [];
4573
4745
  readonly name: "Unauthorized";
4574
4746
  readonly type: "error";
4747
+ }, {
4748
+ readonly anonymous: false;
4749
+ readonly inputs: readonly [{
4750
+ readonly indexed: true;
4751
+ readonly internalType: "bytes32";
4752
+ readonly name: "role";
4753
+ readonly type: "bytes32";
4754
+ }, {
4755
+ readonly indexed: true;
4756
+ readonly internalType: "bytes32";
4757
+ readonly name: "previousAdminRole";
4758
+ readonly type: "bytes32";
4759
+ }, {
4760
+ readonly indexed: true;
4761
+ readonly internalType: "bytes32";
4762
+ readonly name: "newAdminRole";
4763
+ readonly type: "bytes32";
4764
+ }];
4765
+ readonly name: "RoleAdminChanged";
4766
+ readonly type: "event";
4767
+ }, {
4768
+ readonly anonymous: false;
4769
+ readonly inputs: readonly [{
4770
+ readonly indexed: true;
4771
+ readonly internalType: "bytes32";
4772
+ readonly name: "role";
4773
+ readonly type: "bytes32";
4774
+ }, {
4775
+ readonly indexed: true;
4776
+ readonly internalType: "address";
4777
+ readonly name: "account";
4778
+ readonly type: "address";
4779
+ }, {
4780
+ readonly indexed: true;
4781
+ readonly internalType: "address";
4782
+ readonly name: "sender";
4783
+ readonly type: "address";
4784
+ }];
4785
+ readonly name: "RoleGranted";
4786
+ readonly type: "event";
4787
+ }, {
4788
+ readonly anonymous: false;
4789
+ readonly inputs: readonly [{
4790
+ readonly indexed: true;
4791
+ readonly internalType: "bytes32";
4792
+ readonly name: "role";
4793
+ readonly type: "bytes32";
4794
+ }, {
4795
+ readonly indexed: true;
4796
+ readonly internalType: "address";
4797
+ readonly name: "account";
4798
+ readonly type: "address";
4799
+ }, {
4800
+ readonly indexed: true;
4801
+ readonly internalType: "address";
4802
+ readonly name: "sender";
4803
+ readonly type: "address";
4804
+ }];
4805
+ readonly name: "RoleRevoked";
4806
+ readonly type: "event";
4807
+ }, {
4808
+ readonly inputs: readonly [];
4809
+ readonly name: "DEFAULT_ADMIN_ROLE";
4810
+ readonly outputs: readonly [{
4811
+ readonly internalType: "bytes32";
4812
+ readonly name: "";
4813
+ readonly type: "bytes32";
4814
+ }];
4815
+ readonly stateMutability: "view";
4816
+ readonly type: "function";
4575
4817
  }, {
4576
4818
  readonly inputs: readonly [{
4577
4819
  readonly internalType: "bytes";
@@ -4694,6 +4936,66 @@ declare class ProtocolFetcherProxy__factory {
4694
4936
  }];
4695
4937
  readonly stateMutability: "view";
4696
4938
  readonly type: "function";
4939
+ }, {
4940
+ readonly inputs: readonly [{
4941
+ readonly internalType: "bytes32";
4942
+ readonly name: "role";
4943
+ readonly type: "bytes32";
4944
+ }];
4945
+ readonly name: "getRoleAdmin";
4946
+ readonly outputs: readonly [{
4947
+ readonly internalType: "bytes32";
4948
+ readonly name: "";
4949
+ readonly type: "bytes32";
4950
+ }];
4951
+ readonly stateMutability: "view";
4952
+ readonly type: "function";
4953
+ }, {
4954
+ readonly inputs: readonly [{
4955
+ readonly internalType: "bytes32";
4956
+ readonly name: "role";
4957
+ readonly type: "bytes32";
4958
+ }, {
4959
+ readonly internalType: "uint256";
4960
+ readonly name: "index";
4961
+ readonly type: "uint256";
4962
+ }];
4963
+ readonly name: "getRoleMember";
4964
+ readonly outputs: readonly [{
4965
+ readonly internalType: "address";
4966
+ readonly name: "";
4967
+ readonly type: "address";
4968
+ }];
4969
+ readonly stateMutability: "view";
4970
+ readonly type: "function";
4971
+ }, {
4972
+ readonly inputs: readonly [{
4973
+ readonly internalType: "bytes32";
4974
+ readonly name: "role";
4975
+ readonly type: "bytes32";
4976
+ }];
4977
+ readonly name: "getRoleMemberCount";
4978
+ readonly outputs: readonly [{
4979
+ readonly internalType: "uint256";
4980
+ readonly name: "";
4981
+ readonly type: "uint256";
4982
+ }];
4983
+ readonly stateMutability: "view";
4984
+ readonly type: "function";
4985
+ }, {
4986
+ readonly inputs: readonly [{
4987
+ readonly internalType: "bytes32";
4988
+ readonly name: "role";
4989
+ readonly type: "bytes32";
4990
+ }];
4991
+ readonly name: "getRoleMembers";
4992
+ readonly outputs: readonly [{
4993
+ readonly internalType: "address[]";
4994
+ readonly name: "";
4995
+ readonly type: "address[]";
4996
+ }];
4997
+ readonly stateMutability: "view";
4998
+ readonly type: "function";
4697
4999
  }, {
4698
5000
  readonly inputs: readonly [{
4699
5001
  readonly internalType: "uint256";
@@ -4739,6 +5041,38 @@ declare class ProtocolFetcherProxy__factory {
4739
5041
  }];
4740
5042
  readonly stateMutability: "view";
4741
5043
  readonly type: "function";
5044
+ }, {
5045
+ readonly inputs: readonly [{
5046
+ readonly internalType: "bytes32";
5047
+ readonly name: "role";
5048
+ readonly type: "bytes32";
5049
+ }, {
5050
+ readonly internalType: "address";
5051
+ readonly name: "account";
5052
+ readonly type: "address";
5053
+ }];
5054
+ readonly name: "grantRole";
5055
+ readonly outputs: readonly [];
5056
+ readonly stateMutability: "nonpayable";
5057
+ readonly type: "function";
5058
+ }, {
5059
+ readonly inputs: readonly [{
5060
+ readonly internalType: "bytes32";
5061
+ readonly name: "role";
5062
+ readonly type: "bytes32";
5063
+ }, {
5064
+ readonly internalType: "address";
5065
+ readonly name: "account";
5066
+ readonly type: "address";
5067
+ }];
5068
+ readonly name: "hasRole";
5069
+ readonly outputs: readonly [{
5070
+ readonly internalType: "bool";
5071
+ readonly name: "";
5072
+ readonly type: "bool";
5073
+ }];
5074
+ readonly stateMutability: "view";
5075
+ readonly type: "function";
4742
5076
  }, {
4743
5077
  readonly inputs: readonly [{
4744
5078
  readonly internalType: "address";
@@ -4893,6 +5227,34 @@ declare class ProtocolFetcherProxy__factory {
4893
5227
  }];
4894
5228
  readonly stateMutability: "view";
4895
5229
  readonly type: "function";
5230
+ }, {
5231
+ readonly inputs: readonly [{
5232
+ readonly internalType: "bytes32";
5233
+ readonly name: "role";
5234
+ readonly type: "bytes32";
5235
+ }, {
5236
+ readonly internalType: "address";
5237
+ readonly name: "callerConfirmation";
5238
+ readonly type: "address";
5239
+ }];
5240
+ readonly name: "renounceRole";
5241
+ readonly outputs: readonly [];
5242
+ readonly stateMutability: "nonpayable";
5243
+ readonly type: "function";
5244
+ }, {
5245
+ readonly inputs: readonly [{
5246
+ readonly internalType: "bytes32";
5247
+ readonly name: "role";
5248
+ readonly type: "bytes32";
5249
+ }, {
5250
+ readonly internalType: "address";
5251
+ readonly name: "account";
5252
+ readonly type: "address";
5253
+ }];
5254
+ readonly name: "revokeRole";
5255
+ readonly outputs: readonly [];
5256
+ readonly stateMutability: "nonpayable";
5257
+ readonly type: "function";
4896
5258
  }, {
4897
5259
  readonly inputs: readonly [];
4898
5260
  readonly name: "router";
@@ -4953,6 +5315,20 @@ declare class ProtocolFetcherProxy__factory {
4953
5315
  }];
4954
5316
  readonly stateMutability: "view";
4955
5317
  readonly type: "function";
5318
+ }, {
5319
+ readonly inputs: readonly [{
5320
+ readonly internalType: "bytes4";
5321
+ readonly name: "interfaceId";
5322
+ readonly type: "bytes4";
5323
+ }];
5324
+ readonly name: "supportsInterface";
5325
+ readonly outputs: readonly [{
5326
+ readonly internalType: "bool";
5327
+ readonly name: "";
5328
+ readonly type: "bool";
5329
+ }];
5330
+ readonly stateMutability: "view";
5331
+ readonly type: "function";
4956
5332
  }];
4957
5333
  static createInterface(): ProtocolFetcherProxyInterface;
4958
5334
  static connect(address: string, runner?: ContractRunner | null): ProtocolFetcherProxy;
@@ -6416,9 +6792,53 @@ declare namespace ITypes {
6416
6792
  type TradeFinalizationStructOutput = ITypes$1.TradeFinalizationStructOutput;
6417
6793
  }
6418
6794
 
6795
+ declare enum OptimexEvmNetwork {
6796
+ EthereumSepolia = "ethereum_sepolia",
6797
+ EthereumMainnet = "ethereum",
6798
+ BaseTestnet = "base_sepolia",
6799
+ BaseMainnet = "base",
6800
+ ArbitrumSepolia = "arbitrum_sepolia",
6801
+ Arbitrum = "arbitrum",
6802
+ OptimismSepolia = "optimism_sepolia",
6803
+ Optimism = "optimism",
6804
+ BSC = "bsc"
6805
+ }
6806
+ declare enum OptimexL2Network {
6807
+ Testnet = "optimex_testnet",
6808
+ Mainnet = "optimex"
6809
+ }
6810
+ declare enum OptimexBtcNetwork {
6811
+ BitcoinTestnet = "bitcoin_testnet",
6812
+ BitcoinMainnet = "bitcoin"
6813
+ }
6814
+ declare enum OptimexSolanaNetwork {
6815
+ SolanaDevnet = "solana_devnet",
6816
+ SolanaMainnet = "solana"
6817
+ }
6818
+ declare enum OptimexLendingNetwork {
6819
+ Morpho = "MORPHO"
6820
+ }
6821
+ type UnknownNetwork = '';
6822
+ type OptimexNetwork = OptimexEvmNetwork | OptimexBtcNetwork | OptimexSolanaNetwork | OptimexL2Network | OptimexLendingNetwork | '';
6823
+ declare const isEvmNetwork: (network: OptimexNetwork) => network is OptimexEvmNetwork;
6824
+ declare const isBtcNetwork: (network: OptimexNetwork) => network is OptimexBtcNetwork;
6825
+ declare const isSolanaNetwork: (network: OptimexNetwork) => network is OptimexSolanaNetwork;
6826
+ declare const isL2Network: (network: OptimexNetwork) => network is OptimexL2Network;
6827
+
6828
+ declare enum ContractRole {
6829
+ AcrossTransitVault = "AcrossTransitVault",
6830
+ Payment = "OptimexSwapPayment"
6831
+ }
6832
+ declare enum L2ContractRole {
6833
+ MorphoAdapter = "MorphoAdapter",
6834
+ MorphoMarketRegistry = "MorphoMarketRegistry",
6835
+ AcrossRefund = "AcrossRefund"
6836
+ }
6837
+
6419
6838
  declare class ProtocolService implements ConfigObserver {
6420
6839
  private provider;
6421
6840
  private contract;
6841
+ l2Network: OptimexL2Network;
6422
6842
  constructor();
6423
6843
  /**
6424
6844
  * Implementation of ConfigObserver interface
@@ -6433,6 +6853,8 @@ declare class ProtocolService implements ConfigObserver {
6433
6853
  toTokenId: string;
6434
6854
  }): Promise<number>;
6435
6855
  getRouter(): Promise<string>;
6856
+ getAssetChainConfig(network: OptimexEvmNetwork, role: ContractRole): Promise<string[]>;
6857
+ getL2Config(role: L2ContractRole): Promise<string[]>;
6436
6858
  }
6437
6859
  declare const protocolService: ProtocolService;
6438
6860
 
@@ -7058,4 +7480,4 @@ declare function camelToSnakeCase(str: string): string;
7058
7480
  declare const ensureHexPrefix: (value: string) => string;
7059
7481
  declare const removeHexPrefix: (value: string) => string;
7060
7482
 
7061
- export { type AppConfig, type ConfigObserver, type ERC20, ERC20__factory, type Environment, type EnvironmentConfig, ITypes, type MorphoLiquidator, MorphoLiquidator__factory, type Payment, Payment__factory, type ProtocolFetcherProxy, ProtocolFetcherProxy__factory, ProtocolService, type Router, RouterService, Router__factory, SDK, SignatureType, type Signer, SignerService, Signer__factory, SolverService, type Token, TokenSchema, TokenService, camelToSnakeCase, config, confirmDepositType, confirmPaymentType, confirmSettlementType, convertToCamelCase, convertToSnakeCase, ensureHexPrefix, index as factories, getCommitInfoHash, getMakePaymentHash, getSignature, getSigner, getTradeIdsHash, makePaymentType, presignType, protocolService, removeHexPrefix, rfqAuthenticationTypes, routerService, sdk, selectionType, signerService, snakeToCamelCase, solverService, tokenService };
7483
+ export { type AppConfig, type ConfigObserver, ContractRole, type ERC20, ERC20__factory, type Environment, type EnvironmentConfig, ITypes, L2ContractRole, type MorphoLiquidator, MorphoLiquidator__factory, OptimexBtcNetwork, OptimexEvmNetwork, OptimexL2Network, OptimexLendingNetwork, type OptimexNetwork, OptimexSolanaNetwork, type Payment, Payment__factory, type ProtocolFetcherProxy, ProtocolFetcherProxy__factory, ProtocolService, type Router, RouterService, Router__factory, SDK, SignatureType, type Signer, SignerService, Signer__factory, SolverService, type Token, TokenSchema, TokenService, type UnknownNetwork, camelToSnakeCase, config, confirmDepositType, confirmPaymentType, confirmSettlementType, convertToCamelCase, convertToSnakeCase, ensureHexPrefix, index as factories, getCommitInfoHash, getMakePaymentHash, getSignature, getSigner, getTradeIdsHash, isBtcNetwork, isEvmNetwork, isL2Network, isSolanaNetwork, makePaymentType, presignType, protocolService, removeHexPrefix, rfqAuthenticationTypes, routerService, sdk, selectionType, signerService, snakeToCamelCase, solverService, tokenService };