-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,11 @@ where | |
{ | ||
} | ||
|
||
#[diagnostic::on_unimplemented( | ||
Check failure on line 17 in framework/base/src/types/interaction/tx_data/tx_code_source.rs GitHub Actions / Contracts (nightly) / Rust tests
Check failure on line 17 in framework/base/src/types/interaction/tx_data/tx_code_source.rs GitHub Actions / clippy[clippy] framework/base/src/types/interaction/tx_data/tx_code_source.rs#L17
Raw output
Check failure on line 17 in framework/base/src/types/interaction/tx_data/tx_code_source.rs GitHub Actions / clippy[clippy] framework/base/src/types/interaction/tx_data/tx_code_source.rs#L17
Raw output
Check failure on line 17 in framework/base/src/types/interaction/tx_data/tx_code_source.rs GitHub Actions / Contracts (nightly) / Test Coverage
|
||
message = "Type `{Self}` cannot be used as code (does not implement `TxCodeValue<{Env}>`)", | ||
label = "not a valid smart contract byte code", | ||
note = "there are multiple ways to specify SC byte code, but `{Self}` is not one of them" | ||
)] | ||
pub trait TxCodeValue<Env>: AnnotatedValue<Env, ManagedBuffer<Env::Api>> | ||
where | ||
Env: TxEnv, | ||
|
@@ -39,6 +44,11 @@ where | |
{ | ||
} | ||
|
||
#[diagnostic::on_unimplemented( | ||
Check failure on line 47 in framework/base/src/types/interaction/tx_data/tx_code_source.rs GitHub Actions / Contracts (nightly) / Rust tests
Check failure on line 47 in framework/base/src/types/interaction/tx_data/tx_code_source.rs GitHub Actions / clippy[clippy] framework/base/src/types/interaction/tx_data/tx_code_source.rs#L47
Raw output
Check failure on line 47 in framework/base/src/types/interaction/tx_data/tx_code_source.rs GitHub Actions / clippy[clippy] framework/base/src/types/interaction/tx_data/tx_code_source.rs#L47
Raw output
Check failure on line 47 in framework/base/src/types/interaction/tx_data/tx_code_source.rs GitHub Actions / Contracts (nightly) / Test Coverage
|
||
message = "Type `{Self}` cannot be used as code source value (does not implement `TxFromSourceValue<{Env}>`)", | ||
label = "not an address from where to copy the code", | ||
note = "there are multiple ways to specify a code source address, but `{Self}` is not one of them" | ||
)] | ||
pub trait TxFromSourceValue<Env>: AnnotatedValue<Env, ManagedAddress<Env::Api>> | ||
where | ||
Env: TxEnv, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,11 @@ where | |
/// Marks the non-empty sender of a transaction. | ||
/// | ||
/// Enforces the reciipent to be explicitly specified. | ||
#[diagnostic::on_unimplemented( | ||
Check failure on line 16 in framework/base/src/types/interaction/tx_from.rs GitHub Actions / Contracts (nightly) / Rust tests
Check failure on line 16 in framework/base/src/types/interaction/tx_from.rs GitHub Actions / clippy[clippy] framework/base/src/types/interaction/tx_from.rs#L16
Raw output
Check failure on line 16 in framework/base/src/types/interaction/tx_from.rs GitHub Actions / clippy[clippy] framework/base/src/types/interaction/tx_from.rs#L16
Raw output
Check failure on line 16 in framework/base/src/types/interaction/tx_from.rs GitHub Actions / Contracts (nightly) / Test Coverage
|
||
message = "Type `{Self}` cannot be used as a sender value (does not implement `TxFromSpecified<{Env}>`)", | ||
label = "sender needs to be explicit", | ||
note = "there are multiple ways to specify the sender value for a transaction, but `{Self}` is not one of them" | ||
)] | ||
pub trait TxFromSpecified<Env>: | ||
TxFrom<Env> + AnnotatedValue<Env, ManagedAddress<Env::Api>> | ||
where | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ use crate::{ | |
types::ManagedBuffer, | ||
}; | ||
|
||
/// All typed that populate the gas field of a transaction need to implement this trait. | ||
pub trait TxGas<Env> | ||
where | ||
Env: TxEnv, | ||
|
@@ -32,6 +33,11 @@ where | |
} | ||
} | ||
|
||
#[diagnostic::on_unimplemented( | ||
Check failure on line 36 in framework/base/src/types/interaction/tx_gas.rs GitHub Actions / Contracts (nightly) / Rust tests
Check failure on line 36 in framework/base/src/types/interaction/tx_gas.rs GitHub Actions / clippy[clippy] framework/base/src/types/interaction/tx_gas.rs#L36
Raw output
Check failure on line 36 in framework/base/src/types/interaction/tx_gas.rs GitHub Actions / clippy[clippy] framework/base/src/types/interaction/tx_gas.rs#L36
Raw output
Check failure on line 36 in framework/base/src/types/interaction/tx_gas.rs GitHub Actions / Contracts (nightly) / Test Coverage
|
||
message = "Type `{Self}` cannot be used as gas value (does not implement `TxGasValue<{Env}>`)", | ||
label = "not a valid value for gas", | ||
note = "there are multiple ways to specify the gas value for a transaction, but `{Self}` is not one of them" | ||
)] | ||
pub trait TxGasValue<Env>: AnnotatedValue<Env, u64> | ||
where | ||
Env: TxEnv, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,11 @@ use crate::{ | |
use super::{AnnotatedValue, FunctionCall, TxEnv, TxFrom, TxToSpecified}; | ||
|
||
/// Describes a payment that is part of a transaction. | ||
#[diagnostic::on_unimplemented( | ||
Check failure on line 27 in framework/base/src/types/interaction/tx_payment.rs GitHub Actions / Contracts (nightly) / Rust tests
Check failure on line 27 in framework/base/src/types/interaction/tx_payment.rs GitHub Actions / clippy[clippy] framework/base/src/types/interaction/tx_payment.rs#L27
Raw output
Check failure on line 27 in framework/base/src/types/interaction/tx_payment.rs GitHub Actions / clippy[clippy] framework/base/src/types/interaction/tx_payment.rs#L27
Raw output
Check failure on line 27 in framework/base/src/types/interaction/tx_payment.rs GitHub Actions / Contracts (nightly) / Test Coverage
|
||
message = "Type `{Self}` cannot be used as payment (does not implement `TxPayment<{Env}>`)", | ||
label = "not a valid payment type", | ||
note = "there are multiple ways to specify the transaction payment, but `{Self}` is not one of them" | ||
)] | ||
pub trait TxPayment<Env> | ||
where | ||
Env: TxEnv, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,11 @@ use crate::types::TxEnv; | |
/// Result handler list item. | ||
/// | ||
/// It acts as a result handler that produces a single result. | ||
#[diagnostic::on_unimplemented( | ||
Check failure on line 6 in framework/base/src/types/interaction/tx_result_handler_list/tx_result_handler_list_item.rs GitHub Actions / Contracts (nightly) / Rust tests
Check failure on line 6 in framework/base/src/types/interaction/tx_result_handler_list/tx_result_handler_list_item.rs GitHub Actions / clippy[clippy] framework/base/src/types/interaction/tx_result_handler_list/tx_result_handler_list_item.rs#L6
Raw output
Check failure on line 6 in framework/base/src/types/interaction/tx_result_handler_list/tx_result_handler_list_item.rs GitHub Actions / clippy[clippy] framework/base/src/types/interaction/tx_result_handler_list/tx_result_handler_list_item.rs#L6
Raw output
Check failure on line 6 in framework/base/src/types/interaction/tx_result_handler_list/tx_result_handler_list_item.rs GitHub Actions / Contracts (nightly) / Test Coverage
|
||
message = "Type `{Self}` cannot be used as a decoder result handler (does not implement `RHListItem<{Env}>`)", | ||
label = "not a valid decoder result handler", | ||
note = "there are multiple ways to specify the result handling, but `{Self}` is not one of them" | ||
)] | ||
pub trait RHListItem<Env, Original> | ||
where | ||
Env: TxEnv, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,12 @@ impl<Env> TxTo<Env> for () where Env: TxEnv {} | |
|
||
/// Marks the non-empty recipient of a transaction. | ||
/// | ||
/// Enforces the reciipent to be explicitly specified. | ||
/// Enforces the recipient to be explicitly specified. | ||
#[diagnostic::on_unimplemented( | ||
Check failure on line 17 in framework/base/src/types/interaction/tx_to.rs GitHub Actions / Contracts (nightly) / Rust tests
Check failure on line 17 in framework/base/src/types/interaction/tx_to.rs GitHub Actions / clippy[clippy] framework/base/src/types/interaction/tx_to.rs#L17
Raw output
Check failure on line 17 in framework/base/src/types/interaction/tx_to.rs GitHub Actions / clippy[clippy] framework/base/src/types/interaction/tx_to.rs#L17
Raw output
Check failure on line 17 in framework/base/src/types/interaction/tx_to.rs GitHub Actions / Contracts (nightly) / Test Coverage
|
||
message = "Type `{Self}` cannot be used as recipient value (does not implement `TxToSpecified<{Env}>`)", | ||
label = "recipient needs to be explicit", | ||
note = "there are multiple ways to specify the recipient value for a transaction, but `{Self}` is not one of them" | ||
)] | ||
pub trait TxToSpecified<Env>: TxTo<Env> + AnnotatedValue<Env, ManagedAddress<Env::Api>> | ||
where | ||
Env: TxEnv, | ||
|