From 3a0f8a01c04b4a0d40791fff2658d50fbc7ce9a7 Mon Sep 17 00:00:00 2001 From: thinkAfCod Date: Mon, 9 Sep 2024 15:13:27 +0800 Subject: [PATCH] move encoding tools --- hildr-node/build.gradle | 6 ++++++ .../optimism/utilities/encoding/TxDecoder.java | 16 ++++++++++++++++ .../optimism/utilities/encoding/TxEncoder.java | 16 ++++++++++++++++ 3 files changed, 38 insertions(+) rename {hildr-utilities => hildr-node}/src/main/java/io/optimism/utilities/encoding/TxDecoder.java (76%) rename {hildr-utilities => hildr-node}/src/main/java/io/optimism/utilities/encoding/TxEncoder.java (93%) diff --git a/hildr-node/build.gradle b/hildr-node/build.gradle index 9fdbcaff..5d3f4f6b 100644 --- a/hildr-node/build.gradle +++ b/hildr-node/build.gradle @@ -140,6 +140,12 @@ dependencies { implementation('io.tmio:tuweni-crypto:2.4.2'){ exclude group: 'org.bouncycastle', module: 'bcprov-jdk15on' } + + implementation('org.hyperledger.besu.internal:core:23.10.2') + implementation('org.hyperledger.besu.internal:algorithms:23.10.2') + implementation('org.hyperledger.besu.internal:rlp:23.10.2') + implementation('org.hyperledger.besu:besu-datatypes:23.10.2') + implementation 'io.tmio:tuweni-rlp:2.4.2' implementation('tech.pegasys.discovery:discovery:22.12.0') implementation 'org.xerial.snappy:snappy-java:1.1.10.5' diff --git a/hildr-utilities/src/main/java/io/optimism/utilities/encoding/TxDecoder.java b/hildr-node/src/main/java/io/optimism/utilities/encoding/TxDecoder.java similarity index 76% rename from hildr-utilities/src/main/java/io/optimism/utilities/encoding/TxDecoder.java rename to hildr-node/src/main/java/io/optimism/utilities/encoding/TxDecoder.java index 6987d38c..665943a9 100644 --- a/hildr-utilities/src/main/java/io/optimism/utilities/encoding/TxDecoder.java +++ b/hildr-node/src/main/java/io/optimism/utilities/encoding/TxDecoder.java @@ -1,3 +1,19 @@ +/* + * Copyright 2023 q315xia@163.com + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + package io.optimism.utilities.encoding; import io.optimism.type.DepositTransaction; diff --git a/hildr-utilities/src/main/java/io/optimism/utilities/encoding/TxEncoder.java b/hildr-node/src/main/java/io/optimism/utilities/encoding/TxEncoder.java similarity index 93% rename from hildr-utilities/src/main/java/io/optimism/utilities/encoding/TxEncoder.java rename to hildr-node/src/main/java/io/optimism/utilities/encoding/TxEncoder.java index e1f457ec..a9bbe4df 100644 --- a/hildr-utilities/src/main/java/io/optimism/utilities/encoding/TxEncoder.java +++ b/hildr-node/src/main/java/io/optimism/utilities/encoding/TxEncoder.java @@ -1,3 +1,19 @@ +/* + * Copyright 2023 q315xia@163.com + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + package io.optimism.utilities.encoding; import com.fasterxml.jackson.databind.DeserializationFeature;