pub trait Message {
Show 15 methods
// Required methods
fn from(&self) -> Address;
fn to(&self) -> Address;
fn sequence(&self) -> u64;
fn value(&self) -> TokenAmount;
fn method_num(&self) -> u64;
fn params(&self) -> &RawBytes;
fn set_gas_limit(&mut self, amount: u64);
fn set_sequence(&mut self, sequence: u64);
fn gas_limit(&self) -> u64;
fn required_funds(&self) -> TokenAmount;
fn gas_fee_cap(&self) -> TokenAmount;
fn gas_premium(&self) -> TokenAmount;
fn set_gas_fee_cap(&mut self, cap: TokenAmount);
fn set_gas_premium(&mut self, prem: TokenAmount);
// Provided method
fn effective_gas_premium(&self, base_fee: &TokenAmount) -> TokenAmount { ... }
}Expand description
Message interface to interact with Signed and unsigned messages in a generic context.
Required Methods§
Sourcefn value(&self) -> TokenAmount
fn value(&self) -> TokenAmount
Returns the amount sent in message.
Sourcefn method_num(&self) -> u64
fn method_num(&self) -> u64
Returns the method number to be called.
Sourcefn set_gas_limit(&mut self, amount: u64)
fn set_gas_limit(&mut self, amount: u64)
sets the gas limit for the message.
Sourcefn set_sequence(&mut self, sequence: u64)
fn set_sequence(&mut self, sequence: u64)
sets a new sequence to the message.
Sourcefn required_funds(&self) -> TokenAmount
fn required_funds(&self) -> TokenAmount
Returns the required funds for the message.
Sourcefn gas_fee_cap(&self) -> TokenAmount
fn gas_fee_cap(&self) -> TokenAmount
gets gas fee cap for the message.
gets gas premium for the message.
Sourcefn set_gas_fee_cap(&mut self, cap: TokenAmount)
fn set_gas_fee_cap(&mut self, cap: TokenAmount)
sets the gas fee cap.
sets the gas premium.
Provided Methods§
This method returns the effective gas premium claimable by the miner
given the supplied base fee. This method is not used anywhere except the Eth API.
Filecoin clamps the gas premium at gas_fee_cap - base_fee, if lower than the
specified premium. Returns 0 if gas_fee_cap is less than base_fee.