diff --git a/sequencer/src/auction.rs b/sequencer/src/auction.rs index 0ffc62c7b..65ea4c55b 100644 --- a/sequencer/src/auction.rs +++ b/sequencer/src/auction.rs @@ -7,7 +7,10 @@ use committable::{Commitment, Committable}; use ethers::types::Signature; use hotshot_types::{ data::ViewNumber, - traits::{node_implementation::ConsensusTime, signature_key::BuilderSignatureKey}, + traits::{ + auction_results_provider::HasUrl, node_implementation::ConsensusTime, + signature_key::BuilderSignatureKey, + }, }; use serde::{Deserialize, Serialize}; use std::str::FromStr; @@ -121,10 +124,6 @@ impl BidTxBody { pub fn with_url(self, url: Url) -> Self { Self { url, ..self } } - /// Get the `url` field. - pub fn url(&self) -> Url { - self.url.clone() - } } impl Default for BidTxBody { @@ -238,10 +237,6 @@ impl BidTx { let body = self.body.with_url(url); Self { body, ..self } } - /// Get the `url` field from the body - pub fn url(&self) -> Url { - self.body.url() - } /// get gas price pub fn gas_price(&self) -> FeeAmount { self.body.gas_price @@ -256,6 +251,20 @@ impl BidTx { } } +impl HasUrl for BidTx { + /// Get the `url` field from the body. + fn url(&self) -> Url { + self.body.url() + } +} + +impl HasUrl for BidTxBody { + /// Get the cloned `url` field. + fn url(&self) -> Url { + self.url.clone() + } +} + pub fn mock_full_network_txs(key: Option) -> Vec { // if no key is supplied, use `test_key_pair`. Since default `BidTxBody` is // signed with `test_key_pair`, it will verify successfully