@apibara/evm 2.0.1-beta.9 → 2.1.0-beta.2
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.cjs +60 -44
- package/dist/index.d.cts +271 -265
- package/dist/index.d.mts +271 -265
- package/dist/index.d.ts +271 -265
- package/dist/index.mjs +60 -44
- package/package.json +2 -2
- package/src/block.ts +43 -42
- package/src/proto/data.ts +21 -1
package/dist/index.cjs
CHANGED
|
@@ -1938,7 +1938,8 @@ function createBaseLog() {
|
|
|
1938
1938
|
data: new Uint8Array(0),
|
|
1939
1939
|
transactionIndex: 0,
|
|
1940
1940
|
transactionHash: void 0,
|
|
1941
|
-
transactionStatus: 0
|
|
1941
|
+
transactionStatus: 0,
|
|
1942
|
+
logIndexInTransaction: 0
|
|
1942
1943
|
};
|
|
1943
1944
|
}
|
|
1944
1945
|
const Log$1 = {
|
|
@@ -1973,6 +1974,9 @@ const Log$1 = {
|
|
|
1973
1974
|
if (message.transactionStatus !== void 0 && message.transactionStatus !== 0) {
|
|
1974
1975
|
writer.uint32(64).int32(message.transactionStatus);
|
|
1975
1976
|
}
|
|
1977
|
+
if (message.logIndexInTransaction !== void 0 && message.logIndexInTransaction !== 0) {
|
|
1978
|
+
writer.uint32(72).uint32(message.logIndexInTransaction);
|
|
1979
|
+
}
|
|
1976
1980
|
return writer;
|
|
1977
1981
|
},
|
|
1978
1982
|
decode(input, length) {
|
|
@@ -2037,6 +2041,12 @@ const Log$1 = {
|
|
|
2037
2041
|
}
|
|
2038
2042
|
message.transactionStatus = reader.int32();
|
|
2039
2043
|
continue;
|
|
2044
|
+
case 9:
|
|
2045
|
+
if (tag !== 72) {
|
|
2046
|
+
break;
|
|
2047
|
+
}
|
|
2048
|
+
message.logIndexInTransaction = reader.uint32();
|
|
2049
|
+
continue;
|
|
2040
2050
|
}
|
|
2041
2051
|
if ((tag & 7) === 4 || tag === 0) {
|
|
2042
2052
|
break;
|
|
@@ -2054,7 +2064,8 @@ const Log$1 = {
|
|
|
2054
2064
|
data: isSet$1(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0),
|
|
2055
2065
|
transactionIndex: isSet$1(object.transactionIndex) ? globalThis.Number(object.transactionIndex) : 0,
|
|
2056
2066
|
transactionHash: isSet$1(object.transactionHash) ? B256.fromJSON(object.transactionHash) : void 0,
|
|
2057
|
-
transactionStatus: isSet$1(object.transactionStatus) ? transactionStatusFromJSON(object.transactionStatus) : 0
|
|
2067
|
+
transactionStatus: isSet$1(object.transactionStatus) ? transactionStatusFromJSON(object.transactionStatus) : 0,
|
|
2068
|
+
logIndexInTransaction: isSet$1(object.logIndexInTransaction) ? globalThis.Number(object.logIndexInTransaction) : 0
|
|
2058
2069
|
};
|
|
2059
2070
|
},
|
|
2060
2071
|
toJSON(message) {
|
|
@@ -2083,6 +2094,9 @@ const Log$1 = {
|
|
|
2083
2094
|
if (message.transactionStatus !== void 0 && message.transactionStatus !== 0) {
|
|
2084
2095
|
obj.transactionStatus = transactionStatusToJSON(message.transactionStatus);
|
|
2085
2096
|
}
|
|
2097
|
+
if (message.logIndexInTransaction !== void 0 && message.logIndexInTransaction !== 0) {
|
|
2098
|
+
obj.logIndexInTransaction = Math.round(message.logIndexInTransaction);
|
|
2099
|
+
}
|
|
2086
2100
|
return obj;
|
|
2087
2101
|
},
|
|
2088
2102
|
create(base) {
|
|
@@ -2098,6 +2112,7 @@ const Log$1 = {
|
|
|
2098
2112
|
message.transactionIndex = object.transactionIndex ?? 0;
|
|
2099
2113
|
message.transactionHash = object.transactionHash !== void 0 && object.transactionHash !== null ? B256.fromPartial(object.transactionHash) : void 0;
|
|
2100
2114
|
message.transactionStatus = object.transactionStatus ?? 0;
|
|
2115
|
+
message.logIndexInTransaction = object.logIndexInTransaction ?? 0;
|
|
2101
2116
|
return message;
|
|
2102
2117
|
}
|
|
2103
2118
|
};
|
|
@@ -3016,18 +3031,18 @@ const TransactionStatus = schema.Schema.transform(
|
|
|
3016
3031
|
);
|
|
3017
3032
|
const BlockHeader = schema.Schema.Struct({
|
|
3018
3033
|
blockNumber: schema.Schema.BigIntFromSelf,
|
|
3019
|
-
blockHash:
|
|
3020
|
-
parentBlockHash:
|
|
3021
|
-
unclesHash:
|
|
3022
|
-
miner:
|
|
3023
|
-
stateRoot:
|
|
3024
|
-
transactionsRoot:
|
|
3025
|
-
receiptsRoot:
|
|
3026
|
-
logsBloom:
|
|
3027
|
-
difficulty:
|
|
3028
|
-
gasLimit:
|
|
3029
|
-
gasUsed:
|
|
3030
|
-
timestamp: schema.Schema.
|
|
3034
|
+
blockHash: B256$1,
|
|
3035
|
+
parentBlockHash: B256$1,
|
|
3036
|
+
unclesHash: B256$1,
|
|
3037
|
+
miner: Address$1,
|
|
3038
|
+
stateRoot: B256$1,
|
|
3039
|
+
transactionsRoot: B256$1,
|
|
3040
|
+
receiptsRoot: B256$1,
|
|
3041
|
+
logsBloom: Bloom,
|
|
3042
|
+
difficulty: U256$1,
|
|
3043
|
+
gasLimit: U128$1,
|
|
3044
|
+
gasUsed: U128$1,
|
|
3045
|
+
timestamp: schema.Schema.DateFromSelf,
|
|
3031
3046
|
extraData: protocol.BytesFromUint8Array,
|
|
3032
3047
|
mixHash: schema.Schema.optional(B256$1),
|
|
3033
3048
|
nonce: schema.Schema.optional(schema.Schema.BigIntFromSelf),
|
|
@@ -3039,72 +3054,73 @@ const BlockHeader = schema.Schema.Struct({
|
|
|
3039
3054
|
parentBeaconBlockRoot: schema.Schema.optional(B256$1)
|
|
3040
3055
|
});
|
|
3041
3056
|
const Withdrawal = schema.Schema.Struct({
|
|
3042
|
-
filterIds: schema.Schema.
|
|
3057
|
+
filterIds: schema.Schema.Array(schema.Schema.Number),
|
|
3043
3058
|
withdrawalIndex: schema.Schema.Number,
|
|
3044
3059
|
index: schema.Schema.BigIntFromSelf,
|
|
3045
3060
|
validatorIndex: schema.Schema.Number,
|
|
3046
|
-
address:
|
|
3047
|
-
amount: schema.Schema.
|
|
3061
|
+
address: Address$1,
|
|
3062
|
+
amount: schema.Schema.BigIntFromSelf
|
|
3048
3063
|
});
|
|
3049
3064
|
const AccessListItem = schema.Schema.Struct({
|
|
3050
|
-
address:
|
|
3065
|
+
address: Address$1,
|
|
3051
3066
|
storageKeys: schema.Schema.Array(B256$1)
|
|
3052
3067
|
});
|
|
3053
3068
|
const Signature = schema.Schema.Struct({
|
|
3054
|
-
r:
|
|
3055
|
-
s:
|
|
3056
|
-
v:
|
|
3069
|
+
r: U256$1,
|
|
3070
|
+
s: U256$1,
|
|
3071
|
+
v: U256$1,
|
|
3057
3072
|
YParity: schema.Schema.optional(schema.Schema.Boolean)
|
|
3058
3073
|
});
|
|
3059
3074
|
const Transaction = schema.Schema.Struct({
|
|
3060
|
-
filterIds: schema.Schema.
|
|
3075
|
+
filterIds: schema.Schema.Array(schema.Schema.Number),
|
|
3061
3076
|
transactionIndex: schema.Schema.Number,
|
|
3062
|
-
transactionHash:
|
|
3063
|
-
nonce: schema.Schema.
|
|
3064
|
-
from:
|
|
3077
|
+
transactionHash: B256$1,
|
|
3078
|
+
nonce: schema.Schema.BigIntFromSelf,
|
|
3079
|
+
from: Address$1,
|
|
3065
3080
|
to: schema.Schema.optional(Address$1),
|
|
3066
|
-
value:
|
|
3081
|
+
value: U256$1,
|
|
3067
3082
|
gasPrice: schema.Schema.optional(U128$1),
|
|
3068
|
-
gas:
|
|
3083
|
+
gas: U128$1,
|
|
3069
3084
|
maxFeePerGas: schema.Schema.optional(U128$1),
|
|
3070
3085
|
maxPriorityFeePerGas: schema.Schema.optional(U128$1),
|
|
3071
3086
|
input: protocol.BytesFromUint8Array,
|
|
3072
3087
|
signature: schema.Schema.optional(Signature),
|
|
3073
3088
|
chainId: schema.Schema.optional(schema.Schema.BigIntFromSelf),
|
|
3074
3089
|
accessList: schema.Schema.Array(AccessListItem),
|
|
3075
|
-
transactionType: schema.Schema.
|
|
3090
|
+
transactionType: schema.Schema.BigIntFromSelf,
|
|
3076
3091
|
maxFeePerBlobGas: schema.Schema.optional(U128$1),
|
|
3077
3092
|
blobVersionedHashes: schema.Schema.Array(B256$1),
|
|
3078
|
-
transactionStatus:
|
|
3093
|
+
transactionStatus: TransactionStatus
|
|
3079
3094
|
});
|
|
3080
3095
|
const TransactionReceipt = schema.Schema.Struct({
|
|
3081
|
-
filterIds: schema.Schema.
|
|
3082
|
-
transactionIndex: schema.Schema.
|
|
3083
|
-
transactionHash:
|
|
3084
|
-
cumulativeGasUsed:
|
|
3085
|
-
gasUsed:
|
|
3086
|
-
effectiveGasPrice:
|
|
3087
|
-
from:
|
|
3096
|
+
filterIds: schema.Schema.Array(schema.Schema.Number),
|
|
3097
|
+
transactionIndex: schema.Schema.Number,
|
|
3098
|
+
transactionHash: B256$1,
|
|
3099
|
+
cumulativeGasUsed: U128$1,
|
|
3100
|
+
gasUsed: U128$1,
|
|
3101
|
+
effectiveGasPrice: U128$1,
|
|
3102
|
+
from: Address$1,
|
|
3088
3103
|
to: schema.Schema.optional(Address$1),
|
|
3089
3104
|
contractAddress: schema.Schema.optional(Address$1),
|
|
3090
|
-
logsBloom:
|
|
3091
|
-
transactionType: schema.Schema.
|
|
3105
|
+
logsBloom: Bloom,
|
|
3106
|
+
transactionType: schema.Schema.BigIntFromSelf,
|
|
3092
3107
|
blobGasUsed: schema.Schema.optional(U128$1),
|
|
3093
3108
|
blobGasPrice: schema.Schema.optional(U128$1),
|
|
3094
|
-
transactionStatus:
|
|
3109
|
+
transactionStatus: TransactionStatus
|
|
3095
3110
|
});
|
|
3096
3111
|
const Log = schema.Schema.Struct({
|
|
3097
|
-
filterIds: schema.Schema.
|
|
3098
|
-
address:
|
|
3112
|
+
filterIds: schema.Schema.Array(schema.Schema.Number),
|
|
3113
|
+
address: Address$1,
|
|
3099
3114
|
topics: schema.Schema.Array(B256$1),
|
|
3100
3115
|
data: protocol.BytesFromUint8Array,
|
|
3101
3116
|
logIndex: schema.Schema.Number,
|
|
3117
|
+
logIndexInTransaction: schema.Schema.Number,
|
|
3102
3118
|
transactionIndex: schema.Schema.Number,
|
|
3103
|
-
transactionHash:
|
|
3104
|
-
transactionStatus:
|
|
3119
|
+
transactionHash: B256$1,
|
|
3120
|
+
transactionStatus: TransactionStatus
|
|
3105
3121
|
});
|
|
3106
3122
|
const Block = schema.Schema.Struct({
|
|
3107
|
-
header:
|
|
3123
|
+
header: BlockHeader,
|
|
3108
3124
|
withdrawals: schema.Schema.Array(Withdrawal),
|
|
3109
3125
|
transactions: schema.Schema.Array(Transaction),
|
|
3110
3126
|
receipts: schema.Schema.Array(TransactionReceipt),
|