-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
proxy test first new proxy and migration to unified
- Loading branch information
1 parent
c4ae976
commit ccaa7ab
Showing
3 changed files
with
251 additions
and
50 deletions.
There are no files selected for viewing
107 changes: 107 additions & 0 deletions
107
contracts/feature-tests/composability/proxy-test-first/src/message_me_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,107 @@ | ||
// 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 MessageMeProxy; | ||
|
||
impl<Env, From, To, Gas> TxProxyTrait<Env, From, To, Gas> for MessageMeProxy | ||
where | ||
Env: TxEnv, | ||
From: TxFrom<Env>, | ||
To: TxTo<Env>, | ||
Gas: TxGas<Env>, | ||
{ | ||
type TxProxyMethods = MessageMeProxyMethods<Env, From, To, Gas>; | ||
|
||
fn proxy_methods(self, tx: Tx<Env, From, To, (), Gas, (), ()>) -> Self::TxProxyMethods { | ||
MessageMeProxyMethods { wrapped_tx: tx } | ||
} | ||
} | ||
|
||
pub struct MessageMeProxyMethods<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> MessageMeProxyMethods<Env, From, (), Gas> | ||
where | ||
Env: TxEnv, | ||
Env::Api: VMApi, | ||
From: TxFrom<Env>, | ||
Gas: TxGas<Env>, | ||
{ | ||
pub fn init< | ||
Arg0: CodecInto<i32>, | ||
>( | ||
self, | ||
init_arg: Arg0, | ||
) -> TxProxyDeploy<Env, From, Gas, i32> { | ||
self.wrapped_tx | ||
.raw_deploy() | ||
.argument(&init_arg) | ||
.original_result() | ||
} | ||
} | ||
|
||
#[rustfmt::skip] | ||
impl<Env, From, To, Gas> MessageMeProxyMethods<Env, From, To, Gas> | ||
where | ||
Env: TxEnv, | ||
Env::Api: VMApi, | ||
From: TxFrom<Env>, | ||
To: TxTo<Env>, | ||
Gas: TxGas<Env>, | ||
{ | ||
pub fn upgrade( | ||
self, | ||
) -> TxProxyUpgrade<Env, From, To, Gas, ()> { | ||
self.wrapped_tx | ||
.raw_upgrade() | ||
.original_result() | ||
} | ||
} | ||
|
||
#[rustfmt::skip] | ||
impl<Env, From, To, Gas> MessageMeProxyMethods<Env, From, To, Gas> | ||
where | ||
Env: TxEnv, | ||
Env::Api: VMApi, | ||
From: TxFrom<Env>, | ||
To: TxTo<Env>, | ||
Gas: TxGas<Env>, | ||
{ | ||
pub fn message_me< | ||
Arg0: CodecInto<i64>, | ||
Arg1: CodecInto<BigUint<Env::Api>>, | ||
Arg2: CodecInto<Vec<u8>>, | ||
Arg3: CodecInto<ManagedAddress<Env::Api>>, | ||
>( | ||
self, | ||
arg1: Arg0, | ||
arg2: Arg1, | ||
arg3: Arg2, | ||
arg4: Arg3, | ||
) -> TxProxyCall<Env, From, To, Gas, ()> { | ||
self.wrapped_tx | ||
.raw_call() | ||
.function_name("messageMe") | ||
.argument(&arg1) | ||
.argument(&arg2) | ||
.argument(&arg3) | ||
.argument(&arg4) | ||
.original_result() | ||
} | ||
} |
107 changes: 107 additions & 0 deletions
107
contracts/feature-tests/composability/proxy-test-first/src/pay_me_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,107 @@ | ||
// 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 PayMeProxy; | ||
|
||
impl<Env, From, To, Gas> TxProxyTrait<Env, From, To, Gas> for PayMeProxy | ||
where | ||
Env: TxEnv, | ||
From: TxFrom<Env>, | ||
To: TxTo<Env>, | ||
Gas: TxGas<Env>, | ||
{ | ||
type TxProxyMethods = PayMeProxyMethods<Env, From, To, Gas>; | ||
|
||
fn proxy_methods(self, tx: Tx<Env, From, To, (), Gas, (), ()>) -> Self::TxProxyMethods { | ||
PayMeProxyMethods { wrapped_tx: tx } | ||
} | ||
} | ||
|
||
pub struct PayMeProxyMethods<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> PayMeProxyMethods<Env, From, (), Gas> | ||
where | ||
Env: TxEnv, | ||
Env::Api: VMApi, | ||
From: TxFrom<Env>, | ||
Gas: TxGas<Env>, | ||
{ | ||
pub fn init( | ||
self, | ||
) -> TxProxyDeploy<Env, From, Gas, ()> { | ||
self.wrapped_tx | ||
.raw_deploy() | ||
.original_result() | ||
} | ||
} | ||
|
||
#[rustfmt::skip] | ||
impl<Env, From, To, Gas> PayMeProxyMethods<Env, From, To, Gas> | ||
where | ||
Env: TxEnv, | ||
Env::Api: VMApi, | ||
From: TxFrom<Env>, | ||
To: TxTo<Env>, | ||
Gas: TxGas<Env>, | ||
{ | ||
pub fn upgrade( | ||
self, | ||
) -> TxProxyUpgrade<Env, From, To, Gas, ()> { | ||
self.wrapped_tx | ||
.raw_upgrade() | ||
.original_result() | ||
} | ||
} | ||
|
||
#[rustfmt::skip] | ||
impl<Env, From, To, Gas> PayMeProxyMethods<Env, From, To, Gas> | ||
where | ||
Env: TxEnv, | ||
Env::Api: VMApi, | ||
From: TxFrom<Env>, | ||
To: TxTo<Env>, | ||
Gas: TxGas<Env>, | ||
{ | ||
pub fn pay_me< | ||
Arg0: CodecInto<i64>, | ||
>( | ||
self, | ||
arg1: Arg0, | ||
) -> TxProxyCall<Env, From, To, Gas, ()> { | ||
self.wrapped_tx | ||
.raw_call() | ||
.function_name("payMe") | ||
.argument(&arg1) | ||
.original_result() | ||
} | ||
|
||
pub fn pay_me_with_result< | ||
Arg0: CodecInto<i64>, | ||
>( | ||
self, | ||
arg1: Arg0, | ||
) -> TxProxyCall<Env, From, To, Gas, ()> { | ||
self.wrapped_tx | ||
.raw_call() | ||
.function_name("payMeWithResult") | ||
.argument(&arg1) | ||
.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