Skip to content

Commit

Permalink
fix: attributes tx timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkAfCod committed Mar 8, 2024
1 parent 14f1500 commit fe8243f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ private String deriveAttributesDeposited(L1Info l1Info, BigInteger batchTimestam
BigInteger seq = this.sequenceNumber;
AttributesDeposited attributesDeposited =
AttributesDeposited.fromBlockInfo(l1Info, seq, batchTimestamp, this.config);
DepositedTransaction attributeTx = DepositedTransaction.from(this.config.chainConfig(), batchTimestamp, attributesDeposited);
DepositedTransaction attributeTx =
DepositedTransaction.from(this.config.chainConfig(), batchTimestamp, attributesDeposited);
return Numeric.toHexString(attributeTx.encode());
}

Expand Down Expand Up @@ -424,7 +425,8 @@ public record DepositedTransaction(
* @param attributesDeposited the attributes deposited
* @return the deposited transaction
*/
public static DepositedTransaction from(Config.ChainConfig config, BigInteger l2BlockTime,AttributesDeposited attributesDeposited) {
public static DepositedTransaction from(
Config.ChainConfig config, BigInteger l2BlockTime, AttributesDeposited attributesDeposited) {
byte[] hash = Numeric.hexStringToByteArray(attributesDeposited.hash);
byte[] seq = Numeric.toBytesPadded(attributesDeposited.sequenceNumber, 32);
byte[] h = Hash.sha3(ArrayUtils.addAll(hash, seq));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
package io.optimism.utilities;

import org.apache.commons.lang3.ArrayUtils;
import org.web3j.abi.datatypes.Uint;
import org.web3j.utils.Numeric;

import java.math.BigInteger;

/**
* The BlobCodec class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
import com.google.common.io.Resources;
import java.io.IOException;
import java.net.URL;
import java.util.Arrays;

import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.web3j.utils.Numeric;
Expand Down

0 comments on commit fe8243f

Please sign in to comment.