@gitmyabi/safel 1.0.7 → 1.0.9
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/README.md +4 -4
- package/contracts/{SafeL2_json.d.ts → SafeL2.d.ts} +27 -27
- package/contracts/{SafeL2_json.js → SafeL2.js} +27 -27
- package/contracts/{SafeL2_json.ts → SafeL2.ts} +59 -59
- package/contracts/{SafeProxy_json.d.ts → SafeProxy.d.ts} +12 -12
- package/contracts/{SafeProxy_json.js → SafeProxy.js} +10 -10
- package/contracts/{SafeProxy_json.ts → SafeProxy.ts} +14 -14
- package/contracts/index.d.ts +4 -4
- package/contracts/index.js +7 -7
- package/contracts/index.ts +4 -4
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Auto-generated TypeScript type bindings for **SafeL**
|
|
4
4
|
|
|
5
|
-
- **Build ID**: `etherscan-safel-
|
|
5
|
+
- **Build ID**: `etherscan-safel-5b14e90e-1793794934357`
|
|
6
6
|
- **Build Number**: 1
|
|
7
|
-
- **Commit**: `
|
|
7
|
+
- **Commit**: `16121ca`
|
|
8
8
|
- **Branch**: `etherscan`
|
|
9
9
|
- **Target**: `ethers-v6`
|
|
10
10
|
- **Contracts**: 2
|
|
@@ -12,7 +12,7 @@ Auto-generated TypeScript type bindings for **SafeL**
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
|
-
npm install @gitmyabi/safel@1.0.
|
|
15
|
+
npm install @gitmyabi/safel@1.0.9
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
## Usage
|
|
@@ -105,4 +105,4 @@ This package includes type bindings for 2 contract(s) generated from ABI artifac
|
|
|
105
105
|
|
|
106
106
|
## License
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
Apache License 2.0
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Address, PublicClient, WalletClient } from 'viem';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* SafeL2 ABI
|
|
4
4
|
*
|
|
5
5
|
* This ABI is typed using viem's type system for full type safety.
|
|
6
6
|
*/
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const SafeL2Abi: readonly [{
|
|
8
8
|
readonly anonymous: false;
|
|
9
9
|
readonly inputs: readonly [{
|
|
10
10
|
readonly indexed: true;
|
|
@@ -864,15 +864,15 @@ export declare const SafeL2_jsonAbi: readonly [{
|
|
|
864
864
|
readonly type: "receive";
|
|
865
865
|
}];
|
|
866
866
|
/**
|
|
867
|
-
* Type-safe ABI for
|
|
867
|
+
* Type-safe ABI for SafeL2
|
|
868
868
|
*/
|
|
869
|
-
export type
|
|
869
|
+
export type SafeL2Abi = typeof SafeL2Abi;
|
|
870
870
|
/**
|
|
871
|
-
* Contract instance type for
|
|
871
|
+
* Contract instance type for SafeL2
|
|
872
872
|
*/
|
|
873
|
-
export type
|
|
873
|
+
export type SafeL2Contract = any;
|
|
874
874
|
/**
|
|
875
|
-
*
|
|
875
|
+
* SafeL2 Contract Class
|
|
876
876
|
*
|
|
877
877
|
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
878
878
|
*
|
|
@@ -880,12 +880,12 @@ export type SafeL2_jsonContract = any;
|
|
|
880
880
|
* ```typescript
|
|
881
881
|
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
882
882
|
* import { mainnet } from 'viem/chains';
|
|
883
|
-
* import {
|
|
883
|
+
* import { SafeL2 } from 'SafeL2';
|
|
884
884
|
*
|
|
885
885
|
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
886
886
|
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
887
887
|
*
|
|
888
|
-
* const contract = new
|
|
888
|
+
* const contract = new SafeL2('0x...', { publicClient, walletClient });
|
|
889
889
|
*
|
|
890
890
|
* // Read functions
|
|
891
891
|
* const result = await contract.balanceOf('0x...');
|
|
@@ -903,7 +903,7 @@ export type SafeL2_jsonContract = any;
|
|
|
903
903
|
* });
|
|
904
904
|
* ```
|
|
905
905
|
*/
|
|
906
|
-
export declare class
|
|
906
|
+
export declare class SafeL2 {
|
|
907
907
|
private contract;
|
|
908
908
|
private contractAddress;
|
|
909
909
|
private publicClient;
|
|
@@ -916,9 +916,9 @@ export declare class SafeL2_json {
|
|
|
916
916
|
*/
|
|
917
917
|
get address(): Address;
|
|
918
918
|
/**
|
|
919
|
-
* Get the underlying viem contract instance
|
|
919
|
+
* Get the underlying viem contract instance.
|
|
920
920
|
*/
|
|
921
|
-
getContract():
|
|
921
|
+
getContract(): SafeL2Contract;
|
|
922
922
|
/**
|
|
923
923
|
* VERSION
|
|
924
924
|
* view
|
|
@@ -1507,7 +1507,7 @@ export declare class SafeL2_json {
|
|
|
1507
1507
|
AddedOwner: (callback: (event: {
|
|
1508
1508
|
owner: `0x${string}`;
|
|
1509
1509
|
}) => void, filter?: {
|
|
1510
|
-
owner
|
|
1510
|
+
owner?: `0x${string}` | `0x${string}`[] | null;
|
|
1511
1511
|
}) => () => void;
|
|
1512
1512
|
/**
|
|
1513
1513
|
* Watch ApproveHash events
|
|
@@ -1519,8 +1519,8 @@ export declare class SafeL2_json {
|
|
|
1519
1519
|
approvedHash: `0x${string}`;
|
|
1520
1520
|
owner: `0x${string}`;
|
|
1521
1521
|
}) => void, filter?: {
|
|
1522
|
-
approvedHash
|
|
1523
|
-
owner
|
|
1522
|
+
approvedHash?: `0x${string}` | `0x${string}`[] | null;
|
|
1523
|
+
owner?: `0x${string}` | `0x${string}`[] | null;
|
|
1524
1524
|
}) => () => void;
|
|
1525
1525
|
/**
|
|
1526
1526
|
* Watch ChangedFallbackHandler events
|
|
@@ -1531,7 +1531,7 @@ export declare class SafeL2_json {
|
|
|
1531
1531
|
ChangedFallbackHandler: (callback: (event: {
|
|
1532
1532
|
handler: `0x${string}`;
|
|
1533
1533
|
}) => void, filter?: {
|
|
1534
|
-
handler
|
|
1534
|
+
handler?: `0x${string}` | `0x${string}`[] | null;
|
|
1535
1535
|
}) => () => void;
|
|
1536
1536
|
/**
|
|
1537
1537
|
* Watch ChangedGuard events
|
|
@@ -1542,7 +1542,7 @@ export declare class SafeL2_json {
|
|
|
1542
1542
|
ChangedGuard: (callback: (event: {
|
|
1543
1543
|
guard: `0x${string}`;
|
|
1544
1544
|
}) => void, filter?: {
|
|
1545
|
-
guard
|
|
1545
|
+
guard?: `0x${string}` | `0x${string}`[] | null;
|
|
1546
1546
|
}) => () => void;
|
|
1547
1547
|
/**
|
|
1548
1548
|
* Watch ChangedThreshold events
|
|
@@ -1562,7 +1562,7 @@ export declare class SafeL2_json {
|
|
|
1562
1562
|
DisabledModule: (callback: (event: {
|
|
1563
1563
|
module: `0x${string}`;
|
|
1564
1564
|
}) => void, filter?: {
|
|
1565
|
-
module
|
|
1565
|
+
module?: `0x${string}` | `0x${string}`[] | null;
|
|
1566
1566
|
}) => () => void;
|
|
1567
1567
|
/**
|
|
1568
1568
|
* Watch EnabledModule events
|
|
@@ -1573,7 +1573,7 @@ export declare class SafeL2_json {
|
|
|
1573
1573
|
EnabledModule: (callback: (event: {
|
|
1574
1574
|
module: `0x${string}`;
|
|
1575
1575
|
}) => void, filter?: {
|
|
1576
|
-
module
|
|
1576
|
+
module?: `0x${string}` | `0x${string}`[] | null;
|
|
1577
1577
|
}) => () => void;
|
|
1578
1578
|
/**
|
|
1579
1579
|
* Watch ExecutionFailure events
|
|
@@ -1585,7 +1585,7 @@ export declare class SafeL2_json {
|
|
|
1585
1585
|
txHash: `0x${string}`;
|
|
1586
1586
|
payment: bigint;
|
|
1587
1587
|
}) => void, filter?: {
|
|
1588
|
-
txHash
|
|
1588
|
+
txHash?: `0x${string}` | `0x${string}`[] | null;
|
|
1589
1589
|
}) => () => void;
|
|
1590
1590
|
/**
|
|
1591
1591
|
* Watch ExecutionFromModuleFailure events
|
|
@@ -1596,7 +1596,7 @@ export declare class SafeL2_json {
|
|
|
1596
1596
|
ExecutionFromModuleFailure: (callback: (event: {
|
|
1597
1597
|
module: `0x${string}`;
|
|
1598
1598
|
}) => void, filter?: {
|
|
1599
|
-
module
|
|
1599
|
+
module?: `0x${string}` | `0x${string}`[] | null;
|
|
1600
1600
|
}) => () => void;
|
|
1601
1601
|
/**
|
|
1602
1602
|
* Watch ExecutionFromModuleSuccess events
|
|
@@ -1607,7 +1607,7 @@ export declare class SafeL2_json {
|
|
|
1607
1607
|
ExecutionFromModuleSuccess: (callback: (event: {
|
|
1608
1608
|
module: `0x${string}`;
|
|
1609
1609
|
}) => void, filter?: {
|
|
1610
|
-
module
|
|
1610
|
+
module?: `0x${string}` | `0x${string}`[] | null;
|
|
1611
1611
|
}) => () => void;
|
|
1612
1612
|
/**
|
|
1613
1613
|
* Watch ExecutionSuccess events
|
|
@@ -1619,7 +1619,7 @@ export declare class SafeL2_json {
|
|
|
1619
1619
|
txHash: `0x${string}`;
|
|
1620
1620
|
payment: bigint;
|
|
1621
1621
|
}) => void, filter?: {
|
|
1622
|
-
txHash
|
|
1622
|
+
txHash?: `0x${string}` | `0x${string}`[] | null;
|
|
1623
1623
|
}) => () => void;
|
|
1624
1624
|
/**
|
|
1625
1625
|
* Watch RemovedOwner events
|
|
@@ -1630,7 +1630,7 @@ export declare class SafeL2_json {
|
|
|
1630
1630
|
RemovedOwner: (callback: (event: {
|
|
1631
1631
|
owner: `0x${string}`;
|
|
1632
1632
|
}) => void, filter?: {
|
|
1633
|
-
owner
|
|
1633
|
+
owner?: `0x${string}` | `0x${string}`[] | null;
|
|
1634
1634
|
}) => () => void;
|
|
1635
1635
|
/**
|
|
1636
1636
|
* Watch SafeModuleTransaction events
|
|
@@ -1674,7 +1674,7 @@ export declare class SafeL2_json {
|
|
|
1674
1674
|
sender: `0x${string}`;
|
|
1675
1675
|
value: bigint;
|
|
1676
1676
|
}) => void, filter?: {
|
|
1677
|
-
sender
|
|
1677
|
+
sender?: `0x${string}` | `0x${string}`[] | null;
|
|
1678
1678
|
}) => () => void;
|
|
1679
1679
|
/**
|
|
1680
1680
|
* Watch SafeSetup events
|
|
@@ -1689,7 +1689,7 @@ export declare class SafeL2_json {
|
|
|
1689
1689
|
initializer: `0x${string}`;
|
|
1690
1690
|
fallbackHandler: `0x${string}`;
|
|
1691
1691
|
}) => void, filter?: {
|
|
1692
|
-
initiator
|
|
1692
|
+
initiator?: `0x${string}` | `0x${string}`[] | null;
|
|
1693
1693
|
}) => () => void;
|
|
1694
1694
|
/**
|
|
1695
1695
|
* Watch SignMsg events
|
|
@@ -1700,7 +1700,7 @@ export declare class SafeL2_json {
|
|
|
1700
1700
|
SignMsg: (callback: (event: {
|
|
1701
1701
|
msgHash: `0x${string}`;
|
|
1702
1702
|
}) => void, filter?: {
|
|
1703
|
-
msgHash
|
|
1703
|
+
msgHash?: `0x${string}` | `0x${string}`[] | null;
|
|
1704
1704
|
}) => () => void;
|
|
1705
1705
|
};
|
|
1706
1706
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.SafeL2 = exports.SafeL2Abi = void 0;
|
|
4
4
|
const viem_1 = require("viem");
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* SafeL2 ABI
|
|
7
7
|
*
|
|
8
8
|
* This ABI is typed using viem's type system for full type safety.
|
|
9
9
|
*/
|
|
10
|
-
exports.
|
|
10
|
+
exports.SafeL2Abi = [
|
|
11
11
|
{
|
|
12
12
|
"anonymous": false,
|
|
13
13
|
"inputs": [
|
|
@@ -1112,7 +1112,7 @@ exports.SafeL2_jsonAbi = [
|
|
|
1112
1112
|
}
|
|
1113
1113
|
];
|
|
1114
1114
|
/**
|
|
1115
|
-
*
|
|
1115
|
+
* SafeL2 Contract Class
|
|
1116
1116
|
*
|
|
1117
1117
|
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
1118
1118
|
*
|
|
@@ -1120,12 +1120,12 @@ exports.SafeL2_jsonAbi = [
|
|
|
1120
1120
|
* ```typescript
|
|
1121
1121
|
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
1122
1122
|
* import { mainnet } from 'viem/chains';
|
|
1123
|
-
* import {
|
|
1123
|
+
* import { SafeL2 } from 'SafeL2';
|
|
1124
1124
|
*
|
|
1125
1125
|
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
1126
1126
|
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
1127
1127
|
*
|
|
1128
|
-
* const contract = new
|
|
1128
|
+
* const contract = new SafeL2('0x...', { publicClient, walletClient });
|
|
1129
1129
|
*
|
|
1130
1130
|
* // Read functions
|
|
1131
1131
|
* const result = await contract.balanceOf('0x...');
|
|
@@ -1143,13 +1143,13 @@ exports.SafeL2_jsonAbi = [
|
|
|
1143
1143
|
* });
|
|
1144
1144
|
* ```
|
|
1145
1145
|
*/
|
|
1146
|
-
class
|
|
1146
|
+
class SafeL2 {
|
|
1147
1147
|
constructor(address, clients) {
|
|
1148
1148
|
this.contractAddress = address;
|
|
1149
1149
|
this.publicClient = clients.publicClient;
|
|
1150
1150
|
this.contract = (0, viem_1.getContract)({
|
|
1151
1151
|
address,
|
|
1152
|
-
abi: exports.
|
|
1152
|
+
abi: exports.SafeL2Abi,
|
|
1153
1153
|
client: {
|
|
1154
1154
|
public: clients.publicClient,
|
|
1155
1155
|
wallet: clients.walletClient,
|
|
@@ -1163,7 +1163,7 @@ class SafeL2_json {
|
|
|
1163
1163
|
return this.contractAddress;
|
|
1164
1164
|
}
|
|
1165
1165
|
/**
|
|
1166
|
-
* Get the underlying viem contract instance
|
|
1166
|
+
* Get the underlying viem contract instance.
|
|
1167
1167
|
*/
|
|
1168
1168
|
getContract() {
|
|
1169
1169
|
return this.contract;
|
|
@@ -1585,7 +1585,7 @@ class SafeL2_json {
|
|
|
1585
1585
|
AddedOwner: (callback, filter) => {
|
|
1586
1586
|
return this.publicClient.watchContractEvent({
|
|
1587
1587
|
address: this.contractAddress,
|
|
1588
|
-
abi: exports.
|
|
1588
|
+
abi: exports.SafeL2Abi,
|
|
1589
1589
|
eventName: 'AddedOwner',
|
|
1590
1590
|
args: filter,
|
|
1591
1591
|
onLogs: (logs) => {
|
|
@@ -1604,7 +1604,7 @@ class SafeL2_json {
|
|
|
1604
1604
|
ApproveHash: (callback, filter) => {
|
|
1605
1605
|
return this.publicClient.watchContractEvent({
|
|
1606
1606
|
address: this.contractAddress,
|
|
1607
|
-
abi: exports.
|
|
1607
|
+
abi: exports.SafeL2Abi,
|
|
1608
1608
|
eventName: 'ApproveHash',
|
|
1609
1609
|
args: filter,
|
|
1610
1610
|
onLogs: (logs) => {
|
|
@@ -1623,7 +1623,7 @@ class SafeL2_json {
|
|
|
1623
1623
|
ChangedFallbackHandler: (callback, filter) => {
|
|
1624
1624
|
return this.publicClient.watchContractEvent({
|
|
1625
1625
|
address: this.contractAddress,
|
|
1626
|
-
abi: exports.
|
|
1626
|
+
abi: exports.SafeL2Abi,
|
|
1627
1627
|
eventName: 'ChangedFallbackHandler',
|
|
1628
1628
|
args: filter,
|
|
1629
1629
|
onLogs: (logs) => {
|
|
@@ -1642,7 +1642,7 @@ class SafeL2_json {
|
|
|
1642
1642
|
ChangedGuard: (callback, filter) => {
|
|
1643
1643
|
return this.publicClient.watchContractEvent({
|
|
1644
1644
|
address: this.contractAddress,
|
|
1645
|
-
abi: exports.
|
|
1645
|
+
abi: exports.SafeL2Abi,
|
|
1646
1646
|
eventName: 'ChangedGuard',
|
|
1647
1647
|
args: filter,
|
|
1648
1648
|
onLogs: (logs) => {
|
|
@@ -1661,7 +1661,7 @@ class SafeL2_json {
|
|
|
1661
1661
|
ChangedThreshold: (callback) => {
|
|
1662
1662
|
return this.publicClient.watchContractEvent({
|
|
1663
1663
|
address: this.contractAddress,
|
|
1664
|
-
abi: exports.
|
|
1664
|
+
abi: exports.SafeL2Abi,
|
|
1665
1665
|
eventName: 'ChangedThreshold',
|
|
1666
1666
|
onLogs: (logs) => {
|
|
1667
1667
|
logs.forEach((log) => {
|
|
@@ -1679,7 +1679,7 @@ class SafeL2_json {
|
|
|
1679
1679
|
DisabledModule: (callback, filter) => {
|
|
1680
1680
|
return this.publicClient.watchContractEvent({
|
|
1681
1681
|
address: this.contractAddress,
|
|
1682
|
-
abi: exports.
|
|
1682
|
+
abi: exports.SafeL2Abi,
|
|
1683
1683
|
eventName: 'DisabledModule',
|
|
1684
1684
|
args: filter,
|
|
1685
1685
|
onLogs: (logs) => {
|
|
@@ -1698,7 +1698,7 @@ class SafeL2_json {
|
|
|
1698
1698
|
EnabledModule: (callback, filter) => {
|
|
1699
1699
|
return this.publicClient.watchContractEvent({
|
|
1700
1700
|
address: this.contractAddress,
|
|
1701
|
-
abi: exports.
|
|
1701
|
+
abi: exports.SafeL2Abi,
|
|
1702
1702
|
eventName: 'EnabledModule',
|
|
1703
1703
|
args: filter,
|
|
1704
1704
|
onLogs: (logs) => {
|
|
@@ -1717,7 +1717,7 @@ class SafeL2_json {
|
|
|
1717
1717
|
ExecutionFailure: (callback, filter) => {
|
|
1718
1718
|
return this.publicClient.watchContractEvent({
|
|
1719
1719
|
address: this.contractAddress,
|
|
1720
|
-
abi: exports.
|
|
1720
|
+
abi: exports.SafeL2Abi,
|
|
1721
1721
|
eventName: 'ExecutionFailure',
|
|
1722
1722
|
args: filter,
|
|
1723
1723
|
onLogs: (logs) => {
|
|
@@ -1736,7 +1736,7 @@ class SafeL2_json {
|
|
|
1736
1736
|
ExecutionFromModuleFailure: (callback, filter) => {
|
|
1737
1737
|
return this.publicClient.watchContractEvent({
|
|
1738
1738
|
address: this.contractAddress,
|
|
1739
|
-
abi: exports.
|
|
1739
|
+
abi: exports.SafeL2Abi,
|
|
1740
1740
|
eventName: 'ExecutionFromModuleFailure',
|
|
1741
1741
|
args: filter,
|
|
1742
1742
|
onLogs: (logs) => {
|
|
@@ -1755,7 +1755,7 @@ class SafeL2_json {
|
|
|
1755
1755
|
ExecutionFromModuleSuccess: (callback, filter) => {
|
|
1756
1756
|
return this.publicClient.watchContractEvent({
|
|
1757
1757
|
address: this.contractAddress,
|
|
1758
|
-
abi: exports.
|
|
1758
|
+
abi: exports.SafeL2Abi,
|
|
1759
1759
|
eventName: 'ExecutionFromModuleSuccess',
|
|
1760
1760
|
args: filter,
|
|
1761
1761
|
onLogs: (logs) => {
|
|
@@ -1774,7 +1774,7 @@ class SafeL2_json {
|
|
|
1774
1774
|
ExecutionSuccess: (callback, filter) => {
|
|
1775
1775
|
return this.publicClient.watchContractEvent({
|
|
1776
1776
|
address: this.contractAddress,
|
|
1777
|
-
abi: exports.
|
|
1777
|
+
abi: exports.SafeL2Abi,
|
|
1778
1778
|
eventName: 'ExecutionSuccess',
|
|
1779
1779
|
args: filter,
|
|
1780
1780
|
onLogs: (logs) => {
|
|
@@ -1793,7 +1793,7 @@ class SafeL2_json {
|
|
|
1793
1793
|
RemovedOwner: (callback, filter) => {
|
|
1794
1794
|
return this.publicClient.watchContractEvent({
|
|
1795
1795
|
address: this.contractAddress,
|
|
1796
|
-
abi: exports.
|
|
1796
|
+
abi: exports.SafeL2Abi,
|
|
1797
1797
|
eventName: 'RemovedOwner',
|
|
1798
1798
|
args: filter,
|
|
1799
1799
|
onLogs: (logs) => {
|
|
@@ -1812,7 +1812,7 @@ class SafeL2_json {
|
|
|
1812
1812
|
SafeModuleTransaction: (callback) => {
|
|
1813
1813
|
return this.publicClient.watchContractEvent({
|
|
1814
1814
|
address: this.contractAddress,
|
|
1815
|
-
abi: exports.
|
|
1815
|
+
abi: exports.SafeL2Abi,
|
|
1816
1816
|
eventName: 'SafeModuleTransaction',
|
|
1817
1817
|
onLogs: (logs) => {
|
|
1818
1818
|
logs.forEach((log) => {
|
|
@@ -1830,7 +1830,7 @@ class SafeL2_json {
|
|
|
1830
1830
|
SafeMultiSigTransaction: (callback) => {
|
|
1831
1831
|
return this.publicClient.watchContractEvent({
|
|
1832
1832
|
address: this.contractAddress,
|
|
1833
|
-
abi: exports.
|
|
1833
|
+
abi: exports.SafeL2Abi,
|
|
1834
1834
|
eventName: 'SafeMultiSigTransaction',
|
|
1835
1835
|
onLogs: (logs) => {
|
|
1836
1836
|
logs.forEach((log) => {
|
|
@@ -1848,7 +1848,7 @@ class SafeL2_json {
|
|
|
1848
1848
|
SafeReceived: (callback, filter) => {
|
|
1849
1849
|
return this.publicClient.watchContractEvent({
|
|
1850
1850
|
address: this.contractAddress,
|
|
1851
|
-
abi: exports.
|
|
1851
|
+
abi: exports.SafeL2Abi,
|
|
1852
1852
|
eventName: 'SafeReceived',
|
|
1853
1853
|
args: filter,
|
|
1854
1854
|
onLogs: (logs) => {
|
|
@@ -1867,7 +1867,7 @@ class SafeL2_json {
|
|
|
1867
1867
|
SafeSetup: (callback, filter) => {
|
|
1868
1868
|
return this.publicClient.watchContractEvent({
|
|
1869
1869
|
address: this.contractAddress,
|
|
1870
|
-
abi: exports.
|
|
1870
|
+
abi: exports.SafeL2Abi,
|
|
1871
1871
|
eventName: 'SafeSetup',
|
|
1872
1872
|
args: filter,
|
|
1873
1873
|
onLogs: (logs) => {
|
|
@@ -1886,7 +1886,7 @@ class SafeL2_json {
|
|
|
1886
1886
|
SignMsg: (callback, filter) => {
|
|
1887
1887
|
return this.publicClient.watchContractEvent({
|
|
1888
1888
|
address: this.contractAddress,
|
|
1889
|
-
abi: exports.
|
|
1889
|
+
abi: exports.SafeL2Abi,
|
|
1890
1890
|
eventName: 'SignMsg',
|
|
1891
1891
|
args: filter,
|
|
1892
1892
|
onLogs: (logs) => {
|
|
@@ -1899,4 +1899,4 @@ class SafeL2_json {
|
|
|
1899
1899
|
};
|
|
1900
1900
|
}
|
|
1901
1901
|
}
|
|
1902
|
-
exports.
|
|
1902
|
+
exports.SafeL2 = SafeL2;
|
|
@@ -2,11 +2,11 @@ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType }
|
|
|
2
2
|
import { getContract } from 'viem';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* SafeL2 ABI
|
|
6
6
|
*
|
|
7
7
|
* This ABI is typed using viem's type system for full type safety.
|
|
8
8
|
*/
|
|
9
|
-
export const
|
|
9
|
+
export const SafeL2Abi = [
|
|
10
10
|
{
|
|
11
11
|
"anonymous": false,
|
|
12
12
|
"inputs": [
|
|
@@ -1112,19 +1112,19 @@ export const SafeL2_jsonAbi = [
|
|
|
1112
1112
|
] as const satisfies Abi;
|
|
1113
1113
|
|
|
1114
1114
|
/**
|
|
1115
|
-
* Type-safe ABI for
|
|
1115
|
+
* Type-safe ABI for SafeL2
|
|
1116
1116
|
*/
|
|
1117
|
-
export type
|
|
1117
|
+
export type SafeL2Abi = typeof SafeL2Abi;
|
|
1118
1118
|
|
|
1119
1119
|
/**
|
|
1120
|
-
* Contract instance type for
|
|
1120
|
+
* Contract instance type for SafeL2
|
|
1121
1121
|
*/
|
|
1122
1122
|
// Use any for contract type to avoid complex viem type issues
|
|
1123
1123
|
// The runtime behavior is type-safe through viem's ABI typing
|
|
1124
|
-
export type
|
|
1124
|
+
export type SafeL2Contract = any;
|
|
1125
1125
|
|
|
1126
1126
|
/**
|
|
1127
|
-
*
|
|
1127
|
+
* SafeL2 Contract Class
|
|
1128
1128
|
*
|
|
1129
1129
|
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
1130
1130
|
*
|
|
@@ -1132,12 +1132,12 @@ export type SafeL2_jsonContract = any;
|
|
|
1132
1132
|
* ```typescript
|
|
1133
1133
|
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
1134
1134
|
* import { mainnet } from 'viem/chains';
|
|
1135
|
-
* import {
|
|
1135
|
+
* import { SafeL2 } from 'SafeL2';
|
|
1136
1136
|
*
|
|
1137
1137
|
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
1138
1138
|
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
1139
1139
|
*
|
|
1140
|
-
* const contract = new
|
|
1140
|
+
* const contract = new SafeL2('0x...', { publicClient, walletClient });
|
|
1141
1141
|
*
|
|
1142
1142
|
* // Read functions
|
|
1143
1143
|
* const result = await contract.balanceOf('0x...');
|
|
@@ -1155,8 +1155,8 @@ export type SafeL2_jsonContract = any;
|
|
|
1155
1155
|
* });
|
|
1156
1156
|
* ```
|
|
1157
1157
|
*/
|
|
1158
|
-
export class
|
|
1159
|
-
private contract:
|
|
1158
|
+
export class SafeL2 {
|
|
1159
|
+
private contract: SafeL2Contract;
|
|
1160
1160
|
private contractAddress: Address;
|
|
1161
1161
|
private publicClient: PublicClient;
|
|
1162
1162
|
|
|
@@ -1171,7 +1171,7 @@ export class SafeL2_json {
|
|
|
1171
1171
|
this.publicClient = clients.publicClient;
|
|
1172
1172
|
this.contract = getContract({
|
|
1173
1173
|
address,
|
|
1174
|
-
abi:
|
|
1174
|
+
abi: SafeL2Abi,
|
|
1175
1175
|
client: {
|
|
1176
1176
|
public: clients.publicClient,
|
|
1177
1177
|
wallet: clients.walletClient,
|
|
@@ -1187,9 +1187,9 @@ export class SafeL2_json {
|
|
|
1187
1187
|
}
|
|
1188
1188
|
|
|
1189
1189
|
/**
|
|
1190
|
-
* Get the underlying viem contract instance
|
|
1190
|
+
* Get the underlying viem contract instance.
|
|
1191
1191
|
*/
|
|
1192
|
-
getContract():
|
|
1192
|
+
getContract(): SafeL2Contract {
|
|
1193
1193
|
return this.contract;
|
|
1194
1194
|
}
|
|
1195
1195
|
|
|
@@ -1948,12 +1948,12 @@ export class SafeL2_json {
|
|
|
1948
1948
|
* @param filter Optional filter for indexed parameters
|
|
1949
1949
|
* @returns Unwatch function to stop listening
|
|
1950
1950
|
*/
|
|
1951
|
-
AddedOwner: (callback: (event: { owner: `0x${string}` }) => void, filter?: { owner
|
|
1951
|
+
AddedOwner: (callback: (event: { owner: `0x${string}` }) => void, filter?: { owner?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
1952
1952
|
return this.publicClient.watchContractEvent({
|
|
1953
1953
|
address: this.contractAddress,
|
|
1954
|
-
abi:
|
|
1954
|
+
abi: SafeL2Abi,
|
|
1955
1955
|
eventName: 'AddedOwner',
|
|
1956
|
-
args: filter,
|
|
1956
|
+
args: filter as any,
|
|
1957
1957
|
onLogs: (logs: any[]) => {
|
|
1958
1958
|
logs.forEach((log: any) => {
|
|
1959
1959
|
callback(log.args as any);
|
|
@@ -1967,12 +1967,12 @@ export class SafeL2_json {
|
|
|
1967
1967
|
* @param filter Optional filter for indexed parameters
|
|
1968
1968
|
* @returns Unwatch function to stop listening
|
|
1969
1969
|
*/
|
|
1970
|
-
ApproveHash: (callback: (event: { approvedHash: `0x${string}`; owner: `0x${string}` }) => void, filter?: { approvedHash
|
|
1970
|
+
ApproveHash: (callback: (event: { approvedHash: `0x${string}`; owner: `0x${string}` }) => void, filter?: { approvedHash?: `0x${string}` | `0x${string}`[] | null; owner?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
1971
1971
|
return this.publicClient.watchContractEvent({
|
|
1972
1972
|
address: this.contractAddress,
|
|
1973
|
-
abi:
|
|
1973
|
+
abi: SafeL2Abi,
|
|
1974
1974
|
eventName: 'ApproveHash',
|
|
1975
|
-
args: filter,
|
|
1975
|
+
args: filter as any,
|
|
1976
1976
|
onLogs: (logs: any[]) => {
|
|
1977
1977
|
logs.forEach((log: any) => {
|
|
1978
1978
|
callback(log.args as any);
|
|
@@ -1986,12 +1986,12 @@ export class SafeL2_json {
|
|
|
1986
1986
|
* @param filter Optional filter for indexed parameters
|
|
1987
1987
|
* @returns Unwatch function to stop listening
|
|
1988
1988
|
*/
|
|
1989
|
-
ChangedFallbackHandler: (callback: (event: { handler: `0x${string}` }) => void, filter?: { handler
|
|
1989
|
+
ChangedFallbackHandler: (callback: (event: { handler: `0x${string}` }) => void, filter?: { handler?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
1990
1990
|
return this.publicClient.watchContractEvent({
|
|
1991
1991
|
address: this.contractAddress,
|
|
1992
|
-
abi:
|
|
1992
|
+
abi: SafeL2Abi,
|
|
1993
1993
|
eventName: 'ChangedFallbackHandler',
|
|
1994
|
-
args: filter,
|
|
1994
|
+
args: filter as any,
|
|
1995
1995
|
onLogs: (logs: any[]) => {
|
|
1996
1996
|
logs.forEach((log: any) => {
|
|
1997
1997
|
callback(log.args as any);
|
|
@@ -2005,12 +2005,12 @@ export class SafeL2_json {
|
|
|
2005
2005
|
* @param filter Optional filter for indexed parameters
|
|
2006
2006
|
* @returns Unwatch function to stop listening
|
|
2007
2007
|
*/
|
|
2008
|
-
ChangedGuard: (callback: (event: { guard: `0x${string}` }) => void, filter?: { guard
|
|
2008
|
+
ChangedGuard: (callback: (event: { guard: `0x${string}` }) => void, filter?: { guard?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
2009
2009
|
return this.publicClient.watchContractEvent({
|
|
2010
2010
|
address: this.contractAddress,
|
|
2011
|
-
abi:
|
|
2011
|
+
abi: SafeL2Abi,
|
|
2012
2012
|
eventName: 'ChangedGuard',
|
|
2013
|
-
args: filter,
|
|
2013
|
+
args: filter as any,
|
|
2014
2014
|
onLogs: (logs: any[]) => {
|
|
2015
2015
|
logs.forEach((log: any) => {
|
|
2016
2016
|
callback(log.args as any);
|
|
@@ -2027,7 +2027,7 @@ export class SafeL2_json {
|
|
|
2027
2027
|
ChangedThreshold: (callback: (event: { threshold: bigint }) => void) => {
|
|
2028
2028
|
return this.publicClient.watchContractEvent({
|
|
2029
2029
|
address: this.contractAddress,
|
|
2030
|
-
abi:
|
|
2030
|
+
abi: SafeL2Abi,
|
|
2031
2031
|
eventName: 'ChangedThreshold',
|
|
2032
2032
|
|
|
2033
2033
|
onLogs: (logs: any[]) => {
|
|
@@ -2043,12 +2043,12 @@ export class SafeL2_json {
|
|
|
2043
2043
|
* @param filter Optional filter for indexed parameters
|
|
2044
2044
|
* @returns Unwatch function to stop listening
|
|
2045
2045
|
*/
|
|
2046
|
-
DisabledModule: (callback: (event: { module: `0x${string}` }) => void, filter?: { module
|
|
2046
|
+
DisabledModule: (callback: (event: { module: `0x${string}` }) => void, filter?: { module?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
2047
2047
|
return this.publicClient.watchContractEvent({
|
|
2048
2048
|
address: this.contractAddress,
|
|
2049
|
-
abi:
|
|
2049
|
+
abi: SafeL2Abi,
|
|
2050
2050
|
eventName: 'DisabledModule',
|
|
2051
|
-
args: filter,
|
|
2051
|
+
args: filter as any,
|
|
2052
2052
|
onLogs: (logs: any[]) => {
|
|
2053
2053
|
logs.forEach((log: any) => {
|
|
2054
2054
|
callback(log.args as any);
|
|
@@ -2062,12 +2062,12 @@ export class SafeL2_json {
|
|
|
2062
2062
|
* @param filter Optional filter for indexed parameters
|
|
2063
2063
|
* @returns Unwatch function to stop listening
|
|
2064
2064
|
*/
|
|
2065
|
-
EnabledModule: (callback: (event: { module: `0x${string}` }) => void, filter?: { module
|
|
2065
|
+
EnabledModule: (callback: (event: { module: `0x${string}` }) => void, filter?: { module?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
2066
2066
|
return this.publicClient.watchContractEvent({
|
|
2067
2067
|
address: this.contractAddress,
|
|
2068
|
-
abi:
|
|
2068
|
+
abi: SafeL2Abi,
|
|
2069
2069
|
eventName: 'EnabledModule',
|
|
2070
|
-
args: filter,
|
|
2070
|
+
args: filter as any,
|
|
2071
2071
|
onLogs: (logs: any[]) => {
|
|
2072
2072
|
logs.forEach((log: any) => {
|
|
2073
2073
|
callback(log.args as any);
|
|
@@ -2081,12 +2081,12 @@ export class SafeL2_json {
|
|
|
2081
2081
|
* @param filter Optional filter for indexed parameters
|
|
2082
2082
|
* @returns Unwatch function to stop listening
|
|
2083
2083
|
*/
|
|
2084
|
-
ExecutionFailure: (callback: (event: { txHash: `0x${string}`; payment: bigint }) => void, filter?: { txHash
|
|
2084
|
+
ExecutionFailure: (callback: (event: { txHash: `0x${string}`; payment: bigint }) => void, filter?: { txHash?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
2085
2085
|
return this.publicClient.watchContractEvent({
|
|
2086
2086
|
address: this.contractAddress,
|
|
2087
|
-
abi:
|
|
2087
|
+
abi: SafeL2Abi,
|
|
2088
2088
|
eventName: 'ExecutionFailure',
|
|
2089
|
-
args: filter,
|
|
2089
|
+
args: filter as any,
|
|
2090
2090
|
onLogs: (logs: any[]) => {
|
|
2091
2091
|
logs.forEach((log: any) => {
|
|
2092
2092
|
callback(log.args as any);
|
|
@@ -2100,12 +2100,12 @@ export class SafeL2_json {
|
|
|
2100
2100
|
* @param filter Optional filter for indexed parameters
|
|
2101
2101
|
* @returns Unwatch function to stop listening
|
|
2102
2102
|
*/
|
|
2103
|
-
ExecutionFromModuleFailure: (callback: (event: { module: `0x${string}` }) => void, filter?: { module
|
|
2103
|
+
ExecutionFromModuleFailure: (callback: (event: { module: `0x${string}` }) => void, filter?: { module?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
2104
2104
|
return this.publicClient.watchContractEvent({
|
|
2105
2105
|
address: this.contractAddress,
|
|
2106
|
-
abi:
|
|
2106
|
+
abi: SafeL2Abi,
|
|
2107
2107
|
eventName: 'ExecutionFromModuleFailure',
|
|
2108
|
-
args: filter,
|
|
2108
|
+
args: filter as any,
|
|
2109
2109
|
onLogs: (logs: any[]) => {
|
|
2110
2110
|
logs.forEach((log: any) => {
|
|
2111
2111
|
callback(log.args as any);
|
|
@@ -2119,12 +2119,12 @@ export class SafeL2_json {
|
|
|
2119
2119
|
* @param filter Optional filter for indexed parameters
|
|
2120
2120
|
* @returns Unwatch function to stop listening
|
|
2121
2121
|
*/
|
|
2122
|
-
ExecutionFromModuleSuccess: (callback: (event: { module: `0x${string}` }) => void, filter?: { module
|
|
2122
|
+
ExecutionFromModuleSuccess: (callback: (event: { module: `0x${string}` }) => void, filter?: { module?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
2123
2123
|
return this.publicClient.watchContractEvent({
|
|
2124
2124
|
address: this.contractAddress,
|
|
2125
|
-
abi:
|
|
2125
|
+
abi: SafeL2Abi,
|
|
2126
2126
|
eventName: 'ExecutionFromModuleSuccess',
|
|
2127
|
-
args: filter,
|
|
2127
|
+
args: filter as any,
|
|
2128
2128
|
onLogs: (logs: any[]) => {
|
|
2129
2129
|
logs.forEach((log: any) => {
|
|
2130
2130
|
callback(log.args as any);
|
|
@@ -2138,12 +2138,12 @@ export class SafeL2_json {
|
|
|
2138
2138
|
* @param filter Optional filter for indexed parameters
|
|
2139
2139
|
* @returns Unwatch function to stop listening
|
|
2140
2140
|
*/
|
|
2141
|
-
ExecutionSuccess: (callback: (event: { txHash: `0x${string}`; payment: bigint }) => void, filter?: { txHash
|
|
2141
|
+
ExecutionSuccess: (callback: (event: { txHash: `0x${string}`; payment: bigint }) => void, filter?: { txHash?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
2142
2142
|
return this.publicClient.watchContractEvent({
|
|
2143
2143
|
address: this.contractAddress,
|
|
2144
|
-
abi:
|
|
2144
|
+
abi: SafeL2Abi,
|
|
2145
2145
|
eventName: 'ExecutionSuccess',
|
|
2146
|
-
args: filter,
|
|
2146
|
+
args: filter as any,
|
|
2147
2147
|
onLogs: (logs: any[]) => {
|
|
2148
2148
|
logs.forEach((log: any) => {
|
|
2149
2149
|
callback(log.args as any);
|
|
@@ -2157,12 +2157,12 @@ export class SafeL2_json {
|
|
|
2157
2157
|
* @param filter Optional filter for indexed parameters
|
|
2158
2158
|
* @returns Unwatch function to stop listening
|
|
2159
2159
|
*/
|
|
2160
|
-
RemovedOwner: (callback: (event: { owner: `0x${string}` }) => void, filter?: { owner
|
|
2160
|
+
RemovedOwner: (callback: (event: { owner: `0x${string}` }) => void, filter?: { owner?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
2161
2161
|
return this.publicClient.watchContractEvent({
|
|
2162
2162
|
address: this.contractAddress,
|
|
2163
|
-
abi:
|
|
2163
|
+
abi: SafeL2Abi,
|
|
2164
2164
|
eventName: 'RemovedOwner',
|
|
2165
|
-
args: filter,
|
|
2165
|
+
args: filter as any,
|
|
2166
2166
|
onLogs: (logs: any[]) => {
|
|
2167
2167
|
logs.forEach((log: any) => {
|
|
2168
2168
|
callback(log.args as any);
|
|
@@ -2179,7 +2179,7 @@ export class SafeL2_json {
|
|
|
2179
2179
|
SafeModuleTransaction: (callback: (event: { module: `0x${string}`; to: `0x${string}`; value: bigint; data: `0x${string}`; operation: bigint }) => void) => {
|
|
2180
2180
|
return this.publicClient.watchContractEvent({
|
|
2181
2181
|
address: this.contractAddress,
|
|
2182
|
-
abi:
|
|
2182
|
+
abi: SafeL2Abi,
|
|
2183
2183
|
eventName: 'SafeModuleTransaction',
|
|
2184
2184
|
|
|
2185
2185
|
onLogs: (logs: any[]) => {
|
|
@@ -2198,7 +2198,7 @@ export class SafeL2_json {
|
|
|
2198
2198
|
SafeMultiSigTransaction: (callback: (event: { to: `0x${string}`; value: bigint; data: `0x${string}`; operation: bigint; safeTxGas: bigint; baseGas: bigint; gasPrice: bigint; gasToken: `0x${string}`; refundReceiver: `0x${string}`; signatures: `0x${string}`; additionalInfo: `0x${string}` }) => void) => {
|
|
2199
2199
|
return this.publicClient.watchContractEvent({
|
|
2200
2200
|
address: this.contractAddress,
|
|
2201
|
-
abi:
|
|
2201
|
+
abi: SafeL2Abi,
|
|
2202
2202
|
eventName: 'SafeMultiSigTransaction',
|
|
2203
2203
|
|
|
2204
2204
|
onLogs: (logs: any[]) => {
|
|
@@ -2214,12 +2214,12 @@ export class SafeL2_json {
|
|
|
2214
2214
|
* @param filter Optional filter for indexed parameters
|
|
2215
2215
|
* @returns Unwatch function to stop listening
|
|
2216
2216
|
*/
|
|
2217
|
-
SafeReceived: (callback: (event: { sender: `0x${string}`; value: bigint }) => void, filter?: { sender
|
|
2217
|
+
SafeReceived: (callback: (event: { sender: `0x${string}`; value: bigint }) => void, filter?: { sender?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
2218
2218
|
return this.publicClient.watchContractEvent({
|
|
2219
2219
|
address: this.contractAddress,
|
|
2220
|
-
abi:
|
|
2220
|
+
abi: SafeL2Abi,
|
|
2221
2221
|
eventName: 'SafeReceived',
|
|
2222
|
-
args: filter,
|
|
2222
|
+
args: filter as any,
|
|
2223
2223
|
onLogs: (logs: any[]) => {
|
|
2224
2224
|
logs.forEach((log: any) => {
|
|
2225
2225
|
callback(log.args as any);
|
|
@@ -2233,12 +2233,12 @@ export class SafeL2_json {
|
|
|
2233
2233
|
* @param filter Optional filter for indexed parameters
|
|
2234
2234
|
* @returns Unwatch function to stop listening
|
|
2235
2235
|
*/
|
|
2236
|
-
SafeSetup: (callback: (event: { initiator: `0x${string}`; owners: `0x${string}`[]; threshold: bigint; initializer: `0x${string}`; fallbackHandler: `0x${string}` }) => void, filter?: { initiator
|
|
2236
|
+
SafeSetup: (callback: (event: { initiator: `0x${string}`; owners: `0x${string}`[]; threshold: bigint; initializer: `0x${string}`; fallbackHandler: `0x${string}` }) => void, filter?: { initiator?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
2237
2237
|
return this.publicClient.watchContractEvent({
|
|
2238
2238
|
address: this.contractAddress,
|
|
2239
|
-
abi:
|
|
2239
|
+
abi: SafeL2Abi,
|
|
2240
2240
|
eventName: 'SafeSetup',
|
|
2241
|
-
args: filter,
|
|
2241
|
+
args: filter as any,
|
|
2242
2242
|
onLogs: (logs: any[]) => {
|
|
2243
2243
|
logs.forEach((log: any) => {
|
|
2244
2244
|
callback(log.args as any);
|
|
@@ -2252,12 +2252,12 @@ export class SafeL2_json {
|
|
|
2252
2252
|
* @param filter Optional filter for indexed parameters
|
|
2253
2253
|
* @returns Unwatch function to stop listening
|
|
2254
2254
|
*/
|
|
2255
|
-
SignMsg: (callback: (event: { msgHash: `0x${string}` }) => void, filter?: { msgHash
|
|
2255
|
+
SignMsg: (callback: (event: { msgHash: `0x${string}` }) => void, filter?: { msgHash?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
2256
2256
|
return this.publicClient.watchContractEvent({
|
|
2257
2257
|
address: this.contractAddress,
|
|
2258
|
-
abi:
|
|
2258
|
+
abi: SafeL2Abi,
|
|
2259
2259
|
eventName: 'SignMsg',
|
|
2260
|
-
args: filter,
|
|
2260
|
+
args: filter as any,
|
|
2261
2261
|
onLogs: (logs: any[]) => {
|
|
2262
2262
|
logs.forEach((log: any) => {
|
|
2263
2263
|
callback(log.args as any);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Address, PublicClient, WalletClient } from 'viem';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* SafeProxy ABI
|
|
4
4
|
*
|
|
5
5
|
* This ABI is typed using viem's type system for full type safety.
|
|
6
6
|
*/
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const SafeProxyAbi: readonly [{
|
|
8
8
|
readonly inputs: readonly [{
|
|
9
9
|
readonly internalType: "address";
|
|
10
10
|
readonly name: "_singleton";
|
|
@@ -17,15 +17,15 @@ export declare const SafeProxy_jsonAbi: readonly [{
|
|
|
17
17
|
readonly type: "fallback";
|
|
18
18
|
}];
|
|
19
19
|
/**
|
|
20
|
-
* Type-safe ABI for
|
|
20
|
+
* Type-safe ABI for SafeProxy
|
|
21
21
|
*/
|
|
22
|
-
export type
|
|
22
|
+
export type SafeProxyAbi = typeof SafeProxyAbi;
|
|
23
23
|
/**
|
|
24
|
-
* Contract instance type for
|
|
24
|
+
* Contract instance type for SafeProxy
|
|
25
25
|
*/
|
|
26
|
-
export type
|
|
26
|
+
export type SafeProxyContract = any;
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* SafeProxy Contract Class
|
|
29
29
|
*
|
|
30
30
|
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
31
31
|
*
|
|
@@ -33,12 +33,12 @@ export type SafeProxy_jsonContract = any;
|
|
|
33
33
|
* ```typescript
|
|
34
34
|
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
35
35
|
* import { mainnet } from 'viem/chains';
|
|
36
|
-
* import {
|
|
36
|
+
* import { SafeProxy } from 'SafeProxy';
|
|
37
37
|
*
|
|
38
38
|
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
39
39
|
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
40
40
|
*
|
|
41
|
-
* const contract = new
|
|
41
|
+
* const contract = new SafeProxy('0x...', { publicClient, walletClient });
|
|
42
42
|
*
|
|
43
43
|
* // Read functions
|
|
44
44
|
* const result = await contract.balanceOf('0x...');
|
|
@@ -56,7 +56,7 @@ export type SafeProxy_jsonContract = any;
|
|
|
56
56
|
* });
|
|
57
57
|
* ```
|
|
58
58
|
*/
|
|
59
|
-
export declare class
|
|
59
|
+
export declare class SafeProxy {
|
|
60
60
|
private contract;
|
|
61
61
|
private contractAddress;
|
|
62
62
|
private publicClient;
|
|
@@ -69,9 +69,9 @@ export declare class SafeProxy_json {
|
|
|
69
69
|
*/
|
|
70
70
|
get address(): Address;
|
|
71
71
|
/**
|
|
72
|
-
* Get the underlying viem contract instance
|
|
72
|
+
* Get the underlying viem contract instance.
|
|
73
73
|
*/
|
|
74
|
-
getContract():
|
|
74
|
+
getContract(): SafeProxyContract;
|
|
75
75
|
/**
|
|
76
76
|
* Simulate contract write operations (dry-run without sending transaction)
|
|
77
77
|
*
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.SafeProxy = exports.SafeProxyAbi = void 0;
|
|
4
4
|
const viem_1 = require("viem");
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* SafeProxy ABI
|
|
7
7
|
*
|
|
8
8
|
* This ABI is typed using viem's type system for full type safety.
|
|
9
9
|
*/
|
|
10
|
-
exports.
|
|
10
|
+
exports.SafeProxyAbi = [
|
|
11
11
|
{
|
|
12
12
|
"inputs": [
|
|
13
13
|
{
|
|
@@ -25,7 +25,7 @@ exports.SafeProxy_jsonAbi = [
|
|
|
25
25
|
}
|
|
26
26
|
];
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* SafeProxy Contract Class
|
|
29
29
|
*
|
|
30
30
|
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
31
31
|
*
|
|
@@ -33,12 +33,12 @@ exports.SafeProxy_jsonAbi = [
|
|
|
33
33
|
* ```typescript
|
|
34
34
|
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
35
35
|
* import { mainnet } from 'viem/chains';
|
|
36
|
-
* import {
|
|
36
|
+
* import { SafeProxy } from 'SafeProxy';
|
|
37
37
|
*
|
|
38
38
|
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
39
39
|
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
40
40
|
*
|
|
41
|
-
* const contract = new
|
|
41
|
+
* const contract = new SafeProxy('0x...', { publicClient, walletClient });
|
|
42
42
|
*
|
|
43
43
|
* // Read functions
|
|
44
44
|
* const result = await contract.balanceOf('0x...');
|
|
@@ -56,13 +56,13 @@ exports.SafeProxy_jsonAbi = [
|
|
|
56
56
|
* });
|
|
57
57
|
* ```
|
|
58
58
|
*/
|
|
59
|
-
class
|
|
59
|
+
class SafeProxy {
|
|
60
60
|
constructor(address, clients) {
|
|
61
61
|
this.contractAddress = address;
|
|
62
62
|
this.publicClient = clients.publicClient;
|
|
63
63
|
this.contract = (0, viem_1.getContract)({
|
|
64
64
|
address,
|
|
65
|
-
abi: exports.
|
|
65
|
+
abi: exports.SafeProxyAbi,
|
|
66
66
|
client: {
|
|
67
67
|
public: clients.publicClient,
|
|
68
68
|
wallet: clients.walletClient,
|
|
@@ -76,7 +76,7 @@ class SafeProxy_json {
|
|
|
76
76
|
return this.contractAddress;
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
|
-
* Get the underlying viem contract instance
|
|
79
|
+
* Get the underlying viem contract instance.
|
|
80
80
|
*/
|
|
81
81
|
getContract() {
|
|
82
82
|
return this.contract;
|
|
@@ -100,4 +100,4 @@ class SafeProxy_json {
|
|
|
100
100
|
return {};
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
exports.
|
|
103
|
+
exports.SafeProxy = SafeProxy;
|
|
@@ -2,11 +2,11 @@ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType }
|
|
|
2
2
|
import { getContract } from 'viem';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* SafeProxy ABI
|
|
6
6
|
*
|
|
7
7
|
* This ABI is typed using viem's type system for full type safety.
|
|
8
8
|
*/
|
|
9
|
-
export const
|
|
9
|
+
export const SafeProxyAbi = [
|
|
10
10
|
{
|
|
11
11
|
"inputs": [
|
|
12
12
|
{
|
|
@@ -25,19 +25,19 @@ export const SafeProxy_jsonAbi = [
|
|
|
25
25
|
] as const satisfies Abi;
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
* Type-safe ABI for
|
|
28
|
+
* Type-safe ABI for SafeProxy
|
|
29
29
|
*/
|
|
30
|
-
export type
|
|
30
|
+
export type SafeProxyAbi = typeof SafeProxyAbi;
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
|
-
* Contract instance type for
|
|
33
|
+
* Contract instance type for SafeProxy
|
|
34
34
|
*/
|
|
35
35
|
// Use any for contract type to avoid complex viem type issues
|
|
36
36
|
// The runtime behavior is type-safe through viem's ABI typing
|
|
37
|
-
export type
|
|
37
|
+
export type SafeProxyContract = any;
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* SafeProxy Contract Class
|
|
41
41
|
*
|
|
42
42
|
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
43
43
|
*
|
|
@@ -45,12 +45,12 @@ export type SafeProxy_jsonContract = any;
|
|
|
45
45
|
* ```typescript
|
|
46
46
|
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
47
47
|
* import { mainnet } from 'viem/chains';
|
|
48
|
-
* import {
|
|
48
|
+
* import { SafeProxy } from 'SafeProxy';
|
|
49
49
|
*
|
|
50
50
|
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
51
51
|
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
52
52
|
*
|
|
53
|
-
* const contract = new
|
|
53
|
+
* const contract = new SafeProxy('0x...', { publicClient, walletClient });
|
|
54
54
|
*
|
|
55
55
|
* // Read functions
|
|
56
56
|
* const result = await contract.balanceOf('0x...');
|
|
@@ -68,8 +68,8 @@ export type SafeProxy_jsonContract = any;
|
|
|
68
68
|
* });
|
|
69
69
|
* ```
|
|
70
70
|
*/
|
|
71
|
-
export class
|
|
72
|
-
private contract:
|
|
71
|
+
export class SafeProxy {
|
|
72
|
+
private contract: SafeProxyContract;
|
|
73
73
|
private contractAddress: Address;
|
|
74
74
|
private publicClient: PublicClient;
|
|
75
75
|
|
|
@@ -84,7 +84,7 @@ export class SafeProxy_json {
|
|
|
84
84
|
this.publicClient = clients.publicClient;
|
|
85
85
|
this.contract = getContract({
|
|
86
86
|
address,
|
|
87
|
-
abi:
|
|
87
|
+
abi: SafeProxyAbi,
|
|
88
88
|
client: {
|
|
89
89
|
public: clients.publicClient,
|
|
90
90
|
wallet: clients.walletClient,
|
|
@@ -100,9 +100,9 @@ export class SafeProxy_json {
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
/**
|
|
103
|
-
* Get the underlying viem contract instance
|
|
103
|
+
* Get the underlying viem contract instance.
|
|
104
104
|
*/
|
|
105
|
-
getContract():
|
|
105
|
+
getContract(): SafeProxyContract {
|
|
106
106
|
return this.contract;
|
|
107
107
|
}
|
|
108
108
|
|
package/contracts/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export type {
|
|
3
|
-
export {
|
|
4
|
-
export type {
|
|
1
|
+
export { SafeL2Abi, SafeL2 } from './SafeL2';
|
|
2
|
+
export type { SafeL2Abi as SafeL2AbiType, SafeL2Contract } from './SafeL2';
|
|
3
|
+
export { SafeProxyAbi, SafeProxy } from './SafeProxy';
|
|
4
|
+
export type { SafeProxyAbi as SafeProxyAbiType, SafeProxyContract } from './SafeProxy';
|
package/contracts/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.SafeProxy = exports.SafeProxyAbi = exports.SafeL2 = exports.SafeL2Abi = void 0;
|
|
4
4
|
// Auto-generated exports for all contracts
|
|
5
|
-
var
|
|
6
|
-
Object.defineProperty(exports, "
|
|
7
|
-
Object.defineProperty(exports, "
|
|
8
|
-
var
|
|
9
|
-
Object.defineProperty(exports, "
|
|
10
|
-
Object.defineProperty(exports, "
|
|
5
|
+
var SafeL2_1 = require("./SafeL2");
|
|
6
|
+
Object.defineProperty(exports, "SafeL2Abi", { enumerable: true, get: function () { return SafeL2_1.SafeL2Abi; } });
|
|
7
|
+
Object.defineProperty(exports, "SafeL2", { enumerable: true, get: function () { return SafeL2_1.SafeL2; } });
|
|
8
|
+
var SafeProxy_1 = require("./SafeProxy");
|
|
9
|
+
Object.defineProperty(exports, "SafeProxyAbi", { enumerable: true, get: function () { return SafeProxy_1.SafeProxyAbi; } });
|
|
10
|
+
Object.defineProperty(exports, "SafeProxy", { enumerable: true, get: function () { return SafeProxy_1.SafeProxy; } });
|
package/contracts/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Auto-generated exports for all contracts
|
|
2
|
-
export {
|
|
3
|
-
export type {
|
|
4
|
-
export {
|
|
5
|
-
export type {
|
|
2
|
+
export { SafeL2Abi, SafeL2 } from './SafeL2';
|
|
3
|
+
export type { SafeL2Abi as SafeL2AbiType, SafeL2Contract } from './SafeL2';
|
|
4
|
+
export { SafeProxyAbi, SafeProxy } from './SafeProxy';
|
|
5
|
+
export type { SafeProxyAbi as SafeProxyAbiType, SafeProxyContract } from './SafeProxy';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitmyabi/safel",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Auto-generated TypeScript type bindings for SafeL (build etherscan-safel-
|
|
3
|
+
"version": "1.0.9",
|
|
4
|
+
"description": "Auto-generated TypeScript type bindings for SafeL (build etherscan-safel-5b14e90e-1793794934357, commit 16121ca, branch etherscan)",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
7
7
|
"exports": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"abi",
|
|
31
31
|
"ethers-v6"
|
|
32
32
|
],
|
|
33
|
-
"license": "
|
|
33
|
+
"license": "Apache-2.0",
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"viem": "^2.0.0"
|
|
36
36
|
},
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"url": "https://github.com/etherscan/safel"
|
|
40
40
|
},
|
|
41
41
|
"branch": "etherscan",
|
|
42
|
-
"shortHash": "
|
|
42
|
+
"shortHash": "16121ca"
|
|
43
43
|
}
|