Skip to content

Commit

Permalink
Merge pull request #8 from immutable/features/DATA-1787
Browse files Browse the repository at this point in the history
DATA-1787 Add proxy fields to contracts table
  • Loading branch information
jasadams-imtbl authored Jul 23, 2024
2 parents 1ad4cfb + dc8208e commit 5c679d5
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
33 changes: 30 additions & 3 deletions src/main/java/io/blockchainetl/ethereum/domain/Contract.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ public class Contract {
@JsonProperty("is_erc1155")
private Boolean isErc1155;

@Nullable
@JsonProperty("proxy_type")
private String proxyType;

@Nullable
@JsonProperty("implementation_address")
private String implementationAddress;

@Nullable
@JsonProperty("block_timestamp")
private Long blockTimestamp;
Expand Down Expand Up @@ -121,6 +129,22 @@ public void setErc1155(Boolean erc1155) {
this.isErc1155 = erc1155;
}

public String getProxyType() {
return proxyType;
}

public void setProxyType(String proxyType) {
this.proxyType = proxyType;
}

public String getImplementationAddress() {
return implementationAddress;
}

public void setImplementationAddress(String implementationAddress) {
this.implementationAddress = implementationAddress;
}

public Long getBlockTimestamp() {
return blockTimestamp;
}
Expand Down Expand Up @@ -162,16 +186,17 @@ public boolean equals(Object o) {
Objects.equal(isErc20, contract.isErc20) &&
Objects.equal(isErc721, contract.isErc721) &&
Objects.equal(isErc1155, contract.isErc1155) &&
Objects.equal(proxyType, contract.proxyType) &&
Objects.equal(implementationAddress, contract.implementationAddress) &&
Objects.equal(blockTimestamp, contract.blockTimestamp) &&
Objects.equal(blockNumber, contract.blockNumber) &&
Objects.equal(blockHash, contract.blockHash);
}

@Override
public int hashCode() {
return Objects.hashCode(type, address, chainId, bytecode, functionSighashes, isErc20, isErc721, isErc1155, blockTimestamp,
blockNumber,
blockHash);
return Objects.hashCode(type, address, chainId, bytecode, functionSighashes, isErc20, isErc721, isErc1155,
proxyType, implementationAddress, blockTimestamp, blockNumber, blockHash);
}

@Override
Expand All @@ -185,6 +210,8 @@ public String toString() {
.add("isErc20", isErc20)
.add("isErc721", isErc721)
.add("isErc1155", isErc1155)
.add("proxyType", proxyType)
.add("implementationAddress", implementationAddress)
.add("blockTimestamp", blockTimestamp)
.add("blockNumber", blockNumber)
.add("blockHash", blockHash)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ protected void populateTableRowFields(TableRow row, String element) {
row.set("is_erc20", contract.getErc20());
row.set("is_erc721", contract.getErc721());
row.set("is_erc1155", contract.getErc1155());
row.set("proxy_type", contract.getProxyType());
row.set("implementation_address", contract.getImplementationAddress());
row.set("block_number", contract.getBlockNumber());
row.set("block_hash", contract.getBlockHash());
}
Expand Down
2 changes: 1 addition & 1 deletion terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ resource "google_dataflow_flex_template_job" "zkevm_imtbl_mainnet_job" {
project = "${terraform.workspace}-im-data"
runner = "DataflowRunner"
workerMachineType = "n1-standard-1"
maxNumWorkers = 1
maxNumWorkers = 4
diskSizeGb=30
enableStreamingEngine=true
region=local.region
Expand Down

0 comments on commit 5c679d5

Please sign in to comment.