Type Alias hedera::ContractCreateTransaction

source ·
pub type ContractCreateTransaction = Transaction<ContractCreateTransactionData>;
Expand description

Start a new smart contract instance.

Aliased Type§

struct ContractCreateTransaction { /* private fields */ }

Implementations§

source§

impl ContractCreateTransaction

source

pub fn get_bytecode_file_id(&self) -> Option<FileId>

Returns the FileId to be used as the bytecode for this smart contract.

source

pub fn bytecode_file_id(&mut self, file_id: FileId) -> &mut Self

Sets the file to use as the bytes for the smart contract.

source

pub fn get_bytecode(&self) -> Option<&[u8]>

Returns the bytecode for the smart contract.

source

pub fn bytecode(&mut self, bytecode: impl AsRef<[u8]>) -> &mut Self

Sets the bytes of the smart contract.

source

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

Returns the admin key.

source

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

Sets the admin key.

source

pub fn get_gas(&self) -> u64

Returns the gas limit to deploy the smart contract.

source

pub fn gas(&mut self, gas: u64) -> &mut Self

Sets the gas limit to deploy the smart contract.

source

pub fn get_initial_balance(&self) -> Hbar

Returns the initial balance to put into the cryptocurrency account associated with the new smart contract.

source

pub fn initial_balance(&mut self, balance: Hbar) -> &mut Self

Sets the initial balance to put into the cryptocurrency account associated with the new smart contract.

source

pub fn get_auto_renew_period(&self) -> 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_constructor_parameters(&self) -> &[u8]

Returns the parameters to pass to the constructor.

source

pub fn constructor_parameters( &mut self, parameters: impl AsRef<[u8]> ) -> &mut Self

Sets the parameters to pass to the constructor.

source

pub fn get_contract_memo(&self) -> &str

Returns the memo for the new smart contract.

source

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

Sets the memo for the new smart contract.

source

pub fn get_max_automatic_token_associations(&self) -> u32

Returns the maximum number of tokens that the 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 ot 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_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) -> bool

Returns true if the contract will decline receiving staking rewards, false otherwise.

source

pub fn decline_staking_reward(&mut self, decline: bool) -> &mut Self

If true the contract should declie receiving staking rewards. The default value is false.