Type Alias hedera::ContractUpdateTransaction
source · pub type ContractUpdateTransaction = Transaction<ContractUpdateTransactionData>;
Expand description
Updates the fields of a smart contract to the given values.
Aliased Type§
struct ContractUpdateTransaction { /* private fields */ }
Implementations§
source§impl ContractUpdateTransaction
impl ContractUpdateTransaction
sourcepub fn get_contract_id(&self) -> Option<ContractId>
pub fn get_contract_id(&self) -> Option<ContractId>
Returns the contract to be updated.
sourcepub fn contract_id(&mut self, contract_id: ContractId) -> &mut Self
pub fn contract_id(&mut self, contract_id: ContractId) -> &mut Self
Sets the contract to be updated.
sourcepub fn get_admin_key(&self) -> Option<&Key>
pub fn get_admin_key(&self) -> Option<&Key>
Returns the new admin key.
sourcepub fn get_expiration_time(&self) -> Option<OffsetDateTime>
pub fn get_expiration_time(&self) -> Option<OffsetDateTime>
Returns the new expiration time to extend to (ignored if equal to or before the current one).
sourcepub fn expiration_time(&mut self, at: OffsetDateTime) -> &mut Self
pub fn expiration_time(&mut self, at: OffsetDateTime) -> &mut Self
Sets the new expiration time to extend to (ignored if equal to or before the current one).
sourcepub fn get_auto_renew_period(&self) -> Option<Duration>
pub fn get_auto_renew_period(&self) -> Option<Duration>
Returns the auto renew period for this smart contract.
sourcepub fn auto_renew_period(&mut self, period: Duration) -> &mut Self
pub fn auto_renew_period(&mut self, period: Duration) -> &mut Self
Sets the auto renew period for this smart contract.
sourcepub fn get_contract_memo(&self) -> Option<&str>
pub fn get_contract_memo(&self) -> Option<&str>
Returns the new memo for the smart contract.
sourcepub fn contract_memo(&mut self, memo: impl Into<String>) -> &mut Self
pub fn contract_memo(&mut self, memo: impl Into<String>) -> &mut Self
Sets the new memo for the smart contract.
sourcepub fn get_max_automatic_token_associations(&self) -> Option<u32>
pub fn get_max_automatic_token_associations(&self) -> Option<u32>
Returns the maximum number of tokens that this contract can be automatically associated with.
sourcepub fn max_automatic_token_associations(&mut self, max: u32) -> &mut Self
pub fn max_automatic_token_associations(&mut self, max: u32) -> &mut Self
Sets the maximum number of tokens that this contract can be automatically associated with.
sourcepub fn get_auto_renew_account_id(&self) -> Option<AccountId>
pub fn get_auto_renew_account_id(&self) -> Option<AccountId>
Returns the account to be used at the contract’s expiration time to extend the life of the contract.
sourcepub fn auto_renew_account_id(&mut self, account_id: AccountId) -> &mut Self
pub fn auto_renew_account_id(&mut self, account_id: AccountId) -> &mut Self
Sets the account to be used at the contract’s expiration time to extend the life of the contract.
sourcepub fn get_proxy_account_id(&self) -> Option<AccountId>
pub fn get_proxy_account_id(&self) -> Option<AccountId>
Returns the ID of the account to which this contract is proxy staked.
sourcepub fn proxy_account_id(&mut self, id: AccountId) -> &mut Self
pub fn proxy_account_id(&mut self, id: AccountId) -> &mut Self
Sets the ID of the account to which this contract is proxy staked.
sourcepub fn get_staked_account_id(&self) -> Option<AccountId>
pub fn get_staked_account_id(&self) -> Option<AccountId>
Returns the ID of the account to which this contract is staking.
sourcepub fn staked_account_id(&mut self, id: AccountId) -> &mut Self
pub fn staked_account_id(&mut self, id: AccountId) -> &mut Self
Sets the ID of the account to which this contract is staking.
This is mutually exclusive with staked_node_id
.
sourcepub fn get_staked_node_id(&self) -> Option<u64>
pub fn get_staked_node_id(&self) -> Option<u64>
Returns the ID of the node to which this contract is staking.
sourcepub fn staked_node_id(&mut self, id: u64) -> &mut Self
pub fn staked_node_id(&mut self, id: u64) -> &mut Self
Sets the ID of the node to which this contract is staking.
This is mutually exclusive with staked_account_id
.
sourcepub fn get_decline_staking_reward(&self) -> Option<bool>
pub fn get_decline_staking_reward(&self) -> Option<bool>
Returns true
if the contract will be updated decline staking rewards,
false
if it will be updated to not,
and None
if it will not be updated.
sourcepub fn decline_staking_reward(&mut self, decline: bool) -> &mut Self
pub fn decline_staking_reward(&mut self, decline: bool) -> &mut Self
Sets to true, the contract declines receiving a staking reward. The default value is false.