Skip to content

Commit 33d9024

Browse files
gsstoykovtr11
authored andcommitted
feat: Introduce Schedule Transaction fee limits tests (hiero-ledger#1093)
Signed-off-by: gsstoykov <[email protected]> Signed-off-by: Tiago Requeijo <[email protected]>
1 parent dbb8f46 commit 33d9024

File tree

10 files changed

+322
-11
lines changed

10 files changed

+322
-11
lines changed

.github/workflows/flow-rust-ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ jobs:
114114
uses: hiero-ledger/hiero-solo-action@10ec96a107b8d2f5cd26b3e7ab47e65407b5c462 # v0.11.0
115115
with:
116116
installMirrorNode: true
117-
hieroVersion: v0.61.4
117+
hieroVersion: v0.65.0
118118

119119
- name: Create env file
120120
run: |

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ pub use contract::{
193193
ContractUpdateTransaction,
194194
DelegateContractId,
195195
};
196+
pub use custom_fee_limit::CustomFeeLimit;
196197
pub use custom_fixed_fee::CustomFixedFee;
197198
pub use entity_id::EntityId;
198199
pub(crate) use entity_id::ValidateChecksums;

tests/e2e/batch_transaction.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ use crate::common::{
2525
use crate::resources::BIG_CONTENTS;
2626

2727
#[tokio::test]
28+
#[ignore] // Due to NotSupported error from network
2829
async fn can_execute_batch_transaction() -> anyhow::Result<()> {
2930
let Some(TestEnvironment { config: _, client }) = setup_nonfree() else {
3031
return Ok(());
@@ -57,6 +58,7 @@ async fn can_execute_batch_transaction() -> anyhow::Result<()> {
5758
}
5859

5960
#[tokio::test]
61+
#[ignore] // Due to NotSupported error from network
6062
async fn can_execute_large_batch_transaction() -> anyhow::Result<()> {
6163
let Some(TestEnvironment { config: _, client }) = setup_nonfree() else {
6264
return Ok(());
@@ -229,6 +231,7 @@ async fn cannot_execute_batch_transaction_without_batchifying_inner() -> anyhow:
229231
}
230232

231233
#[tokio::test]
234+
#[ignore] // Due to NotSupported error from network
232235
async fn can_execute_batch_transaction_with_chunked_inner() -> anyhow::Result<()> {
233236
let Some(TestEnvironment { config: _, client }) = setup_nonfree() else {
234237
return Ok(());

tests/e2e/contract/bytecode.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ async fn query() -> anyhow::Result<()> {
3939

4040
let contract_id = ContractCreateTransaction::new()
4141
.admin_key(op.private_key.public_key())
42-
.gas(200000)
42+
.gas(2000000)
4343
.constructor_parameters(
4444
ContractFunctionParameters::new().add_string("Hello from Hedera.").to_bytes(None),
4545
)
@@ -101,7 +101,7 @@ async fn get_cost_big_max_query() -> anyhow::Result<()> {
101101

102102
let contract_id = ContractCreateTransaction::new()
103103
.admin_key(op.private_key.public_key())
104-
.gas(200000)
104+
.gas(2000000)
105105
.constructor_parameters(
106106
ContractFunctionParameters::new().add_string("Hello from Hedera.").to_bytes(None),
107107
)
@@ -166,7 +166,7 @@ async fn get_cost_small_max_query() -> anyhow::Result<()> {
166166

167167
let contract_id = ContractCreateTransaction::new()
168168
.admin_key(op.private_key.public_key())
169-
.gas(200000)
169+
.gas(2000000)
170170
.constructor_parameters(
171171
ContractFunctionParameters::new().add_string("Hello from Hedera.").to_bytes(None),
172172
)

tests/e2e/contract/create.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ async fn basic() -> anyhow::Result<()> {
2929

3030
let contract_id = ContractCreateTransaction::new()
3131
.admin_key(op.private_key.public_key())
32-
.gas(200_000)
32+
.gas(2000000)
3333
.constructor_parameters(
3434
ContractFunctionParameters::new().add_string("Hello from Hedera.").to_bytes(None),
3535
)
@@ -75,7 +75,7 @@ async fn no_admin_key() -> anyhow::Result<()> {
7575
let file_id = bytecode_file_id(&client, op.private_key.public_key()).await?;
7676

7777
let contract_id = ContractCreateTransaction::new()
78-
.gas(200_000)
78+
.gas(2000000)
7979
.constructor_parameters(
8080
ContractFunctionParameters::new().add_string("Hello from Hedera.").to_bytes(None),
8181
)

tests/e2e/contract/create_flow.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ async fn basic() -> anyhow::Result<()> {
2929
let contract_id = ContractCreateFlow::new()
3030
.bytecode_hex(SMART_CONTRACT_BYTECODE)?
3131
.admin_key(op.private_key.public_key())
32-
.gas(200_000)
32+
.gas(2000000)
3333
.constructor_parameters(
3434
ContractFunctionParameters::new().add_string("Hello from Hedera.").to_bytes(None),
3535
)
@@ -102,7 +102,7 @@ async fn admin_key() -> anyhow::Result<()> {
102102
let contract_id = ContractCreateFlow::new()
103103
.bytecode_hex(SMART_CONTRACT_BYTECODE)?
104104
.admin_key(admin_key.public_key())
105-
.gas(200_000)
105+
.gas(2000000)
106106
.constructor_parameters(
107107
ContractFunctionParameters::new().add_string("Hello from Hedera.").to_bytes(None),
108108
)
@@ -150,7 +150,7 @@ async fn admin_key_sign_with() -> anyhow::Result<()> {
150150
let contract_id = ContractCreateFlow::new()
151151
.bytecode_hex(SMART_CONTRACT_BYTECODE)?
152152
.admin_key(admin_key.public_key())
153-
.gas(200_000)
153+
.gas(2000000)
154154
.constructor_parameters(
155155
ContractFunctionParameters::new().add_string("Hello from Hedera.").to_bytes(None),
156156
)

tests/e2e/contract/nonce_info.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ async fn increment_nonce_through_contract_constructor() -> anyhow::Result<()> {
3535

3636
let response = ContractCreateTransaction::new()
3737
.admin_key(op.private_key.public_key())
38-
.gas(100000)
38+
.gas(1000000)
3939
.bytecode_file_id(file_id)
4040
.contract_memo("[e2e::ContractADeploysContractBInConstructor]")
4141
.execute(&client)

tests/e2e/token/airdrop.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ async fn invalid_body_fail() -> anyhow::Result<()> {
633633
assert_matches!(
634634
res,
635635
Err(hedera::Error::TransactionPreCheckStatus {
636-
status: Status::InvalidTransactionBody,
636+
status: Status::AirdropContainsMultipleSendersForAToken,
637637
..
638638
})
639639
);

tests/e2e/topic/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ mod delete;
1010
mod info;
1111
mod message;
1212
mod message_submit;
13+
mod revenue_schedule;
1314
mod update;
1415
// mod message;
1516
// mod message_submit;

0 commit comments

Comments
 (0)