Skip to content

Commit 09809a0

Browse files
committed
More contracts proto updates
1 parent c47c747 commit 09809a0

File tree

7 files changed

+396
-234
lines changed

7 files changed

+396
-234
lines changed

contracts/contract.proto

+23-14
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ option go_package = "github.com/unpackdev/protos/dist/go/contracts;contracts_pb"
55
import "ir/eip.proto";
66
import "contracts/vulnerability.proto";
77
import "contracts/constructor.proto";
8+
import "contracts/proxy.proto";
89
import "sources/source.proto";
910

1011
// Represents details of a contract.
@@ -23,40 +24,48 @@ message Contract {
2324
bool verified = 12; // Indicates if the contract is verified.
2425
string compiler_version = 13; // Version of the compiler used.
2526
string evm_version = 14; // Version of the EVM used.
26-
bool optimized = 15; // Indicates if the contract is optimized.
27-
int32 optimization_runs = 16; // Number of optimization runs.
27+
string solgo_version = 15; // Version of the Solgo, used to decompile contract.
28+
bool optimized = 16; // Indicates if the contract is optimized.
29+
int32 optimization_runs = 17; // Number of optimization runs.
2830

2931
// List of possible contract types associated.
30-
repeated string possible_contract_types = 17;
32+
repeated string possible_contract_types = 18;
3133

3234
// Total number of contracts discovered in the IR.
33-
int32 contracts_count = 18;
35+
int32 contracts_count = 19;
3436

3537
// List of Ethereum Improvement Proposals (EIPs) associated with this IR.
36-
repeated unpack.v1.ir.EIP standards = 19;
38+
repeated unpack.v1.ir.EIP standards = 20;
3739

3840
// Metadata URLs associated with the contract.
39-
repeated string metadata_urls = 20;
41+
repeated string metadata_urls = 21;
4042

4143
// Implementations associated with the contract.
42-
repeated unpack.v1.contracts.Implements implements = 21;
44+
repeated unpack.v1.contracts.ProxyImplementation implementations = 22;
4345

4446
// Constructor details of the contract.
45-
unpack.v1.contracts.Constructor constructor = 22;
47+
unpack.v1.contracts.Constructor constructor = 23;
4648

4749
// Indicates if the contract has vulnerabilities.
48-
bool has_vulnerabilities = 23;
50+
bool has_vulnerabilities = 24;
4951

5052
// Metrics of vulnerabilities associated with the contract.
51-
repeated unpack.v1.contracts.VulnerabilityMetric vulnerability_metrics = 24;
53+
repeated unpack.v1.contracts.VulnerabilityMetric vulnerability_metrics = 25;
5254

5355
// Vulnerabilities associated with the contract.
54-
repeated unpack.v1.contracts.Vulnerability vulnerabilities = 25;
56+
repeated unpack.v1.contracts.Vulnerability vulnerabilities = 26;
5557

5658
// ABI of the contract in raw JSON format.
57-
string abi = 26;
59+
string abi = 27;
5860

59-
unpack.v1.sources.Sources sources = 27;
61+
unpack.v1.sources.Sources sources = 28;
6062

61-
bool is_proxy = 28;
63+
bool is_proxy = 29;
64+
65+
bool self_destructed = 30;
66+
67+
repeated string processed_states = 31;
68+
repeated string failed_states = 32;
69+
bool processed = 33;
70+
bool partial = 34;
6271
}

contracts/proxy.proto

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
syntax = "proto3";
2+
package unpack.v1.contracts;
3+
option go_package = "github.com/unpackdev/protos/dist/go/contracts;contracts_pb";
4+
5+
// Represents a contract's implementation details.
6+
message ProxyImplementation {
7+
string address = 1; // Address of the proxy implementation.
8+
bool current = 2; // Is current proxy implementation active (currently used) or not.
9+
}

contracts/vulnerability.proto

-6
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@ syntax = "proto3";
22
package unpack.v1.contracts;
33
option go_package = "github.com/unpackdev/protos/dist/go/contracts;contracts_pb";
44

5-
// Represents a contract's implementation details.
6-
message Implements {
7-
string uuid = 1; // Unique identifier for the implementation.
8-
string name = 2; // Name of the implementation.
9-
}
10-
115
// Represents a vulnerability metric.
126
message VulnerabilityMetric {
137
string level = 1; // Severity level of the vulnerability.

0 commit comments

Comments
 (0)