pub struct DataReceiptCreationConfigView {
pub base_cost: Fee,
pub cost_per_byte: Fee,
}Expand description
DataReceiptCreationConfigView
JSON schema
{
"type": "object",
"required": [
"base_cost",
"cost_per_byte"
],
"properties": {
"base_cost": {
"description": "Base cost of creating a data receipt.\n Both `send` and `exec` costs are burned when a new receipt has input dependencies. The gas\n is charged for each input dependency. The dependencies are specified when a receipt is\n created using `promise_then` and `promise_batch_then`.\n NOTE: Any receipt with output dependencies will produce data receipts. Even if it fails.\n Even if the last action is not a function call (in case of success it will return empty\n value).",
"allOf": [
{
"$ref": "#/components/schemas/Fee"
}
]
},
"cost_per_byte": {
"description": "Additional cost per byte sent.\n Both `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: FeeBase 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: FeeAdditional 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§const fn clone_from(&mut self, source: &Self)
const 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<DataReceiptCreationConfigView, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DataReceiptCreationConfigView, <__D as Deserializer<'de>>::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) -> DataReceiptCreationConfigView
fn from(value: &DataReceiptCreationConfigView) -> DataReceiptCreationConfigView
Converts to this type from the input type.
Source§impl Serialize for DataReceiptCreationConfigView
impl Serialize for DataReceiptCreationConfigView
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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