Skip to content
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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ homepage = "https://github.com/bitfinity-network/bitfinity-evm-sdk"
include = ["src/**/*", "LICENSE", "README.md"]
license = "MIT"
repository = "https://github.com/bitfinity-network/bitfinity-evm-sdk"
version = "0.50.0"
version = "0.51.0"

[workspace.dependencies]
did = { path = "src/did" }
Expand Down
3 changes: 2 additions & 1 deletion src/did/src/ic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,11 @@ pub struct BlockchainBlockInfo {

/// Strategy for confirming a block.
/// When a block is confirmed, it becomes `safe`.
#[derive(Debug, Clone, CandidType, Serialize, Deserialize, PartialEq, Eq)]
#[derive(Debug, Default, Clone, CandidType, Serialize, Deserialize, PartialEq, Eq)]
pub enum BlockConfirmationStrategy {
/// The block does not require any particular confirmation,
/// it is always considered safe.
#[default]
None,

/// The block requires a proof of work to be considered safe.
Expand Down
5 changes: 4 additions & 1 deletion src/did/src/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use ic_log::LogSettings;
use serde::{Deserialize, Serialize};

use crate::permission::Permission;
use crate::{H160, U256};
use crate::{BlockConfirmationStrategy, H160, U256};

/// These are the arguments which are taken by the evm canister init fn
#[derive(Debug, Clone, CandidType, Deserialize)]
Expand All @@ -27,6 +27,8 @@ pub struct EvmCanisterInitData {
pub genesis_accounts: Vec<(H160, Option<U256>)>,
/// Coinbase address
pub coinbase: H160,
/// Block confirmation strategy
pub block_confirmation_strategy: BlockConfirmationStrategy,
}

impl Default for EvmCanisterInitData {
Expand All @@ -42,6 +44,7 @@ impl Default for EvmCanisterInitData {
owner: Principal::management_canister(),
genesis_accounts: vec![],
coinbase: Default::default(),
block_confirmation_strategy: BlockConfirmationStrategy::default(),
}
}
}
Expand Down