pub struct DataReceiptCreationConfigView {
pub base_cost: Fee,
pub cost_per_byte: Fee,
}
Expand description
The fees settings for a data receipt creation
JSON schema
{
"description": "The fees settings for a data receipt creation",
"type": "object",
"required": [
"base_cost",
"cost_per_byte"
],
"properties": {
"base_cost": {
"description": "Base cost of creating a data receipt.\nBoth `send` and `exec` costs are burned when a new receipt has input dependencies. The gas\nis charged for each input dependency. The dependencies are specified when a receipt is\ncreated using `promise_then` and `promise_batch_then`.\nNOTE: Any receipt with output dependencies will produce data receipts. Even if it fails.\nEven if the last action is not a function call (in case of success it will return empty\nvalue).",
"allOf": [
{
"$ref": "#/components/schemas/Fee"
}
]
},
"cost_per_byte": {
"description": "Additional cost per byte sent.\nBoth `send` and `exec` costs are burned when a function call finishes execution and returns\n`N` bytes of data to every output dependency. For each output dependency the cost is\n`(send(sir) + exec()) * N`.",
"allOf": [
{
"$ref": "#/components/schemas/Fee"
}
]
}
}
}
Fields§
§base_cost: Fee
Base cost of creating a data receipt.
Both send
and exec
costs are burned when a new receipt has input dependencies. The gas
is charged for each input dependency. The dependencies are specified when a receipt is
created using promise_then
and promise_batch_then
.
NOTE: Any receipt with output dependencies will produce data receipts. Even if it fails.
Even if the last action is not a function call (in case of success it will return empty
value).
cost_per_byte: Fee
Additional cost per byte sent.
Both send
and exec
costs are burned when a function call finishes execution and returns
N
bytes of data to every output dependency. For each output dependency the cost is
(send(sir) + exec()) * N
.
Trait Implementations§
Source§impl Clone for DataReceiptCreationConfigView
impl Clone for DataReceiptCreationConfigView
Source§fn clone(&self) -> DataReceiptCreationConfigView
fn clone(&self) -> DataReceiptCreationConfigView
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'de> Deserialize<'de> for DataReceiptCreationConfigView
impl<'de> Deserialize<'de> for DataReceiptCreationConfigView
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&DataReceiptCreationConfigView> for DataReceiptCreationConfigView
impl From<&DataReceiptCreationConfigView> for DataReceiptCreationConfigView
Source§fn from(value: &DataReceiptCreationConfigView) -> Self
fn from(value: &DataReceiptCreationConfigView) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DataReceiptCreationConfigView
impl RefUnwindSafe for DataReceiptCreationConfigView
impl Send for DataReceiptCreationConfigView
impl Sync for DataReceiptCreationConfigView
impl Unpin for DataReceiptCreationConfigView
impl UnwindSafe for DataReceiptCreationConfigView
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more