diff --git a/packages/api/src/address/address.controller.spec.ts b/packages/api/src/address/address.controller.spec.ts
index 35586a0f8a..da1a5cae40 100644
--- a/packages/api/src/address/address.controller.spec.ts
+++ b/packages/api/src/address/address.controller.spec.ts
@@ -142,6 +142,7 @@ describe("AddressController", () => {
blockNumber: addressBalances.blockNumber,
balances: addressBalances.balances,
totalTransactions: totalTxCount,
+ isEvmLike: addressRecord.isEvmLike,
});
});
@@ -163,6 +164,7 @@ describe("AddressController", () => {
blockNumber: addressRecord.createdInBlockNumber,
balances: defaultBalancesResponse.balances,
totalTransactions: totalTxCount,
+ isEvmLike: addressRecord.isEvmLike,
});
});
});
diff --git a/packages/api/src/address/address.controller.ts b/packages/api/src/address/address.controller.ts
index 2d7d9839a6..0172c404d0 100644
--- a/packages/api/src/address/address.controller.ts
+++ b/packages/api/src/address/address.controller.ts
@@ -75,6 +75,7 @@ export class AddressController {
creatorTxHash: addressRecord.creatorTxHash,
totalTransactions,
creatorAddress: addressRecord.creatorAddress,
+ isEvmLike: addressRecord.isEvmLike,
};
}
diff --git a/packages/api/src/address/address.entity.ts b/packages/api/src/address/address.entity.ts
index 5cd4583010..1f107d39ab 100644
--- a/packages/api/src/address/address.entity.ts
+++ b/packages/api/src/address/address.entity.ts
@@ -21,4 +21,7 @@ export class Address extends BaseEntity {
@Column({ type: "bytea", nullable: true, transformer: normalizeAddressTransformer })
public readonly creatorAddress?: string;
+
+ @Column({ type: "boolean", nullable: true })
+ public readonly isEvmLike?: boolean;
}
diff --git a/packages/api/src/address/dtos/contract.dto.ts b/packages/api/src/address/dtos/contract.dto.ts
index cef1b9adb3..e21cc25196 100644
--- a/packages/api/src/address/dtos/contract.dto.ts
+++ b/packages/api/src/address/dtos/contract.dto.ts
@@ -42,4 +42,11 @@ export class ContractDto extends BaseAddressDto {
example: "0xd754Ff5e8a6f257E162F72578A4bB0493c0681d8",
})
public readonly creatorAddress: string;
+
+ @ApiProperty({
+ type: Boolean,
+ description: "Is the contract EVM-like",
+ example: true,
+ })
+ public readonly isEvmLike: boolean;
}
diff --git a/packages/api/src/common/transformers/normalizeAddress.transformer.ts b/packages/api/src/common/transformers/normalizeAddress.transformer.ts
index ec08defd44..010a7aa80c 100644
--- a/packages/api/src/common/transformers/normalizeAddress.transformer.ts
+++ b/packages/api/src/common/transformers/normalizeAddress.transformer.ts
@@ -10,6 +10,7 @@ export const normalizeAddressTransformer: ValueTransformer = {
if (!hex) {
return null;
}
+
return getAddress(hexTransformer.from(hex));
},
};
diff --git a/packages/api/src/transaction/dtos/transaction.dto.ts b/packages/api/src/transaction/dtos/transaction.dto.ts
index 597ec07753..fefc44049a 100644
--- a/packages/api/src/transaction/dtos/transaction.dto.ts
+++ b/packages/api/src/transaction/dtos/transaction.dto.ts
@@ -12,9 +12,10 @@ export class TransactionDto {
@ApiProperty({
type: String,
description: "The address this transaction is to",
- example: "0xc7e0220d02d549c4846A6EC31D89C3B670Ebe35C",
+ example: ["0xc7e0220d02d549c4846A6EC31D89C3B670Ebe35C", null],
+ nullable: true,
})
- public readonly to: string;
+ public readonly to?: string;
@ApiProperty({
type: String,
@@ -204,4 +205,20 @@ export class TransactionDto {
nullable: true,
})
public readonly revertReason?: string;
+
+ @ApiProperty({
+ type: Boolean,
+ description: "Is the transaction EVM-like",
+ example: true,
+ nullable: true,
+ })
+ public readonly isEvmLike?: boolean;
+
+ @ApiProperty({
+ type: String,
+ description: "Address of the first deployed EVM contract",
+ example: ["0xc7e0220d02d549c4846A6EC31D89C3B670Ebe35C", null],
+ nullable: true,
+ })
+ public readonly contractAddress?: string;
}
diff --git a/packages/api/src/transaction/entities/transaction.entity.ts b/packages/api/src/transaction/entities/transaction.entity.ts
index b907d539c5..a0871358d6 100644
--- a/packages/api/src/transaction/entities/transaction.entity.ts
+++ b/packages/api/src/transaction/entities/transaction.entity.ts
@@ -31,8 +31,8 @@ export class Transaction extends BaseEntity {
@Column({ generated: true, type: "bigint" })
public number: number;
- @Column({ type: "bytea", transformer: normalizeAddressTransformer })
- public readonly to: string;
+ @Column({ type: "bytea", transformer: normalizeAddressTransformer, nullable: true })
+ public readonly to?: string;
@Index()
@Column({ type: "bytea", transformer: normalizeAddressTransformer })
@@ -107,6 +107,12 @@ export class Transaction extends BaseEntity {
@Column({ nullable: true })
public readonly revertReason?: string;
+ @Column({ type: "boolean", nullable: true })
+ public readonly isEvmLike?: boolean;
+
+ @Column({ type: "bytea", transformer: normalizeAddressTransformer, nullable: true })
+ public readonly contractAddress?: string;
+
public get status(): TransactionStatus {
if (this.receiptStatus === 0) {
return TransactionStatus.Failed;
diff --git a/packages/api/test/address.e2e-spec.ts b/packages/api/test/address.e2e-spec.ts
index 7ffa7f5508..151875c0e0 100644
--- a/packages/api/test/address.e2e-spec.ts
+++ b/packages/api/test/address.e2e-spec.ts
@@ -790,6 +790,7 @@ describe("AddressController (e2e)", () => {
createdInBlockNumber: 10,
creatorAddress: "0x91d0a23f34e535e44Df8Ba84c53a0945cf0eEB60",
creatorTxHash: "0x8a008b8dbbc18035e56370abb820e736b705d68d6ac12b203603db8d9ea87e15",
+ isEvmLike: null,
totalTransactions: 4,
type: "contract",
})
@@ -849,6 +850,7 @@ describe("AddressController (e2e)", () => {
createdInBlockNumber: 10,
creatorAddress: "0x91d0a23f34e535e44Df8Ba84c53a0945cf0eEB60",
creatorTxHash: "0x8a008b8dbbc18035e56370abb820e736b705d68d6ac12b203603db8d9ea87e15",
+ isEvmLike: null,
totalTransactions: 4,
type: "contract",
})
@@ -908,6 +910,7 @@ describe("AddressController (e2e)", () => {
createdInBlockNumber: 10,
creatorAddress: "0x91d0a23f34e535e44Df8Ba84c53a0945cf0eEB60",
creatorTxHash: "0x8a008b8dbbc18035e56370abb820e736b705d68d6ac12b203603db8d9ea87e15",
+ isEvmLike: null,
totalTransactions: 4,
type: "contract",
})
@@ -967,6 +970,7 @@ describe("AddressController (e2e)", () => {
createdInBlockNumber: 10,
creatorAddress: "0x91d0a23f34e535e44Df8Ba84c53a0945cf0eEB60",
creatorTxHash: "0x8a008b8dbbc18035e56370abb820e736b705d68d6ac12b203603db8d9ea87e15",
+ isEvmLike: null,
totalTransactions: 4,
type: "contract",
})
@@ -987,6 +991,7 @@ describe("AddressController (e2e)", () => {
createdInBlockNumber: 10,
creatorAddress: "0x91d0a23f34e535e44Df8Ba84c53a0945cf0eEB60",
creatorTxHash: "0x8a008b8dbbc18035e56370abb820e736b705d68d6ac12b203603db8d9ea87e15",
+ isEvmLike: null,
totalTransactions: 0,
type: "contract",
})
diff --git a/packages/api/test/transaction.e2e-spec.ts b/packages/api/test/transaction.e2e-spec.ts
index 305933ed74..6b7f225638 100644
--- a/packages/api/test/transaction.e2e-spec.ts
+++ b/packages/api/test/transaction.e2e-spec.ts
@@ -268,6 +268,8 @@ describe("TransactionController (e2e)", () => {
maxFeePerGas: "3009",
maxPriorityFeePerGas: "4009",
hash: "0x8a008b8dbbc18035e56370abb820e736b705d68d6ac12b203603db8d9ea87e19",
+ isEvmLike: null,
+ contractAddress: null,
isL1BatchSealed: false,
isL1Originated: true,
l1BatchNumber: 9,
@@ -296,6 +298,8 @@ describe("TransactionController (e2e)", () => {
maxFeePerGas: "3008",
maxPriorityFeePerGas: "4008",
hash: "0x8a008b8dbbc18035e56370abb820e736b705d68d6ac12b203603db8d9ea87e18",
+ isEvmLike: null,
+ contractAddress: null,
isL1BatchSealed: true,
isL1Originated: true,
l1BatchNumber: 8,
@@ -324,6 +328,8 @@ describe("TransactionController (e2e)", () => {
maxFeePerGas: "3007",
maxPriorityFeePerGas: "4007",
hash: "0x8a008b8dbbc18035e56370abb820e736b705d68d6ac12b203603db8d9ea87e17",
+ isEvmLike: null,
+ contractAddress: null,
isL1BatchSealed: true,
isL1Originated: true,
l1BatchNumber: 7,
@@ -352,6 +358,8 @@ describe("TransactionController (e2e)", () => {
maxFeePerGas: "3006",
maxPriorityFeePerGas: "4006",
hash: "0x8a008b8dbbc18035e56370abb820e736b705d68d6ac12b203603db8d9ea87e16",
+ isEvmLike: null,
+ contractAddress: null,
isL1BatchSealed: true,
isL1Originated: true,
l1BatchNumber: 6,
@@ -380,6 +388,8 @@ describe("TransactionController (e2e)", () => {
maxFeePerGas: "3005",
maxPriorityFeePerGas: "4005",
hash: "0x8a008b8dbbc18035e56370abb820e736b705d68d6ac12b203603db8d9ea87e15",
+ isEvmLike: null,
+ contractAddress: null,
isL1BatchSealed: true,
isL1Originated: true,
l1BatchNumber: 5,
@@ -408,6 +418,8 @@ describe("TransactionController (e2e)", () => {
maxFeePerGas: "3004",
maxPriorityFeePerGas: "4004",
hash: "0x8a008b8dbbc18035e56370abb820e736b705d68d6ac12b203603db8d9ea87e14",
+ isEvmLike: null,
+ contractAddress: null,
isL1BatchSealed: true,
isL1Originated: true,
l1BatchNumber: 4,
@@ -436,6 +448,8 @@ describe("TransactionController (e2e)", () => {
maxFeePerGas: "3003",
maxPriorityFeePerGas: "4003",
hash: "0x8a008b8dbbc18035e56370abb820e736b705d68d6ac12b203603db8d9ea87e13",
+ isEvmLike: null,
+ contractAddress: null,
isL1BatchSealed: true,
isL1Originated: true,
l1BatchNumber: 3,
@@ -464,6 +478,8 @@ describe("TransactionController (e2e)", () => {
maxFeePerGas: "3002",
maxPriorityFeePerGas: "4002",
hash: "0x8a008b8dbbc18035e56370abb820e736b705d68d6ac12b203603db8d9ea87e12",
+ isEvmLike: null,
+ contractAddress: null,
isL1BatchSealed: false,
isL1Originated: true,
l1BatchNumber: 1,
@@ -492,6 +508,8 @@ describe("TransactionController (e2e)", () => {
maxFeePerGas: "3001",
maxPriorityFeePerGas: "4001",
hash: "0x8a008b8dbbc18035e56370abb820e736b705d68d6ac12b203603db8d9ea87e11",
+ isEvmLike: null,
+ contractAddress: null,
isL1BatchSealed: false,
isL1Originated: true,
l1BatchNumber: 1,
@@ -520,6 +538,8 @@ describe("TransactionController (e2e)", () => {
maxFeePerGas: "3000",
maxPriorityFeePerGas: "4000",
hash: "0x8a008b8dbbc18035e56370abb820e736b705d68d6ac12b203603db8d9ea87e10",
+ isEvmLike: null,
+ contractAddress: null,
isL1BatchSealed: false,
isL1Originated: true,
l1BatchNumber: 1,
@@ -558,6 +578,8 @@ describe("TransactionController (e2e)", () => {
maxFeePerGas: "3008",
maxPriorityFeePerGas: "4008",
hash: "0x8a008b8dbbc18035e56370abb820e736b705d68d6ac12b203603db8d9ea87e18",
+ isEvmLike: null,
+ contractAddress: null,
isL1BatchSealed: true,
isL1Originated: true,
l1BatchNumber: 8,
@@ -586,6 +608,8 @@ describe("TransactionController (e2e)", () => {
maxFeePerGas: "3007",
maxPriorityFeePerGas: "4007",
hash: "0x8a008b8dbbc18035e56370abb820e736b705d68d6ac12b203603db8d9ea87e17",
+ isEvmLike: null,
+ contractAddress: null,
isL1BatchSealed: true,
isL1Originated: true,
l1BatchNumber: 7,
@@ -614,6 +638,8 @@ describe("TransactionController (e2e)", () => {
maxFeePerGas: "3006",
maxPriorityFeePerGas: "4006",
hash: "0x8a008b8dbbc18035e56370abb820e736b705d68d6ac12b203603db8d9ea87e16",
+ isEvmLike: null,
+ contractAddress: null,
isL1BatchSealed: true,
isL1Originated: true,
l1BatchNumber: 6,
@@ -698,6 +724,8 @@ describe("TransactionController (e2e)", () => {
maxFeePerGas: "3001",
maxPriorityFeePerGas: "4001",
hash: "0x8a008b8dbbc18035e56370abb820e736b705d68d6ac12b203603db8d9ea87e11",
+ isEvmLike: null,
+ contractAddress: null,
isL1BatchSealed: false,
isL1Originated: true,
l1BatchNumber: 1,
@@ -751,6 +779,8 @@ describe("TransactionController (e2e)", () => {
maxFeePerGas: "3001",
maxPriorityFeePerGas: "4001",
hash: "0x8a008b8dbbc18035e56370abb820e736b705d68d6ac12b203603db8d9ea87e11",
+ isEvmLike: null,
+ contractAddress: null,
isL1BatchSealed: false,
isL1Originated: true,
l1BatchNumber: 1,
@@ -804,6 +834,8 @@ describe("TransactionController (e2e)", () => {
maxFeePerGas: "3007",
maxPriorityFeePerGas: "4007",
hash: "0x8a008b8dbbc18035e56370abb820e736b705d68d6ac12b203603db8d9ea87e17",
+ isEvmLike: null,
+ contractAddress: null,
isL1BatchSealed: true,
isL1Originated: true,
l1BatchNumber: 7,
@@ -832,6 +864,8 @@ describe("TransactionController (e2e)", () => {
maxFeePerGas: "3006",
maxPriorityFeePerGas: "4006",
hash: "0x8a008b8dbbc18035e56370abb820e736b705d68d6ac12b203603db8d9ea87e16",
+ isEvmLike: null,
+ contractAddress: null,
isL1BatchSealed: true,
isL1Originated: true,
l1BatchNumber: 6,
@@ -922,6 +956,8 @@ describe("TransactionController (e2e)", () => {
maxFeePerGas: "3008",
maxPriorityFeePerGas: "4008",
hash: "0x8a008b8dbbc18035e56370abb820e736b705d68d6ac12b203603db8d9ea87e18",
+ isEvmLike: null,
+ contractAddress: null,
isL1BatchSealed: true,
isL1Originated: true,
l1BatchNumber: 8,
@@ -959,6 +995,8 @@ describe("TransactionController (e2e)", () => {
maxFeePerGas: "3005",
maxPriorityFeePerGas: "4005",
hash: "0x8a008b8dbbc18035e56370abb820e736b705d68d6ac12b203603db8d9ea87e15",
+ isEvmLike: null,
+ contractAddress: null,
isL1BatchSealed: true,
isL1Originated: true,
l1BatchNumber: 5,
@@ -996,6 +1034,8 @@ describe("TransactionController (e2e)", () => {
maxFeePerGas: "3003",
maxPriorityFeePerGas: "4003",
hash: "0x8a008b8dbbc18035e56370abb820e736b705d68d6ac12b203603db8d9ea87e13",
+ isEvmLike: null,
+ contractAddress: null,
isL1BatchSealed: true,
isL1Originated: true,
l1BatchNumber: 3,
@@ -1033,6 +1073,8 @@ describe("TransactionController (e2e)", () => {
maxFeePerGas: "3000",
maxPriorityFeePerGas: "4000",
hash: "0x8a008b8dbbc18035e56370abb820e736b705d68d6ac12b203603db8d9ea87e10",
+ isEvmLike: null,
+ contractAddress: null,
isL1BatchSealed: true,
isL1Originated: true,
l1BatchNumber: 1,
@@ -1070,6 +1112,8 @@ describe("TransactionController (e2e)", () => {
maxFeePerGas: "3009",
maxPriorityFeePerGas: "4009",
hash: "0x8a008b8dbbc18035e56370abb820e736b705d68d6ac12b203603db8d9ea87e19",
+ isEvmLike: null,
+ contractAddress: null,
isL1BatchSealed: true,
isL1Originated: true,
l1BatchNumber: 9,
@@ -1107,6 +1151,8 @@ describe("TransactionController (e2e)", () => {
maxFeePerGas: "3000",
maxPriorityFeePerGas: "4000",
hash: "0x8a008b8dbbc18035e56370abb820e736b705d68d6ac12b203603db8d9ea87e10",
+ isEvmLike: null,
+ contractAddress: null,
isL1BatchSealed: true,
isL1Originated: true,
l1BatchNumber: 1,
diff --git a/packages/app/src/components/Contract.vue b/packages/app/src/components/Contract.vue
index c8bf8a58b4..d60707f66b 100644
--- a/packages/app/src/components/Contract.vue
+++ b/packages/app/src/components/Contract.vue
@@ -8,6 +8,7 @@
:title="contractName ?? t('contract.title')"
:value="contractName ? undefined : contract?.address"
:is-verified="contract?.verificationInfo != null"
+ :is-evm-like="contract?.isEvmLike"
/>