pub struct ConsensusCreateTopicTransactionBody {
pub memo: String,
pub admin_key: Option<Key>,
pub submit_key: Option<Key>,
pub auto_renew_period: Option<Duration>,
pub auto_renew_account: Option<AccountId>,
pub fee_schedule_key: Option<Key>,
pub fee_exempt_key_list: Vec<Key>,
pub custom_fees: Vec<FixedCustomFee>,
}Expand description
Create a topic to accept and group consensus messages.
If autoRenewAccount is specified, that account Key MUST also sign this
transaction.
If adminKey is set, that Key MUST sign the transaction.
On success, the resulting TransactionReceipt SHALL contain the newly
created TopicId.
The autoRenewPeriod on a topic MUST be set to a value between
autoRenewPeriod.minDuration and autoRenewPeriod.maxDuration. These
values are configurable, typically 30 and 92 days.
This also sets the initial expirationTime of the topic.
If no adminKey is set on a topic
-autoRenewAccount SHALL NOT be set on the topic.
- A
deleteTopictransaction SHALL fail. - An
updateTopictransaction that only extends the expirationTime MAY succeed. - Any other
updateTopictransaction SHALL fail.
If the topic expires and is not automatically renewed, the topic SHALL enter
the EXPIRED state.
- All transactions on the topic SHALL fail with TOPIC_EXPIRED
- Except an updateTopic() call that only extends the expirationTime.
- getTopicInfo() SHALL succeed, and show the topic is expired.
The topic SHALL remain in the
EXPIREDstate for a time determined by theautorenew.gracePeriod(configurable, originally 7 days).
After the grace period, if the topic’s expirationTime is not extended, the topic SHALL be automatically deleted from state entirely, and cannot be recovered or recreated.
§Block Stream Effects
None
Fields§
§memo: StringA short memo for this topic.
This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` (default 100) bytes when encoded as UTF-8.
admin_key: Option<Key>Access control for modification of the topic after it is created.
If this field is set, that key MUST sign this transaction.
If this field is set, that key MUST sign each future transaction to
update or delete the topic.
An updateTopic transaction that _only_ extends the topic expirationTime
(a "manual renewal" transaction) SHALL NOT require admin key
signature.
A topic without an admin key SHALL be immutable, except for expiration
and renewal.
If adminKey is not set, then `autoRenewAccount` SHALL NOT be set.
submit_key: Option<Key>Access control for message submission to the topic.
If this field is set, that key MUST sign each consensus submit message
for this topic.
If this field is not set then any account may submit a message on the
topic, without restriction.
auto_renew_period: Option<Duration>The initial lifetime, in seconds, for the topic.
This is also the number of seconds for which the topic SHALL be
automatically renewed upon expiring, if it has a valid auto-renew
account.
This value MUST be set.
This value MUST be greater than the configured
MIN_AUTORENEW_PERIOD.
This value MUST be less than the configured MAX_AUTORENEW_PERIOD.
auto_renew_account: Option<AccountId>The ID of the account to be charged renewal fees at the topic’s expirationTime to extend the lifetime of the topic.
The topic lifetime SHALL be extended by the smallest of the following:
- The current `autoRenewPeriod` duration.
- The maximum duration that this account has funds to purchase.
- The configured MAX_AUTORENEW_PERIOD at the time of automatic renewal.
If this value is set, the `adminKey` field MUST also be set (though that key MAY not have any correlation to this account).
fee_schedule_key: Option<Key>Access control for update or delete of custom fees.
If set, subsequent `consensus_update_topic` transactions signed with this
key MAY update or delete the custom fees for this topic.
If not set, the custom fees for this topic SHALL BE immutable.
If not set when the topic is created, this field CANNOT be set via
update.
If set when the topic is created, this field MAY be changed via update.
fee_exempt_key_list: Vec<Key>A set of keys.
Keys in this list are permitted to submit messages to this topic without
paying custom fees associated with this topic.
If a submit transaction is signed by _any_ key included in this set,
custom fees SHALL NOT be charged for that transaction.
This field MUST NOT contain more than 10 keys.
fee_exempt_key_list SHALL NOT contain any duplicate keys.
fee_exempt_key_list MAY contain keys for accounts that are inactive,
deleted, or non-existent.
If fee_exempt_key_list is unset in this transaction, there SHALL NOT be
any fee-exempt keys. In particular, the following keys SHALL NOT be
implicitly or automatically added to this list:
`adminKey`, `submitKey`, `fee_schedule_key`.
custom_fees: Vec<FixedCustomFee>A set of custom fee definitions.
These are fees to be assessed for each submit to this topic.
Each fee defined in this set SHALL be evaluated for
each message submitted to this topic, and the resultant
total assessed fees SHALL be charged.
Custom fees defined here SHALL be assessed in addition to the base
network and node fees.
custom_fees list SHALL NOT contain more than
`MAX_CUSTOM_FEE_ENTRIES_FOR_TOPICS` entries.
Trait Implementations§
Source§impl Clone for ConsensusCreateTopicTransactionBody
impl Clone for ConsensusCreateTopicTransactionBody
Source§fn clone(&self) -> ConsensusCreateTopicTransactionBody
fn clone(&self) -> ConsensusCreateTopicTransactionBody
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Message for ConsensusCreateTopicTransactionBody
impl Message for ConsensusCreateTopicTransactionBody
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.impl StructuralPartialEq for ConsensusCreateTopicTransactionBody
Auto Trait Implementations§
impl Freeze for ConsensusCreateTopicTransactionBody
impl RefUnwindSafe for ConsensusCreateTopicTransactionBody
impl Send for ConsensusCreateTopicTransactionBody
impl Sync for ConsensusCreateTopicTransactionBody
impl Unpin for ConsensusCreateTopicTransactionBody
impl UnsafeUnpin for ConsensusCreateTopicTransactionBody
impl UnwindSafe for ConsensusCreateTopicTransactionBody
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request