Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace gas price with fee #156

Merged
merged 2 commits into from
Nov 16, 2022
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
8 changes: 4 additions & 4 deletions src/execution/as_abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ pub(crate) fn assembly_script_send_message(
validity_end_period: i64,
validity_end_thread: i32,
max_gas: i64,
gas_price: i64,
raw_fee: i64,
raw_coins: i64,
data: i32,
) -> ABIResult<()> {
Expand All @@ -511,8 +511,8 @@ pub(crate) fn assembly_script_send_message(
if max_gas.is_negative() {
abi_bail!("negative max gas");
}
if gas_price.is_negative() {
abi_bail!("negative gas price");
if raw_fee.is_negative() {
abi_bail!("negative raw_fee");
}
if raw_coins.is_negative() {
abi_bail!("negative coins")
Expand All @@ -524,7 +524,7 @@ pub(crate) fn assembly_script_send_message(
validity_start,
validity_end,
max_gas as u64,
gas_price as u64,
raw_fee as u64,
raw_coins as u64,
get_string(memory, data)?.as_bytes(),
) {
Expand Down
2 changes: 1 addition & 1 deletion src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl Interface for TestInterface {
_validity_start: (u64, u8),
_validity_end: (u64, u8),
_max_gas: u64,
_gas_price: u64,
_raw_fee: u64,
_coins: u64,
_data: &[u8],
) -> Result<()> {
Expand Down
4 changes: 2 additions & 2 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ pub trait Interface: Send + Sync + InterfaceClone {
/// * `validity_start` - Tuple containing the period and thread of the validity start slot
/// * `validity_end` - Tuple containing the period and thread of the validity end slot
/// * `max_gas` - Maximum gas for the message execution
/// * `gas_price` - Price of one gas unit
/// * `raw_fee` - Fee to be paid for message execution
/// * `coins` - Coins of the sender
/// * `data` - Message data
///
Expand All @@ -240,7 +240,7 @@ pub trait Interface: Send + Sync + InterfaceClone {
validity_start: (u64, u8),
validity_end: (u64, u8),
max_gas: u64,
gas_price: u64,
raw_fee: u64,
raw_coins: u64,
data: &[u8],
) -> Result<()> {
Expand Down