pub struct ContractTransactBuilder {
contract: AccountId,
method_name: String,
args: Vec<u8>,
gas: Option<NearGas>,
deposit: Option<NearToken>,
}Fields§
§contract: AccountId§method_name: String§args: Vec<u8>§gas: Option<NearGas>§deposit: Option<NearToken>Implementations§
Source§impl ContractTransactBuilder
impl ContractTransactBuilder
const fn new(contract: AccountId, method_name: String, args: Vec<u8>) -> Self
Sourcepub const fn gas(self, gas: NearGas) -> Self
pub const fn gas(self, gas: NearGas) -> Self
Specify the gas limit for the transaction. By default it is set to 100 TGas.
Sourcepub const fn max_gas(self) -> Self
pub const fn max_gas(self) -> Self
Specify the max gas for the transaction. By default it is set to 300 TGas.
Sourcepub const fn deposit(self, deposit: NearToken) -> Self
pub const fn deposit(self, deposit: NearToken) -> Self
Specify the near deposit for the transaction. By default it is set to 0.
Please note that the method should be payable in the contract to accept the deposit.
Otherwise the transaction will fail.
Sourcepub fn with_signer(
self,
signer_id: AccountId,
signer: Arc<Signer>,
) -> ExecuteSignedTransaction
pub fn with_signer( self, signer_id: AccountId, signer: Arc<Signer>, ) -> ExecuteSignedTransaction
Specify the signer for the transaction. This will wrap-up the process of the preparing transaction.
This will return the ExecuteSignedTransaction that can be used to sign and send the transaction to the network.
pub(crate) fn with_signer_account( self, signer_id: AccountId, ) -> ConstructTransaction
Trait Implementations§
Source§impl Clone for ContractTransactBuilder
impl Clone for ContractTransactBuilder
Source§fn clone(&self) -> ContractTransactBuilder
fn clone(&self) -> ContractTransactBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ContractTransactBuilder
impl RefUnwindSafe for ContractTransactBuilder
impl Send for ContractTransactBuilder
impl Sync for ContractTransactBuilder
impl Unpin for ContractTransactBuilder
impl UnwindSafe for ContractTransactBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more