Skip to content

Composable tasks to perform complex actions #54

Composable tasks to perform complex actions

Composable tasks to perform complex actions #54

Triggered via pull request October 4, 2023 06:22
Status Failure
Total duration 5m 32s
Artifacts
This run and associated checks have been archived and are scheduled for deletion. Learn more about checks retention
Fit to window
Zoom out
Zoom in

Annotations

1 error and 12 warnings
build / build
Process completed with exit code 1.
[clippy] contracts/proxy-actions/src/structs.rs#L51: contracts/proxy-actions/src/structs.rs#L51
warning: unused variable: `payment_to_next_task` --> contracts/proxy-actions/src/structs.rs:51:17 | 51 | let payment_to_next_task = self | ^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_payment_to_next_task` | = note: `#[warn(unused_variables)]` on by default
[clippy] contracts/proxy-actions/src/structs.rs#L77: contracts/proxy-actions/src/structs.rs#L77
warning: unused variable: `payment_to_next_task` --> contracts/proxy-actions/src/structs.rs:77:17 | 77 | let payment_to_next_task = match task_type { | ^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_payment_to_next_task`
[clippy] contracts/proxy-actions/src/structs.rs#L46: contracts/proxy-actions/src/structs.rs#L46
warning: redundant clone --> contracts/proxy-actions/src/structs.rs:46:43 | 46 | let payment_to_next_task = payment.clone(); | ^^^^^^^^ help: remove this | note: this value is dropped without further use --> contracts/proxy-actions/src/structs.rs:46:36 | 46 | let payment_to_next_task = payment.clone(); | ^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone = note: `#[warn(clippy::redundant_clone)]` on by default
[clippy] contracts/proxy-actions/src/structs.rs#L51: contracts/proxy-actions/src/structs.rs#L51
warning: this let-binding has unit value --> contracts/proxy-actions/src/structs.rs:51:13 | 51 | / let payment_to_next_task = self 52 | | .send() 53 | | .contract_call::<EsdtTokenPayment>(dest_addr, endpoint_name) 54 | | .with_egld_or_single_esdt_transfer(payment_to_next_task.clone()) 55 | | .with_raw_arguments(endpoint_args.to_arg_buffer()) 56 | | .with_gas_limit(gas_limit) 57 | | .transfer_execute(); | |____________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value = note: `#[warn(clippy::let_unit_value)]` on by default help: omit the `let` binding | 51 ~ self 52 + .send() 53 + .contract_call::<EsdtTokenPayment>(dest_addr, endpoint_name) 54 + .with_egld_or_single_esdt_transfer(payment_to_next_task.clone()) 55 + .with_raw_arguments(endpoint_args.to_arg_buffer()) 56 + .with_gas_limit(gas_limit) 57 + .transfer_execute(); |
[clippy] contracts/proxy-actions/src/structs.rs#L72: contracts/proxy-actions/src/structs.rs#L72
warning: redundant clone --> contracts/proxy-actions/src/structs.rs:72:43 | 72 | let payment_to_next_task = payment.clone(); | ^^^^^^^^ help: remove this | note: this value is dropped without further use --> contracts/proxy-actions/src/structs.rs:72:36 | 72 | let payment_to_next_task = payment.clone(); | ^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
[clippy] contracts/proxy-actions/src/structs.rs#L77: contracts/proxy-actions/src/structs.rs#L77
warning: this let-binding has unit value --> contracts/proxy-actions/src/structs.rs:77:13 | 77 | / let payment_to_next_task = match task_type { 78 | | TaskType::WrapEGLD => { 79 | | //TODO 80 | | } ... | 117 | | } 118 | | }; | |______________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value help: omit the `let` binding | 77 ~ match task_type { 78 + TaskType::WrapEGLD => { 79 + //TODO 80 + } 81 + TaskType::UnwrapEgld => { 82 + //TODO 83 + } 84 + TaskType::Swap => { 85 + let args = endpoint_args.into_vec_of_buffers(); 86 + let token_out = TokenIdentifier::from(args.get(0).clone_value()); 87 + let min_amount_out = BigUint::from(args.get(1).clone_value()); 88 + let token_payment = payment_to_next_task 89 + .token_identifier 90 + .clone() 91 + .into_esdt_option(); 92 + if token_payment.is_none() { 93 + return; 94 + } 95 + self.pair_contract_proxy(dest_addr) 96 + .swap_tokens_fixed_input(token_out, min_amount_out) 97 + .with_esdt_transfer(EsdtTokenPayment::new( 98 + token_payment.unwrap(), 99 + payment_to_next_task.token_nonce, 100 + payment_to_next_task.amount.clone(), 101 + )) 102 + .with_gas_limit(gas_limit) 103 + .transfer_execute(); 104 + } 105 + TaskType::SendEsdt => { 106 + self.send() 107 + .contract_call::<EsdtTokenPayment>(dest_addr, b"".into()) 108 + .with_egld_or_single_esdt_transfer(payment_to_next_task.clone()) 109 + .with_gas_limit(gas_limit) 110 + .transfer_execute(); 111 + } 112 + TaskType::ExitLP => { 113 + //TODO 114 + } 115 + TaskType::None => { 116 + // return Ok(()) 117 + } 118 + }; |
[clippy] contracts/proxy-actions/src/structs.rs#L51: contracts/proxy-actions/src/structs.rs#L51
warning: unused variable: `payment_to_next_task` --> contracts/proxy-actions/src/structs.rs:51:17 | 51 | let payment_to_next_task = self | ^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_payment_to_next_task` | = note: `#[warn(unused_variables)]` on by default
[clippy] contracts/proxy-actions/src/structs.rs#L77: contracts/proxy-actions/src/structs.rs#L77
warning: unused variable: `payment_to_next_task` --> contracts/proxy-actions/src/structs.rs:77:17 | 77 | let payment_to_next_task = match task_type { | ^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_payment_to_next_task`
[clippy] contracts/proxy-actions/src/structs.rs#L46: contracts/proxy-actions/src/structs.rs#L46
warning: redundant clone --> contracts/proxy-actions/src/structs.rs:46:43 | 46 | let payment_to_next_task = payment.clone(); | ^^^^^^^^ help: remove this | note: this value is dropped without further use --> contracts/proxy-actions/src/structs.rs:46:36 | 46 | let payment_to_next_task = payment.clone(); | ^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone = note: `#[warn(clippy::redundant_clone)]` on by default
[clippy] contracts/proxy-actions/src/structs.rs#L51: contracts/proxy-actions/src/structs.rs#L51
warning: this let-binding has unit value --> contracts/proxy-actions/src/structs.rs:51:13 | 51 | / let payment_to_next_task = self 52 | | .send() 53 | | .contract_call::<EsdtTokenPayment>(dest_addr, endpoint_name) 54 | | .with_egld_or_single_esdt_transfer(payment_to_next_task.clone()) 55 | | .with_raw_arguments(endpoint_args.to_arg_buffer()) 56 | | .with_gas_limit(gas_limit) 57 | | .transfer_execute(); | |____________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value = note: `#[warn(clippy::let_unit_value)]` on by default help: omit the `let` binding | 51 ~ self 52 + .send() 53 + .contract_call::<EsdtTokenPayment>(dest_addr, endpoint_name) 54 + .with_egld_or_single_esdt_transfer(payment_to_next_task.clone()) 55 + .with_raw_arguments(endpoint_args.to_arg_buffer()) 56 + .with_gas_limit(gas_limit) 57 + .transfer_execute(); |
[clippy] contracts/proxy-actions/src/structs.rs#L72: contracts/proxy-actions/src/structs.rs#L72
warning: redundant clone --> contracts/proxy-actions/src/structs.rs:72:43 | 72 | let payment_to_next_task = payment.clone(); | ^^^^^^^^ help: remove this | note: this value is dropped without further use --> contracts/proxy-actions/src/structs.rs:72:36 | 72 | let payment_to_next_task = payment.clone(); | ^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
[clippy] contracts/proxy-actions/src/structs.rs#L77: contracts/proxy-actions/src/structs.rs#L77
warning: this let-binding has unit value --> contracts/proxy-actions/src/structs.rs:77:13 | 77 | / let payment_to_next_task = match task_type { 78 | | TaskType::WrapEGLD => { 79 | | //TODO 80 | | } ... | 117 | | } 118 | | }; | |______________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value help: omit the `let` binding | 77 ~ match task_type { 78 + TaskType::WrapEGLD => { 79 + //TODO 80 + } 81 + TaskType::UnwrapEgld => { 82 + //TODO 83 + } 84 + TaskType::Swap => { 85 + let args = endpoint_args.into_vec_of_buffers(); 86 + let token_out = TokenIdentifier::from(args.get(0).clone_value()); 87 + let min_amount_out = BigUint::from(args.get(1).clone_value()); 88 + let token_payment = payment_to_next_task 89 + .token_identifier 90 + .clone() 91 + .into_esdt_option(); 92 + if token_payment.is_none() { 93 + return; 94 + } 95 + self.pair_contract_proxy(dest_addr) 96 + .swap_tokens_fixed_input(token_out, min_amount_out) 97 + .with_esdt_transfer(EsdtTokenPayment::new( 98 + token_payment.unwrap(), 99 + payment_to_next_task.token_nonce, 100 + payment_to_next_task.amount.clone(), 101 + )) 102 + .with_gas_limit(gas_limit) 103 + .transfer_execute(); 104 + } 105 + TaskType::SendEsdt => { 106 + self.send() 107 + .contract_call::<EsdtTokenPayment>(dest_addr, b"".into()) 108 + .with_egld_or_single_esdt_transfer(payment_to_next_task.clone()) 109 + .with_gas_limit(gas_limit) 110 + .transfer_execute(); 111 + } 112 + TaskType::ExitLP => { 113 + //TODO 114 + } 115 + TaskType::None => { 116 + // return Ok(()) 117 + } 118 + }; |