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: modify protocol message #1

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hadelive
Copy link
Collaborator

Content

This PR includes...

Pre-submit checklist

  • Branch
    • Tests are provided (if possible)
    • Crates versions are updated (if relevant)
    • CHANGELOG file is updated (if relevant)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
  • PR
    • No clippy warnings in the CI
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested
  • Documentation
    • Update README file (if relevant)
    • Update documentation website (if relevant)
    • Add dev blog post (if relevant)

Comments

Issue(s)

Relates to #YYY or Closes #YYY

use std::fmt::{Debug, Formatter};

use crate::entities::{BlockNumber, CardanoTransaction, ChainPoint, SlotNumber, TransactionHash};
use pallas_primitives::conway::PseudoDatumOption;
use pallas_traverse::{MultiEraBlock, MultiEraTx};

Check warning

Code scanning / cargo-doc

unused import: MultiEraTx Warning

unused import: MultiEraTx

use crate::entities::{
BlockHash, BlockNumber, BridgeTransactionMetadata, CardanoTransaction, ChainPoint,

Check warning

Code scanning / cargo-doc

unused import: BlockHash Warning

unused import: BlockHash

#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
pub struct BridgeTransactionMetadata {
pub sender_address: String,

Check warning

Code scanning / cargo-doc

missing documentation for a struct field Warning

missing documentation for a struct field
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
pub struct BridgeTransactionMetadata {
pub sender_address: String,
pub recipient_address: String,

Check warning

Code scanning / cargo-doc

missing documentation for a struct field Warning

missing documentation for a struct field

// Note(hadelive): we can import the uplc library here
pub trait ToPlutusData {
fn to_plutus_data(&self) -> PlutusData;

Check warning

Code scanning / cargo-doc

missing documentation for a method Warning

missing documentation for a method
fn to_plutus_data(&self) -> PlutusData;
}

pub trait FromPlutusData {

Check warning

Code scanning / cargo-doc

missing documentation for a trait Warning

missing documentation for a trait
Comment on lines +143 to +152
fn from_plutus_data(plutus_data: PlutusData) -> Result<Self, BridgeParseError>
where
Self: Sized;

Check warning

Code scanning / cargo-doc

missing documentation for an associated function Warning

missing documentation for an associated function
Comment on lines +95 to +97
let bridge_transactions = self
.transaction_importer
.get_bridge_transactions(beacon)

Check failure

Code scanning / cargo-doc

no method named get_bridge_transactions found for struct std::sync::Arc<(dyn signable_builder::cardano_transactions::TransactionsImporter + 'static)> in the current scope Error

no method named get_bridge_transactions found for struct std::sync::Arc<(dyn signable_builder::cardano_transactions::TransactionsImporter + 'static)> in the current scope
// Retrieve the bridge transactions for the current block
let bridge_transactions = self
.transaction_importer
.get_bridge_transactions(beacon)

Check failure

Code scanning / cargo-doc

no method named get_bridge_transactions found for struct std::sync::Arc<(dyn signable_builder::cardano_transactions::TransactionsImporter + 'static)> in the current scope Error

no method named get_bridge_transactions found for struct std::sync::Arc<(dyn signable_builder::cardano_transactions::TransactionsImporter + 'static)> in the current scope
use std::fmt::{Debug, Formatter};

use crate::entities::{BlockNumber, CardanoTransaction, ChainPoint, SlotNumber, TransactionHash};
use pallas_primitives::conway::PseudoDatumOption;
use pallas_traverse::{MultiEraBlock, MultiEraTx};

Check warning

Code scanning / clippy

unused import: MultiEraTx Warning

unused import: MultiEraTx

use crate::entities::{
BlockHash, BlockNumber, BridgeTransactionMetadata, CardanoTransaction, ChainPoint,

Check warning

Code scanning / clippy

unused import: BlockHash Warning

unused import: BlockHash
Comment on lines +95 to +97
let bridge_transactions = self
.transaction_importer
.get_bridge_transactions(beacon)

Check failure

Code scanning / clippy

no method named get_bridge_transactions found for struct std::sync::Arc<(dyn signable_builder::cardano_transactions::TransactionsImporter + 'static)> in the current scope Error

no method named get_bridge_transactions found for struct std::sync::Arc<(dyn signable_builder::cardano_transactions::TransactionsImporter + 'static)> in the current scope
// Retrieve the bridge transactions for the current block
let bridge_transactions = self
.transaction_importer
.get_bridge_transactions(beacon)

Check failure

Code scanning / clippy

no method named get_bridge_transactions found for struct std::sync::Arc<(dyn signable_builder::cardano_transactions::TransactionsImporter + 'static)> in the current scope Error

no method named get_bridge_transactions found for struct std::sync::Arc<(dyn signable_builder::cardano_transactions::TransactionsImporter + 'static)> in the current scope
}
}
}

#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
pub struct BridgeTransactionMetadata {

Check warning

Code scanning / cargo-doc

missing documentation for a struct Warning

missing documentation for a struct
}
}
}

#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
pub struct BridgeTransactionMetadata {
pub tx_id: String,

Check warning

Code scanning / cargo-doc

missing documentation for a struct field Warning

missing documentation for a struct field
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant