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

source

pub fn get_contract_id(&self) -> Option<ContractId>

Returns the contract to be updated.

source

pub fn contract_id(&mut self, contract_id: ContractId) -> &mut Self

Sets the contract to be updated.

source

pub fn get_admin_key(&self) -> Option<&Key>

Returns the new admin key.

source

pub fn admin_key(&mut self, key: impl Into<Key>) -> &mut Self

Sets the new admin key.

source

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).

source

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).

source

pub fn get_auto_renew_period(&self) -> Option<Duration>

Returns the auto renew period for this smart contract.

source

pub fn auto_renew_period(&mut self, period: Duration) -> &mut Self

Sets the auto renew period for this smart contract.

source

pub fn get_contract_memo(&self) -> Option<&str>

Returns the new memo for the smart contract.

source

pub fn contract_memo(&mut self, memo: impl Into<String>) -> &mut Self

Sets the new memo for the smart contract.

source

pub fn get_max_automatic_token_associations(&self) -> Option<u32>

Returns the maximum number of tokens that this contract can be automatically associated with.

source

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.

source

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.

source

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.

source

pub fn get_proxy_account_id(&self) -> Option<AccountId>

Returns the ID of the account to which this contract is proxy staked.

source

pub fn proxy_account_id(&mut self, id: AccountId) -> &mut Self

Sets the ID of the account to which this contract is proxy staked.

source

pub fn get_staked_account_id(&self) -> Option<AccountId>

Returns the ID of the account to which this contract is staking.

source

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.

source

pub fn get_staked_node_id(&self) -> Option<u64>

Returns the ID of the node to which this contract is staking.

source

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.

source

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.

source

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.