@gearbox-protocol/sdk 10.7.2 → 10.7.3
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/cjs/permissionless/bindings/bytecode-repository.js +11 -0
- package/dist/esm/permissionless/bindings/bytecode-repository.js +11 -0
- package/dist/types/permissionless/bindings/bytecode-repository.d.ts +2 -0
- package/dist/types/permissionless/core/bytecode.d.ts +0 -15
- package/package.json +1 -1
|
@@ -51,11 +51,22 @@ class BytecodeRepositoryContract extends import_base_contract.BaseContract {
|
|
|
51
51
|
(0, import_viem.stringToHex)(type_, { size: 32 })
|
|
52
52
|
]);
|
|
53
53
|
}
|
|
54
|
+
async getAllowedBytecodeHash(type_, version) {
|
|
55
|
+
return await this.contract.read.getAllowedBytecodeHash([
|
|
56
|
+
(0, import_viem.stringToHex)(type_, { size: 32 }),
|
|
57
|
+
BigInt(version)
|
|
58
|
+
]);
|
|
59
|
+
}
|
|
54
60
|
async isPublicDomain(domain) {
|
|
55
61
|
return await this.contract.read.isPublicDomain([
|
|
56
62
|
(0, import_viem.stringToHex)(domain, { size: 32 })
|
|
57
63
|
]);
|
|
58
64
|
}
|
|
65
|
+
async isSystemDomain(domain) {
|
|
66
|
+
return await this.contract.read.isSystemDomain([
|
|
67
|
+
(0, import_viem.stringToHex)(domain, { size: 32 })
|
|
68
|
+
]);
|
|
69
|
+
}
|
|
59
70
|
// // Write functions
|
|
60
71
|
// async uploadBytecode(bytecode: Bytecode) {
|
|
61
72
|
// return await this.contract.write.uploadBytecode([bytecode]);
|
|
@@ -34,11 +34,22 @@ class BytecodeRepositoryContract extends BaseContract {
|
|
|
34
34
|
stringToHex(type_, { size: 32 })
|
|
35
35
|
]);
|
|
36
36
|
}
|
|
37
|
+
async getAllowedBytecodeHash(type_, version) {
|
|
38
|
+
return await this.contract.read.getAllowedBytecodeHash([
|
|
39
|
+
stringToHex(type_, { size: 32 }),
|
|
40
|
+
BigInt(version)
|
|
41
|
+
]);
|
|
42
|
+
}
|
|
37
43
|
async isPublicDomain(domain) {
|
|
38
44
|
return await this.contract.read.isPublicDomain([
|
|
39
45
|
stringToHex(domain, { size: 32 })
|
|
40
46
|
]);
|
|
41
47
|
}
|
|
48
|
+
async isSystemDomain(domain) {
|
|
49
|
+
return await this.contract.read.isSystemDomain([
|
|
50
|
+
stringToHex(domain, { size: 32 })
|
|
51
|
+
]);
|
|
52
|
+
}
|
|
42
53
|
// // Write functions
|
|
43
54
|
// async uploadBytecode(bytecode: Bytecode) {
|
|
44
55
|
// return await this.contract.write.uploadBytecode([bytecode]);
|
|
@@ -1169,7 +1169,9 @@ export declare class BytecodeRepositoryContract extends BaseContract<typeof abi>
|
|
|
1169
1169
|
isBytecodeUploaded(hash: `0x${string}`): Promise<boolean>;
|
|
1170
1170
|
isBytecodeAudited(hash: `0x${string}`): Promise<boolean>;
|
|
1171
1171
|
getLatestVersion(type_: string): Promise<bigint>;
|
|
1172
|
+
getAllowedBytecodeHash(type_: string, version: number): Promise<Hex>;
|
|
1172
1173
|
isPublicDomain(domain: string): Promise<boolean>;
|
|
1174
|
+
isSystemDomain(domain: string): Promise<boolean>;
|
|
1173
1175
|
getUploadBytecodeEvents(fromBlock: bigint, toBlock: bigint, chunkSize?: number): Promise<Omit<Bytecode, "uploadedAt">[]>;
|
|
1174
1176
|
getAddAuditorEvents(fromBlock: bigint, toBlock: bigint): Promise<Auditor[]>;
|
|
1175
1177
|
getDeployContractEvents(fromBlock: bigint, toBlock: bigint): Promise<Omit<DeploymentExtended, "timestamp">[]>;
|
|
@@ -11,21 +11,6 @@ export interface Bytecode {
|
|
|
11
11
|
transactionHash: Hex;
|
|
12
12
|
blockNumber: number;
|
|
13
13
|
}
|
|
14
|
-
export interface BytecodeShort extends Omit<Bytecode, "initCode" | "transactionHash" | "blockNumber" | "source" | "author"> {
|
|
15
|
-
auditorNames: string[];
|
|
16
|
-
}
|
|
17
|
-
export interface BytecodeExtended extends Bytecode {
|
|
18
|
-
verificationData?: unknown;
|
|
19
|
-
deployments: Deployment[];
|
|
20
|
-
audits: Audit[];
|
|
21
|
-
}
|
|
22
|
-
export interface Audit {
|
|
23
|
-
report: string;
|
|
24
|
-
auditor: Address;
|
|
25
|
-
auditorName: string;
|
|
26
|
-
isAuditorRemoved: boolean;
|
|
27
|
-
timestamp: number;
|
|
28
|
-
}
|
|
29
14
|
export interface AuditEvent {
|
|
30
15
|
reportUrl: string;
|
|
31
16
|
auditor: Address;
|