// Code generated by the drt-sc proxy generator. DO NOT EDIT. //////////////////////////////////////////////////// ////////////////// AUTO-GENERATED ////////////////// //////////////////////////////////////////////////// #![allow(dead_code)] #![allow(clippy::all)] use drt_sc::proxy_imports::*; pub struct PriceAggregatorProxy; impl TxProxyTrait for PriceAggregatorProxy where Env: TxEnv, From: TxFrom, To: TxTo, Gas: TxGas, { type TxProxyMethods = PriceAggregatorProxyMethods; fn proxy_methods(self, tx: Tx) -> Self::TxProxyMethods { PriceAggregatorProxyMethods { wrapped_tx: tx } } } pub struct PriceAggregatorProxyMethods where Env: TxEnv, From: TxFrom, To: TxTo, Gas: TxGas, { wrapped_tx: Tx, } #[rustfmt::skip] impl PriceAggregatorProxyMethods where Env: TxEnv, Env::Api: VMApi, From: TxFrom, Gas: TxGas, { pub fn init< Arg0: ProxyArg>, Arg1: ProxyArg>, Arg2: ProxyArg>, Arg3: ProxyArg, Arg4: ProxyArg, Arg5: ProxyArg>>, >( self, staking_token: Arg0, staking_amount: Arg1, slash_amount: Arg2, slash_quorum: Arg3, submission_count: Arg4, oracles: Arg5, ) -> TxTypedDeploy { self.wrapped_tx .payment(NotPayable) .raw_deploy() .argument(&staking_token) .argument(&staking_amount) .argument(&slash_amount) .argument(&slash_quorum) .argument(&submission_count) .argument(&oracles) .original_result() } } #[rustfmt::skip] impl PriceAggregatorProxyMethods where Env: TxEnv, Env::Api: VMApi, From: TxFrom, To: TxTo, Gas: TxGas, { pub fn change_amounts< Arg0: ProxyArg>, Arg1: ProxyArg>, >( self, staking_amount: Arg0, slash_amount: Arg1, ) -> TxTypedCall { self.wrapped_tx .payment(NotPayable) .raw_call("changeAmounts") .argument(&staking_amount) .argument(&slash_amount) .original_result() } pub fn add_oracles< Arg0: ProxyArg>>, >( self, oracles: Arg0, ) -> TxTypedCall { self.wrapped_tx .payment(NotPayable) .raw_call("addOracles") .argument(&oracles) .original_result() } /// Also receives submission count, /// so the owner does not have to update it manually with setSubmissionCount before this call pub fn remove_oracles< Arg0: ProxyArg, Arg1: ProxyArg>>, >( self, submission_count: Arg0, oracles: Arg1, ) -> TxTypedCall { self.wrapped_tx .payment(NotPayable) .raw_call("removeOracles") .argument(&submission_count) .argument(&oracles) .original_result() } pub fn submit< Arg0: ProxyArg>, Arg1: ProxyArg>, Arg2: ProxyArg, Arg3: ProxyArg>, Arg4: ProxyArg, >( self, from: Arg0, to: Arg1, submission_timestamp: Arg2, price: Arg3, decimals: Arg4, ) -> TxTypedCall { self.wrapped_tx .payment(NotPayable) .raw_call("submit") .argument(&from) .argument(&to) .argument(&submission_timestamp) .argument(&price) .argument(&decimals) .original_result() } pub fn submit_batch< Arg0: ProxyArg, ManagedBuffer, u64, BigUint, u8>>>, >( self, submissions: Arg0, ) -> TxTypedCall { self.wrapped_tx .payment(NotPayable) .raw_call("submitBatch") .argument(&submissions) .original_result() } pub fn latest_round_data( self, ) -> TxTypedCall>> { self.wrapped_tx .payment(NotPayable) .raw_call("latestRoundData") .original_result() } pub fn latest_price_feed< Arg0: ProxyArg>, Arg1: ProxyArg>, >( self, from: Arg0, to: Arg1, ) -> TxTypedCall, ManagedBuffer, u64, BigUint, u8>> { self.wrapped_tx .payment(NotPayable) .raw_call("latestPriceFeed") .argument(&from) .argument(&to) .original_result() } pub fn latest_price_feed_optional< Arg0: ProxyArg>, Arg1: ProxyArg>, >( self, from: Arg0, to: Arg1, ) -> TxTypedCall, ManagedBuffer, u64, BigUint, u8>>> { self.wrapped_tx .payment(NotPayable) .raw_call("latestPriceFeedOptional") .argument(&from) .argument(&to) .original_result() } pub fn set_submission_count< Arg0: ProxyArg, >( self, submission_count: Arg0, ) -> TxTypedCall { self.wrapped_tx .payment(NotPayable) .raw_call("setSubmissionCount") .argument(&submission_count) .original_result() } pub fn get_oracles( self, ) -> TxTypedCall>> { self.wrapped_tx .payment(NotPayable) .raw_call("getOracles") .original_result() } pub fn set_pair_decimals< Arg0: ProxyArg>, Arg1: ProxyArg>, Arg2: ProxyArg, >( self, from: Arg0, to: Arg1, decimals: Arg2, ) -> TxTypedCall { self.wrapped_tx .payment(NotPayable) .raw_call("setPairDecimals") .argument(&from) .argument(&to) .argument(&decimals) .original_result() } pub fn get_pair_decimals< Arg0: ProxyArg>, Arg1: ProxyArg>, >( self, from: Arg0, to: Arg1, ) -> TxTypedCall { self.wrapped_tx .payment(NotPayable) .raw_call("getPairDecimals") .argument(&from) .argument(&to) .original_result() } pub fn submission_count( self, ) -> TxTypedCall { self.wrapped_tx .payment(NotPayable) .raw_call("submission_count") .original_result() } pub fn pause_endpoint( self, ) -> TxTypedCall { self.wrapped_tx .payment(NotPayable) .raw_call("pause") .original_result() } pub fn unpause_endpoint( self, ) -> TxTypedCall { self.wrapped_tx .payment(NotPayable) .raw_call("unpause") .original_result() } pub fn paused_status( self, ) -> TxTypedCall { self.wrapped_tx .payment(NotPayable) .raw_call("isPaused") .original_result() } pub fn stake( self, ) -> TxTypedCall { self.wrapped_tx .raw_call("stake") .original_result() } pub fn unstake< Arg0: ProxyArg>, >( self, unstake_amount: Arg0, ) -> TxTypedCall { self.wrapped_tx .payment(NotPayable) .raw_call("unstake") .argument(&unstake_amount) .original_result() } pub fn vote_slash_member< Arg0: ProxyArg>, >( self, member_to_slash: Arg0, ) -> TxTypedCall { self.wrapped_tx .payment(NotPayable) .raw_call("voteSlashMember") .argument(&member_to_slash) .original_result() } pub fn cancel_vote_slash_member< Arg0: ProxyArg>, >( self, member_to_slash: Arg0, ) -> TxTypedCall { self.wrapped_tx .payment(NotPayable) .raw_call("cancelVoteSlashMember") .argument(&member_to_slash) .original_result() } pub fn slash_member< Arg0: ProxyArg>, >( self, member_to_slash: Arg0, ) -> TxTypedCall { self.wrapped_tx .payment(NotPayable) .raw_call("slashMember") .argument(&member_to_slash) .original_result() } } #[type_abi] #[derive(NestedEncode, NestedDecode, TopEncode, TopDecode)] pub struct PriceFeed where Api: ManagedTypeApi, { pub round_id: u32, pub from: ManagedBuffer, pub to: ManagedBuffer, pub timestamp: u64, pub price: BigUint, pub decimals: u8, } #[type_abi] #[derive(TopEncode)] pub struct NewRoundEvent where Api: ManagedTypeApi, { pub price: BigUint, pub timestamp: u64, pub decimals: u8, pub block: u64, pub epoch: u64, }