generated from multiversx/mx-template-sc
-
Notifications
You must be signed in to change notification settings - Fork 2
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 #178 from multiversx/feat/enshrine-esdt
`feat/enshrine` merge into `feat/beta`
- Loading branch information
Showing
90 changed files
with
7,646 additions
and
1,735 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[settings] | ||
main = "main" | ||
|
||
[contracts.main] | ||
name = "chain-factory" | ||
|
||
[contracts.full] | ||
name = "chain-factory-full" | ||
add-unlabelled = true | ||
add-labels = ["chain-factory-external-view"] | ||
|
||
[contracts.view] | ||
name = "chain-factory-view" | ||
external-view = true | ||
add-unlabelled = false | ||
add-labels = ["chain-factory-external-view"] | ||
|
||
[[proxy]] | ||
path = "src/chain_factory_proxy.rs" | ||
|
||
[[proxy]] | ||
path = "../token-handler/src/chain_factory_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,204 @@ | ||
// 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 ChainFactoryContractProxy; | ||
|
||
impl<Env, From, To, Gas> TxProxyTrait<Env, From, To, Gas> for ChainFactoryContractProxy | ||
where | ||
Env: TxEnv, | ||
From: TxFrom<Env>, | ||
To: TxTo<Env>, | ||
Gas: TxGas<Env>, | ||
{ | ||
type TxProxyMethods = ChainFactoryContractProxyMethods<Env, From, To, Gas>; | ||
|
||
fn proxy_methods(self, tx: Tx<Env, From, To, (), Gas, (), ()>) -> Self::TxProxyMethods { | ||
ChainFactoryContractProxyMethods { wrapped_tx: tx } | ||
} | ||
} | ||
|
||
pub struct ChainFactoryContractProxyMethods<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> ChainFactoryContractProxyMethods<Env, From, (), Gas> | ||
where | ||
Env: TxEnv, | ||
Env::Api: VMApi, | ||
From: TxFrom<Env>, | ||
Gas: TxGas<Env>, | ||
{ | ||
pub fn init< | ||
Arg0: ProxyArg<ManagedAddress<Env::Api>>, | ||
Arg1: ProxyArg<ManagedAddress<Env::Api>>, | ||
Arg2: ProxyArg<BigUint<Env::Api>>, | ||
>( | ||
self, | ||
validators_contract_address: Arg0, | ||
chain_config_template: Arg1, | ||
deploy_cost: Arg2, | ||
) -> TxTypedDeploy<Env, From, NotPayable, Gas, ()> { | ||
self.wrapped_tx | ||
.payment(NotPayable) | ||
.raw_deploy() | ||
.argument(&validators_contract_address) | ||
.argument(&chain_config_template) | ||
.argument(&deploy_cost) | ||
.original_result() | ||
} | ||
} | ||
|
||
#[rustfmt::skip] | ||
impl<Env, From, To, Gas> ChainFactoryContractProxyMethods<Env, From, To, Gas> | ||
where | ||
Env: TxEnv, | ||
Env::Api: VMApi, | ||
From: TxFrom<Env>, | ||
To: TxTo<Env>, | ||
Gas: TxGas<Env>, | ||
{ | ||
pub fn upgrade( | ||
self, | ||
) -> TxTypedUpgrade<Env, From, To, NotPayable, Gas, ()> { | ||
self.wrapped_tx | ||
.payment(NotPayable) | ||
.raw_upgrade() | ||
.original_result() | ||
} | ||
} | ||
|
||
#[rustfmt::skip] | ||
impl<Env, From, To, Gas> ChainFactoryContractProxyMethods<Env, From, To, Gas> | ||
where | ||
Env: TxEnv, | ||
Env::Api: VMApi, | ||
From: TxFrom<Env>, | ||
To: TxTo<Env>, | ||
Gas: TxGas<Env>, | ||
{ | ||
pub fn deploy_sovereign_chain_config_contract< | ||
Arg0: ProxyArg<usize>, | ||
Arg1: ProxyArg<usize>, | ||
Arg2: ProxyArg<BigUint<Env::Api>>, | ||
Arg3: ProxyArg<MultiValueEncoded<Env::Api, MultiValue2<TokenIdentifier<Env::Api>, BigUint<Env::Api>>>>, | ||
>( | ||
self, | ||
min_validators: Arg0, | ||
max_validators: Arg1, | ||
min_stake: Arg2, | ||
additional_stake_required: Arg3, | ||
) -> TxTypedCall<Env, From, To, (), Gas, ()> { | ||
self.wrapped_tx | ||
.raw_call("deploySovereignChainConfigContract") | ||
.argument(&min_validators) | ||
.argument(&max_validators) | ||
.argument(&min_stake) | ||
.argument(&additional_stake_required) | ||
.original_result() | ||
} | ||
|
||
pub fn blacklist_sovereign_chain_sc< | ||
Arg0: ProxyArg<ManagedAddress<Env::Api>>, | ||
>( | ||
self, | ||
sc_address: Arg0, | ||
) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()> { | ||
self.wrapped_tx | ||
.payment(NotPayable) | ||
.raw_call("blacklistSovereignChainSc") | ||
.argument(&sc_address) | ||
.original_result() | ||
} | ||
|
||
pub fn deploy_cost( | ||
self, | ||
) -> TxTypedCall<Env, From, To, NotPayable, Gas, BigUint<Env::Api>> { | ||
self.wrapped_tx | ||
.payment(NotPayable) | ||
.raw_call("getDeployCost") | ||
.original_result() | ||
} | ||
|
||
pub fn slash< | ||
Arg0: ProxyArg<ManagedAddress<Env::Api>>, | ||
Arg1: ProxyArg<BigUint<Env::Api>>, | ||
>( | ||
self, | ||
validator_address: Arg0, | ||
value: Arg1, | ||
) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()> { | ||
self.wrapped_tx | ||
.payment(NotPayable) | ||
.raw_call("slash") | ||
.argument(&validator_address) | ||
.argument(&value) | ||
.original_result() | ||
} | ||
|
||
pub fn distribute_slashed< | ||
Arg0: ProxyArg<MultiValueEncoded<Env::Api, MultiValue2<ManagedAddress<Env::Api>, BigUint<Env::Api>>>>, | ||
>( | ||
self, | ||
dest_amount_pairs: Arg0, | ||
) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()> { | ||
self.wrapped_tx | ||
.payment(NotPayable) | ||
.raw_call("distributeSlashed") | ||
.argument(&dest_amount_pairs) | ||
.original_result() | ||
} | ||
|
||
pub fn set_min_valid_signers< | ||
Arg0: ProxyArg<u32>, | ||
>( | ||
self, | ||
new_value: Arg0, | ||
) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()> { | ||
self.wrapped_tx | ||
.payment(NotPayable) | ||
.raw_call("setMinValidSigners") | ||
.argument(&new_value) | ||
.original_result() | ||
} | ||
|
||
pub fn add_signers< | ||
Arg0: ProxyArg<MultiValueEncoded<Env::Api, ManagedAddress<Env::Api>>>, | ||
>( | ||
self, | ||
signers: Arg0, | ||
) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()> { | ||
self.wrapped_tx | ||
.payment(NotPayable) | ||
.raw_call("addSigners") | ||
.argument(&signers) | ||
.original_result() | ||
} | ||
|
||
pub fn remove_signers< | ||
Arg0: ProxyArg<MultiValueEncoded<Env::Api, ManagedAddress<Env::Api>>>, | ||
>( | ||
self, | ||
signers: Arg0, | ||
) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()> { | ||
self.wrapped_tx | ||
.payment(NotPayable) | ||
.raw_call("removeSigners") | ||
.argument(&signers) | ||
.original_result() | ||
} | ||
} |
Oops, something went wrong.