-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Andrei Vasilescu <[email protected]>
- Loading branch information
1 parent
c4bf367
commit 88a84e3
Showing
11 changed files
with
549 additions
and
13 deletions.
There are no files selected for viewing
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
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
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 |
---|---|---|
|
@@ -2,3 +2,7 @@ | |
|
||
[[proxy]] | ||
path = "src/returns_token_identifier_test_proxy.rs" | ||
|
||
[[proxy]] | ||
path = "interactor/src/proxy.rs" | ||
|
166 changes: 166 additions & 0 deletions
166
...acts/examples/token-identifier-test/returns-token-identifier-test/src/proxy_proxy_test.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 ProxyTestProxy; | ||
|
||
impl<Env, From, To, Gas> TxProxyTrait<Env, From, To, Gas> for ProxyTestProxy | ||
where | ||
Env: TxEnv, | ||
From: TxFrom<Env>, | ||
To: TxTo<Env>, | ||
Gas: TxGas<Env>, | ||
{ | ||
type TxProxyMethods = ProxyTestProxyMethods<Env, From, To, Gas>; | ||
|
||
fn proxy_methods(self, tx: Tx<Env, From, To, (), Gas, (), ()>) -> Self::TxProxyMethods { | ||
ProxyTestProxyMethods { wrapped_tx: tx } | ||
} | ||
} | ||
|
||
pub struct ProxyTestProxyMethods<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> ProxyTestProxyMethods<Env, From, (), Gas> | ||
where | ||
Env: TxEnv, | ||
Env::Api: VMApi, | ||
From: TxFrom<Env>, | ||
Gas: TxGas<Env>, | ||
{ | ||
pub fn init< | ||
Arg0: ProxyArg<BigUint<Env::Api>>, | ||
>( | ||
self, | ||
initial_value: Arg0, | ||
) -> TxTypedDeploy<Env, From, NotPayable, Gas, ()> { | ||
self.wrapped_tx | ||
.payment(NotPayable) | ||
.raw_deploy() | ||
.argument(&initial_value) | ||
.original_result() | ||
} | ||
} | ||
|
||
#[rustfmt::skip] | ||
impl<Env, From, To, Gas> ProxyTestProxyMethods<Env, From, To, Gas> | ||
where | ||
Env: TxEnv, | ||
Env::Api: VMApi, | ||
From: TxFrom<Env>, | ||
To: TxTo<Env>, | ||
Gas: TxGas<Env>, | ||
{ | ||
pub fn upgrade< | ||
Arg0: ProxyArg<BigUint<Env::Api>>, | ||
>( | ||
self, | ||
initial_value: Arg0, | ||
) -> TxTypedUpgrade<Env, From, To, NotPayable, Gas, ()> { | ||
self.wrapped_tx | ||
.payment(NotPayable) | ||
.raw_upgrade() | ||
.argument(&initial_value) | ||
.original_result() | ||
} | ||
} | ||
|
||
#[rustfmt::skip] | ||
impl<Env, From, To, Gas> ProxyTestProxyMethods<Env, From, To, Gas> | ||
where | ||
Env: TxEnv, | ||
Env::Api: VMApi, | ||
From: TxFrom<Env>, | ||
To: TxTo<Env>, | ||
Gas: TxGas<Env>, | ||
{ | ||
pub fn last_issued_token( | ||
self, | ||
) -> TxTypedCall<Env, From, To, NotPayable, Gas, TokenIdentifier<Env::Api>> { | ||
self.wrapped_tx | ||
.payment(NotPayable) | ||
.raw_call("lastIssuedToken") | ||
.original_result() | ||
} | ||
|
||
pub fn last_error_message( | ||
self, | ||
) -> TxTypedCall<Env, From, To, NotPayable, Gas, ManagedBuffer<Env::Api>> { | ||
self.wrapped_tx | ||
.payment(NotPayable) | ||
.raw_call("lastErrorMessage") | ||
.original_result() | ||
} | ||
|
||
pub fn sum( | ||
self, | ||
) -> TxTypedCall<Env, From, To, NotPayable, Gas, BigUint<Env::Api>> { | ||
self.wrapped_tx | ||
.payment(NotPayable) | ||
.raw_call("getSum") | ||
.original_result() | ||
} | ||
|
||
/// Add desired amount to the storage variable. | ||
pub fn add< | ||
Arg0: ProxyArg<BigUint<Env::Api>>, | ||
>( | ||
self, | ||
value: Arg0, | ||
) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()> { | ||
self.wrapped_tx | ||
.payment(NotPayable) | ||
.raw_call("add") | ||
.argument(&value) | ||
.original_result() | ||
} | ||
|
||
pub fn issue_fungible_token< | ||
Arg0: ProxyArg<ManagedBuffer<Env::Api>>, | ||
Arg1: ProxyArg<ManagedBuffer<Env::Api>>, | ||
Arg2: ProxyArg<BigUint<Env::Api>>, | ||
>( | ||
self, | ||
token_display_name: Arg0, | ||
token_ticker: Arg1, | ||
initial_supply: Arg2, | ||
) -> TxTypedCall<Env, From, To, (), Gas, ()> { | ||
self.wrapped_tx | ||
.raw_call("issue_fungible_token") | ||
.argument(&token_display_name) | ||
.argument(&token_ticker) | ||
.argument(&initial_supply) | ||
.original_result() | ||
} | ||
|
||
pub fn send_egld< | ||
Arg0: ProxyArg<ManagedAddress<Env::Api>>, | ||
Arg1: ProxyArg<BigUint<Env::Api>>, | ||
>( | ||
self, | ||
to: Arg0, | ||
amount: Arg1, | ||
) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()> { | ||
self.wrapped_tx | ||
.payment(NotPayable) | ||
.raw_call("send_egld") | ||
.argument(&to) | ||
.argument(&amount) | ||
.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
Oops, something went wrong.