@gitmyabi/gnosissafe 1.0.0
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 +108 -0
- package/contracts/GnosisSafe_json.d.ts +1632 -0
- package/contracts/GnosisSafe_json.js +1806 -0
- package/contracts/GnosisSafe_json.ts +2203 -0
- package/contracts/Proxy_json.d.ts +89 -0
- package/contracts/Proxy_json.js +105 -0
- package/contracts/Proxy_json.ts +134 -0
- package/contracts/index.d.ts +4 -0
- package/contracts/index.js +10 -0
- package/contracts/index.ts +5 -0
- package/index.d.ts +1 -0
- package/index.js +19 -0
- package/package.json +43 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { Address, PublicClient, WalletClient } from 'viem';
|
|
2
|
+
/**
|
|
3
|
+
* Proxy_json ABI
|
|
4
|
+
*
|
|
5
|
+
* This ABI is typed using viem's type system for full type safety.
|
|
6
|
+
*/
|
|
7
|
+
export declare const Proxy_jsonAbi: readonly [{
|
|
8
|
+
readonly inputs: readonly [{
|
|
9
|
+
readonly internalType: "address";
|
|
10
|
+
readonly name: "_masterCopy";
|
|
11
|
+
readonly type: "address";
|
|
12
|
+
}];
|
|
13
|
+
readonly payable: false;
|
|
14
|
+
readonly stateMutability: "nonpayable";
|
|
15
|
+
readonly type: "constructor";
|
|
16
|
+
}, {
|
|
17
|
+
readonly payable: true;
|
|
18
|
+
readonly stateMutability: "payable";
|
|
19
|
+
readonly type: "fallback";
|
|
20
|
+
}];
|
|
21
|
+
/**
|
|
22
|
+
* Type-safe ABI for Proxy_json
|
|
23
|
+
*/
|
|
24
|
+
export type Proxy_jsonAbi = typeof Proxy_jsonAbi;
|
|
25
|
+
/**
|
|
26
|
+
* Contract instance type for Proxy_json
|
|
27
|
+
*/
|
|
28
|
+
export type Proxy_jsonContract = any;
|
|
29
|
+
/**
|
|
30
|
+
* Proxy_json Contract Class
|
|
31
|
+
*
|
|
32
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```typescript
|
|
36
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
37
|
+
* import { mainnet } from 'viem/chains';
|
|
38
|
+
* import { Proxy_json } from 'Proxy_json';
|
|
39
|
+
*
|
|
40
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
41
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
42
|
+
*
|
|
43
|
+
* const contract = new Proxy_json('0x...', { publicClient, walletClient });
|
|
44
|
+
*
|
|
45
|
+
* // Read functions
|
|
46
|
+
* const result = await contract.balanceOf('0x...');
|
|
47
|
+
*
|
|
48
|
+
* // Write functions
|
|
49
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
50
|
+
*
|
|
51
|
+
* // Simulate transactions (dry-run)
|
|
52
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
53
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
54
|
+
*
|
|
55
|
+
* // Watch events
|
|
56
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
57
|
+
* console.log('Transfer event:', event);
|
|
58
|
+
* });
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
export declare class Proxy_json {
|
|
62
|
+
private contract;
|
|
63
|
+
private contractAddress;
|
|
64
|
+
private publicClient;
|
|
65
|
+
constructor(address: Address, clients: {
|
|
66
|
+
publicClient: PublicClient;
|
|
67
|
+
walletClient?: WalletClient;
|
|
68
|
+
});
|
|
69
|
+
/**
|
|
70
|
+
* Get the contract address
|
|
71
|
+
*/
|
|
72
|
+
get address(): Address;
|
|
73
|
+
/**
|
|
74
|
+
* Get the underlying viem contract instance
|
|
75
|
+
*/
|
|
76
|
+
getContract(): Proxy_jsonContract;
|
|
77
|
+
/**
|
|
78
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
79
|
+
*
|
|
80
|
+
* Note: This contract has no write functions, so simulate returns an empty object.
|
|
81
|
+
*/
|
|
82
|
+
get simulate(): {};
|
|
83
|
+
/**
|
|
84
|
+
* Watch contract events
|
|
85
|
+
*
|
|
86
|
+
* Note: This contract has no events, so watch returns an empty object.
|
|
87
|
+
*/
|
|
88
|
+
get watch(): {};
|
|
89
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Proxy_json = exports.Proxy_jsonAbi = void 0;
|
|
4
|
+
const viem_1 = require("viem");
|
|
5
|
+
/**
|
|
6
|
+
* Proxy_json ABI
|
|
7
|
+
*
|
|
8
|
+
* This ABI is typed using viem's type system for full type safety.
|
|
9
|
+
*/
|
|
10
|
+
exports.Proxy_jsonAbi = [
|
|
11
|
+
{
|
|
12
|
+
"inputs": [
|
|
13
|
+
{
|
|
14
|
+
"internalType": "address",
|
|
15
|
+
"name": "_masterCopy",
|
|
16
|
+
"type": "address"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"payable": false,
|
|
20
|
+
"stateMutability": "nonpayable",
|
|
21
|
+
"type": "constructor"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"payable": true,
|
|
25
|
+
"stateMutability": "payable",
|
|
26
|
+
"type": "fallback"
|
|
27
|
+
}
|
|
28
|
+
];
|
|
29
|
+
/**
|
|
30
|
+
* Proxy_json Contract Class
|
|
31
|
+
*
|
|
32
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```typescript
|
|
36
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
37
|
+
* import { mainnet } from 'viem/chains';
|
|
38
|
+
* import { Proxy_json } from 'Proxy_json';
|
|
39
|
+
*
|
|
40
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
41
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
42
|
+
*
|
|
43
|
+
* const contract = new Proxy_json('0x...', { publicClient, walletClient });
|
|
44
|
+
*
|
|
45
|
+
* // Read functions
|
|
46
|
+
* const result = await contract.balanceOf('0x...');
|
|
47
|
+
*
|
|
48
|
+
* // Write functions
|
|
49
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
50
|
+
*
|
|
51
|
+
* // Simulate transactions (dry-run)
|
|
52
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
53
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
54
|
+
*
|
|
55
|
+
* // Watch events
|
|
56
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
57
|
+
* console.log('Transfer event:', event);
|
|
58
|
+
* });
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
class Proxy_json {
|
|
62
|
+
constructor(address, clients) {
|
|
63
|
+
this.contractAddress = address;
|
|
64
|
+
this.publicClient = clients.publicClient;
|
|
65
|
+
this.contract = (0, viem_1.getContract)({
|
|
66
|
+
address,
|
|
67
|
+
abi: exports.Proxy_jsonAbi,
|
|
68
|
+
client: {
|
|
69
|
+
public: clients.publicClient,
|
|
70
|
+
wallet: clients.walletClient,
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Get the contract address
|
|
76
|
+
*/
|
|
77
|
+
get address() {
|
|
78
|
+
return this.contractAddress;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Get the underlying viem contract instance
|
|
82
|
+
*/
|
|
83
|
+
getContract() {
|
|
84
|
+
return this.contract;
|
|
85
|
+
}
|
|
86
|
+
// No read functions
|
|
87
|
+
// No write functions
|
|
88
|
+
/**
|
|
89
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
90
|
+
*
|
|
91
|
+
* Note: This contract has no write functions, so simulate returns an empty object.
|
|
92
|
+
*/
|
|
93
|
+
get simulate() {
|
|
94
|
+
return {};
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Watch contract events
|
|
98
|
+
*
|
|
99
|
+
* Note: This contract has no events, so watch returns an empty object.
|
|
100
|
+
*/
|
|
101
|
+
get watch() {
|
|
102
|
+
return {};
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
exports.Proxy_json = Proxy_json;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
|
|
2
|
+
import { getContract } from 'viem';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Proxy_json ABI
|
|
6
|
+
*
|
|
7
|
+
* This ABI is typed using viem's type system for full type safety.
|
|
8
|
+
*/
|
|
9
|
+
export const Proxy_jsonAbi = [
|
|
10
|
+
{
|
|
11
|
+
"inputs": [
|
|
12
|
+
{
|
|
13
|
+
"internalType": "address",
|
|
14
|
+
"name": "_masterCopy",
|
|
15
|
+
"type": "address"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"payable": false,
|
|
19
|
+
"stateMutability": "nonpayable",
|
|
20
|
+
"type": "constructor"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"payable": true,
|
|
24
|
+
"stateMutability": "payable",
|
|
25
|
+
"type": "fallback"
|
|
26
|
+
}
|
|
27
|
+
] as const satisfies Abi;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Type-safe ABI for Proxy_json
|
|
31
|
+
*/
|
|
32
|
+
export type Proxy_jsonAbi = typeof Proxy_jsonAbi;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Contract instance type for Proxy_json
|
|
36
|
+
*/
|
|
37
|
+
// Use any for contract type to avoid complex viem type issues
|
|
38
|
+
// The runtime behavior is type-safe through viem's ABI typing
|
|
39
|
+
export type Proxy_jsonContract = any;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Proxy_json Contract Class
|
|
43
|
+
*
|
|
44
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
49
|
+
* import { mainnet } from 'viem/chains';
|
|
50
|
+
* import { Proxy_json } from 'Proxy_json';
|
|
51
|
+
*
|
|
52
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
53
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
54
|
+
*
|
|
55
|
+
* const contract = new Proxy_json('0x...', { publicClient, walletClient });
|
|
56
|
+
*
|
|
57
|
+
* // Read functions
|
|
58
|
+
* const result = await contract.balanceOf('0x...');
|
|
59
|
+
*
|
|
60
|
+
* // Write functions
|
|
61
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
62
|
+
*
|
|
63
|
+
* // Simulate transactions (dry-run)
|
|
64
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
65
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
66
|
+
*
|
|
67
|
+
* // Watch events
|
|
68
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
69
|
+
* console.log('Transfer event:', event);
|
|
70
|
+
* });
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
export class Proxy_json {
|
|
74
|
+
private contract: Proxy_jsonContract;
|
|
75
|
+
private contractAddress: Address;
|
|
76
|
+
private publicClient: PublicClient;
|
|
77
|
+
|
|
78
|
+
constructor(
|
|
79
|
+
address: Address,
|
|
80
|
+
clients: {
|
|
81
|
+
publicClient: PublicClient;
|
|
82
|
+
walletClient?: WalletClient;
|
|
83
|
+
}
|
|
84
|
+
) {
|
|
85
|
+
this.contractAddress = address;
|
|
86
|
+
this.publicClient = clients.publicClient;
|
|
87
|
+
this.contract = getContract({
|
|
88
|
+
address,
|
|
89
|
+
abi: Proxy_jsonAbi,
|
|
90
|
+
client: {
|
|
91
|
+
public: clients.publicClient,
|
|
92
|
+
wallet: clients.walletClient,
|
|
93
|
+
},
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Get the contract address
|
|
99
|
+
*/
|
|
100
|
+
get address(): Address {
|
|
101
|
+
return this.contractAddress;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Get the underlying viem contract instance
|
|
106
|
+
*/
|
|
107
|
+
getContract(): Proxy_jsonContract {
|
|
108
|
+
return this.contract;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// No read functions
|
|
112
|
+
|
|
113
|
+
// No write functions
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
119
|
+
*
|
|
120
|
+
* Note: This contract has no write functions, so simulate returns an empty object.
|
|
121
|
+
*/
|
|
122
|
+
get simulate() {
|
|
123
|
+
return {};
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Watch contract events
|
|
128
|
+
*
|
|
129
|
+
* Note: This contract has no events, so watch returns an empty object.
|
|
130
|
+
*/
|
|
131
|
+
get watch() {
|
|
132
|
+
return {};
|
|
133
|
+
}
|
|
134
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { Proxy_jsonAbi, Proxy_json } from './Proxy_json';
|
|
2
|
+
export type { Proxy_jsonAbi as Proxy_jsonAbiType, Proxy_jsonContract } from './Proxy_json';
|
|
3
|
+
export { GnosisSafe_jsonAbi, GnosisSafe_json } from './GnosisSafe_json';
|
|
4
|
+
export type { GnosisSafe_jsonAbi as GnosisSafe_jsonAbiType, GnosisSafe_jsonContract } from './GnosisSafe_json';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GnosisSafe_json = exports.GnosisSafe_jsonAbi = exports.Proxy_json = exports.Proxy_jsonAbi = void 0;
|
|
4
|
+
// Auto-generated exports for all contracts
|
|
5
|
+
var Proxy_json_1 = require("./Proxy_json");
|
|
6
|
+
Object.defineProperty(exports, "Proxy_jsonAbi", { enumerable: true, get: function () { return Proxy_json_1.Proxy_jsonAbi; } });
|
|
7
|
+
Object.defineProperty(exports, "Proxy_json", { enumerable: true, get: function () { return Proxy_json_1.Proxy_json; } });
|
|
8
|
+
var GnosisSafe_json_1 = require("./GnosisSafe_json");
|
|
9
|
+
Object.defineProperty(exports, "GnosisSafe_jsonAbi", { enumerable: true, get: function () { return GnosisSafe_json_1.GnosisSafe_jsonAbi; } });
|
|
10
|
+
Object.defineProperty(exports, "GnosisSafe_json", { enumerable: true, get: function () { return GnosisSafe_json_1.GnosisSafe_json; } });
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// Auto-generated exports for all contracts
|
|
2
|
+
export { Proxy_jsonAbi, Proxy_json } from './Proxy_json';
|
|
3
|
+
export type { Proxy_jsonAbi as Proxy_jsonAbiType, Proxy_jsonContract } from './Proxy_json';
|
|
4
|
+
export { GnosisSafe_jsonAbi, GnosisSafe_json } from './GnosisSafe_json';
|
|
5
|
+
export type { GnosisSafe_jsonAbi as GnosisSafe_jsonAbiType, GnosisSafe_jsonContract } from './GnosisSafe_json';
|
package/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './contracts';
|
package/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Auto-generated TypeScript type bindings
|
|
3
|
+
// This file exports all generated contract types
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
16
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
__exportStar(require("./contracts"), exports);
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@gitmyabi/gnosissafe",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Auto-generated TypeScript type bindings for GnosisSafe (build etherscan-gnosissafe-ff7b5e16-1784910157229, commit 2effb0d, branch etherscan)",
|
|
5
|
+
"main": "./index.js",
|
|
6
|
+
"types": "./index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./index.js",
|
|
10
|
+
"require": "./index.js",
|
|
11
|
+
"types": "./index.d.ts"
|
|
12
|
+
},
|
|
13
|
+
"./contracts": {
|
|
14
|
+
"import": "./contracts/index.js",
|
|
15
|
+
"require": "./contracts/index.js",
|
|
16
|
+
"types": "./contracts/index.d.ts"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"index.js",
|
|
21
|
+
"index.d.ts",
|
|
22
|
+
"contracts"
|
|
23
|
+
],
|
|
24
|
+
"keywords": [
|
|
25
|
+
"ethereum",
|
|
26
|
+
"smart-contracts",
|
|
27
|
+
"viem",
|
|
28
|
+
"wagmi",
|
|
29
|
+
"typescript",
|
|
30
|
+
"abi",
|
|
31
|
+
"ethers-v6"
|
|
32
|
+
],
|
|
33
|
+
"license": "MIT",
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"viem": "^2.0.0"
|
|
36
|
+
},
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "https://github.com/etherscan/gnosissafe"
|
|
40
|
+
},
|
|
41
|
+
"branch": "etherscan",
|
|
42
|
+
"shortHash": "2effb0d"
|
|
43
|
+
}
|