-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1649 from multiversx/llr-unified
unified llr
- Loading branch information
Showing
5 changed files
with
233 additions
and
61 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
contracts/benchmarks/mappers/linked-list-repeat/sc-config.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[[proxy]] | ||
path = "src/linked_list_repeat_proxy.rs" | ||
[[proxy.path-rename]] | ||
from = "benchmark_common::example_struct" | ||
to = "benchmark_common" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
166 changes: 166 additions & 0 deletions
166
contracts/benchmarks/mappers/linked-list-repeat/src/linked_list_repeat_proxy.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
// Code generated by the multiversx-sc proxy generator. DO NOT EDIT. | ||
|
||
//////////////////////////////////////////////////// | ||
////////////////// AUTO-GENERATED ////////////////// | ||
//////////////////////////////////////////////////// | ||
|
||
#![allow(dead_code)] | ||
#![allow(clippy::all)] | ||
|
||
use multiversx_sc::proxy_imports::*; | ||
|
||
pub struct LinkedListRepeatProxy; | ||
|
||
impl<Env, From, To, Gas> TxProxyTrait<Env, From, To, Gas> for LinkedListRepeatProxy | ||
where | ||
Env: TxEnv, | ||
From: TxFrom<Env>, | ||
To: TxTo<Env>, | ||
Gas: TxGas<Env>, | ||
{ | ||
type TxProxyMethods = LinkedListRepeatProxyMethods<Env, From, To, Gas>; | ||
|
||
fn proxy_methods(self, tx: Tx<Env, From, To, (), Gas, (), ()>) -> Self::TxProxyMethods { | ||
LinkedListRepeatProxyMethods { wrapped_tx: tx } | ||
} | ||
} | ||
|
||
pub struct LinkedListRepeatProxyMethods<Env, From, To, Gas> | ||
where | ||
Env: TxEnv, | ||
From: TxFrom<Env>, | ||
To: TxTo<Env>, | ||
Gas: TxGas<Env>, | ||
{ | ||
wrapped_tx: Tx<Env, From, To, (), Gas, (), ()>, | ||
} | ||
|
||
#[rustfmt::skip] | ||
impl<Env, From, Gas> LinkedListRepeatProxyMethods<Env, From, (), Gas> | ||
where | ||
Env: TxEnv, | ||
Env::Api: VMApi, | ||
From: TxFrom<Env>, | ||
Gas: TxGas<Env>, | ||
{ | ||
pub fn init( | ||
self, | ||
) -> TxTypedDeploy<Env, From, NotPayable, Gas, ()> { | ||
self.wrapped_tx | ||
.payment(NotPayable) | ||
.raw_deploy() | ||
.original_result() | ||
} | ||
} | ||
|
||
#[rustfmt::skip] | ||
impl<Env, From, To, Gas> LinkedListRepeatProxyMethods<Env, From, To, Gas> | ||
where | ||
Env: TxEnv, | ||
Env::Api: VMApi, | ||
From: TxFrom<Env>, | ||
To: TxTo<Env>, | ||
Gas: TxGas<Env>, | ||
{ | ||
pub fn add< | ||
Arg0: ProxyArg<usize>, | ||
Arg1: ProxyArg<ManagedBuffer<Env::Api>>, | ||
>( | ||
self, | ||
num_repeats: Arg0, | ||
value: Arg1, | ||
) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()> { | ||
self.wrapped_tx | ||
.payment(NotPayable) | ||
.raw_call("add") | ||
.argument(&num_repeats) | ||
.argument(&value) | ||
.original_result() | ||
} | ||
|
||
pub fn count< | ||
Arg0: ProxyArg<ManagedBuffer<Env::Api>>, | ||
>( | ||
self, | ||
value: Arg0, | ||
) -> TxTypedCall<Env, From, To, NotPayable, Gas, usize> { | ||
self.wrapped_tx | ||
.payment(NotPayable) | ||
.raw_call("count") | ||
.argument(&value) | ||
.original_result() | ||
} | ||
|
||
pub fn remove< | ||
Arg0: ProxyArg<usize>, | ||
>( | ||
self, | ||
num_repeats: Arg0, | ||
) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()> { | ||
self.wrapped_tx | ||
.payment(NotPayable) | ||
.raw_call("remove") | ||
.argument(&num_repeats) | ||
.original_result() | ||
} | ||
|
||
pub fn bench( | ||
self, | ||
) -> TxTypedCall<Env, From, To, NotPayable, Gas, MultiValueEncoded<Env::Api, ManagedBuffer<Env::Api>>> { | ||
self.wrapped_tx | ||
.payment(NotPayable) | ||
.raw_call("bench") | ||
.original_result() | ||
} | ||
|
||
pub fn add_struct< | ||
Arg0: ProxyArg<usize>, | ||
Arg1: ProxyArg<benchmark_common::ExampleStruct<Env::Api>>, | ||
>( | ||
self, | ||
num_repeats: Arg0, | ||
value: Arg1, | ||
) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()> { | ||
self.wrapped_tx | ||
.payment(NotPayable) | ||
.raw_call("add_struct") | ||
.argument(&num_repeats) | ||
.argument(&value) | ||
.original_result() | ||
} | ||
|
||
pub fn count_struct< | ||
Arg0: ProxyArg<benchmark_common::ExampleStruct<Env::Api>>, | ||
>( | ||
self, | ||
value: Arg0, | ||
) -> TxTypedCall<Env, From, To, NotPayable, Gas, usize> { | ||
self.wrapped_tx | ||
.payment(NotPayable) | ||
.raw_call("count_struct") | ||
.argument(&value) | ||
.original_result() | ||
} | ||
|
||
pub fn remove_struct< | ||
Arg0: ProxyArg<usize>, | ||
>( | ||
self, | ||
num_repeats: Arg0, | ||
) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()> { | ||
self.wrapped_tx | ||
.payment(NotPayable) | ||
.raw_call("remove_struct") | ||
.argument(&num_repeats) | ||
.original_result() | ||
} | ||
|
||
pub fn bench_struct( | ||
self, | ||
) -> TxTypedCall<Env, From, To, NotPayable, Gas, MultiValueEncoded<Env::Api, benchmark_common::ExampleStruct<Env::Api>>> { | ||
self.wrapped_tx | ||
.payment(NotPayable) | ||
.raw_call("bench_struct") | ||
.original_result() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters