Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:raw span batch #92

Merged
merged 1 commit into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions hildr-utilities/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ version = '0.1.1'
repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
maven { url "https://artifacts.consensys.net/public/teku/maven/"
maven {
url "https://artifacts.consensys.net/public/teku/maven/"
}
maven {
url "https://dl.cloudsmith.io/public/libp2p/jvm-libp2p/maven/"
Expand Down Expand Up @@ -93,7 +94,7 @@ dependencies {

testImplementation platform('org.junit:junit-bom:5.9.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation('io.tmio:tuweni-crypto:2.4.2'){
testImplementation('io.tmio:tuweni-crypto:2.4.2') {
exclude group: 'org.bouncycastle', module: 'bcprov-jdk15on'
}

Expand Down Expand Up @@ -165,4 +166,20 @@ spotless {

removeUnusedImports()
}


}

javadoc {
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
options.addBooleanOption('-enable-preview', true)
options.addStringOption('-release', '21')
// options.addStringOption('-add-modules', 'jdk.incubator.concurrent')
}

java {
withJavadocJar()
withSourcesJar()
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,23 @@ public class DepositTransaction {
*/
private String data;

/**
* Instantiates a new Deposit transaction.
*/
public DepositTransaction() {}

/**
* Instantiates a new Deposit transaction.
*
* @param sourceHash the source hash
* @param from the from
* @param to the to
* @param mint the mint
* @param value the value
* @param gas the gas
* @param isSystemTransaction the is system transaction
* @param data the data
*/
public DepositTransaction(
String sourceHash,
String from,
Expand All @@ -92,38 +107,83 @@ public DepositTransaction(
this.data = data;
}

/**
* Gets source hash.
*
* @return the source hash
*/
public String getSourceHash() {
return sourceHash;
}

/**
* Gets from.
*
* @return the from
*/
public String getFrom() {
return from;
}

/**
* Gets to.
*
* @return the to
*/
public String getTo() {
return to;
}

/**
* Gets mint.
*
* @return the mint
*/
public BigInteger getMint() {
return mint;
}

/**
* Gets value.
*
* @return the value
*/
public BigInteger getValue() {
return value;
}

/**
* Gets gas.
*
* @return the gas
*/
public BigInteger getGas() {
return gas;
}

/**
* Is system transaction boolean.
*
* @return the boolean
*/
public boolean isSystemTransaction() {
return isSystemTransaction;
}

/**
* Gets data.
*
* @return the data
*/
public String getData() {
return data;
}

/**
* As rlp values list.
*
* @return the list
*/
public List<RlpType> asRlpValues() {
List<RlpType> result = new ArrayList<>();
result.add(RlpString.create(getSourceHash()));
Expand Down
115 changes: 115 additions & 0 deletions hildr-utilities/src/main/java/io/optimism/type/RollupConfigResult.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,90 +98,205 @@ public class RollupConfigResult {
@JsonProperty("l1_system_config_address")
private String l1SystemConfigAddress;

/**
* Instantiates a new Rollup config result.
*/
public RollupConfigResult() {}

/**
* Gets genesis.
*
* @return the genesis
*/
public Genesis getGenesis() {
return genesis;
}

/**
* Sets genesis.
*
* @param genesis the genesis
*/
public void setGenesis(Genesis genesis) {
this.genesis = genesis;
}

/**
* Gets block time.
*
* @return the block time
*/
public BigInteger getBlockTime() {
return blockTime;
}

/**
* Sets block time.
*
* @param blockTime the block time
*/
public void setBlockTime(BigInteger blockTime) {
this.blockTime = blockTime;
}

/**
* Gets max sequencer drift.
*
* @return the max sequencer drift
*/
public BigInteger getMaxSequencerDrift() {
return maxSequencerDrift;
}

/**
* Sets max sequencer drift.
*
* @param maxSequencerDrift the max sequencer drift
*/
public void setMaxSequencerDrift(BigInteger maxSequencerDrift) {
this.maxSequencerDrift = maxSequencerDrift;
}

/**
* Gets seq window size.
*
* @return the seq window size
*/
public BigInteger getSeqWindowSize() {
return seqWindowSize;
}

/**
* Sets seq window size.
*
* @param seqWindowSize the seq window size
*/
public void setSeqWindowSize(BigInteger seqWindowSize) {
this.seqWindowSize = seqWindowSize;
}

/**
* Gets channel timeout.
*
* @return the channel timeout
*/
public BigInteger getChannelTimeout() {
return channelTimeout;
}

/**
* Sets channel timeout.
*
* @param channelTimeout the channel timeout
*/
public void setChannelTimeout(BigInteger channelTimeout) {
this.channelTimeout = channelTimeout;
}

/**
* Gets l 1 chain id.
*
* @return the l 1 chain id
*/
public BigInteger getL1ChainId() {
return l1ChainId;
}

/**
* Sets l 1 chain id.
*
* @param l1ChainId the l 1 chain id
*/
public void setL1ChainId(BigInteger l1ChainId) {
this.l1ChainId = l1ChainId;
}

/**
* Gets l 2 chain id.
*
* @return the l 2 chain id
*/
public BigInteger getL2ChainId() {
return l2ChainId;
}

/**
* Sets l 2 chain id.
*
* @param l2ChainId the l 2 chain id
*/
public void setL2ChainId(BigInteger l2ChainId) {
this.l2ChainId = l2ChainId;
}

/**
* Gets regolith time.
*
* @return the regolith time
*/
public BigInteger getRegolithTime() {
return regolithTime;
}

/**
* Sets regolith time.
*
* @param regolithTime the regolith time
*/
public void setRegolithTime(BigInteger regolithTime) {
this.regolithTime = regolithTime;
}

/**
* Gets batch inbox address.
*
* @return the batch inbox address
*/
public String getBatchInboxAddress() {
return batchInboxAddress;
}

/**
* Sets batch inbox address.
*
* @param batchInboxAddress the batch inbox address
*/
public void setBatchInboxAddress(String batchInboxAddress) {
this.batchInboxAddress = batchInboxAddress;
}

/**
* Gets deposit contract address.
*
* @return the deposit contract address
*/
public String getDepositContractAddress() {
return depositContractAddress;
}

/**
* Sets deposit contract address.
*
* @param depositContractAddress the deposit contract address
*/
public void setDepositContractAddress(String depositContractAddress) {
this.depositContractAddress = depositContractAddress;
}

/**
* Gets l 1 system config address.
*
* @return the l 1 system config address
*/
public String getL1SystemConfigAddress() {
return l1SystemConfigAddress;
}

/**
* Sets l 1 system config address.
*
* @param l1SystemConfigAddress the l 1 system config address
*/
public void setL1SystemConfigAddress(String l1SystemConfigAddress) {
this.l1SystemConfigAddress = l1SystemConfigAddress;
}
Expand Down
11 changes: 11 additions & 0 deletions hildr-utilities/src/main/java/io/optimism/utilities/TxDecoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@
*/
public class TxDecoder {

/**
* Instantiates a new Tx decoder.
*/
public TxDecoder() {}

/**
* Decode to deposit deposit transaction.
*
* @param hexTransaction the hex transaction
* @return the deposit transaction
*/
public static DepositTransaction decodeToDeposit(final String hexTransaction) {
final byte[] transaction = Numeric.hexStringToByteArray(hexTransaction);
if (transaction.length > 0 && transaction[0] != ((byte) 0x7E)) {
Expand Down
Loading
Loading