pub struct RegisterContractAction {
pub verifier: Verifier,
pub program_id: ProgramId,
pub state_commitment: StateCommitment,
pub contract_name: ContractName,
pub timeout_window: Option<TimeoutWindow>,
pub constructor_metadata: Option<Vec<u8>>,
}Expand description
Used as a blob action to register a contract.
Fields§
§verifier: VerifierVerifier to use for transactions sent to this new contract.
program_id: ProgramIdOther verifier data, such as a Risc0 program ID or noir public key. Transactions sent to this contract will have to match this program ID.
state_commitment: StateCommitmentInitial state commitment of the contract to register.
contract_name: ContractNameName of the contract to register.
timeout_window: Option<TimeoutWindow>Optionally set the timeout window for the contract. If the contract exists, the timeout window will be unchanged, otherwise, the default value will be used.
constructor_metadata: Option<Vec<u8>>Optional data for indexers to construct the initial state of the contract. Importantly, this is never checked by the node. You should verify manually it matches the state commitment.
Implementations§
Source§impl RegisterContractAction
impl RegisterContractAction
pub fn as_blob(&self, contract_name: ContractName) -> Blob
Trait Implementations§
Source§impl BorshDeserialize for RegisterContractAction
impl BorshDeserialize for RegisterContractAction
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl Clone for RegisterContractAction
impl Clone for RegisterContractAction
Source§impl ComposeSchema for RegisterContractAction
impl ComposeSchema for RegisterContractAction
Source§impl Debug for RegisterContractAction
impl Debug for RegisterContractAction
Source§impl Default for RegisterContractAction
impl Default for RegisterContractAction
Source§impl<'de> Deserialize<'de> for RegisterContractAction
impl<'de> Deserialize<'de> for RegisterContractAction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RegisterContractAction
Source§impl From<RegisterContractAction> for RegisterContractEffect
impl From<RegisterContractAction> for RegisterContractEffect
Source§fn from(action: RegisterContractAction) -> Self
fn from(action: RegisterContractAction) -> Self
Converts to this type from the input type.
Source§impl Hashed<TxHash> for RegisterContractAction
Available on crate feature full only.
impl Hashed<TxHash> for RegisterContractAction
Available on crate feature
full only.Source§impl PartialEq for RegisterContractAction
impl PartialEq for RegisterContractAction
Source§impl Serialize for RegisterContractAction
impl Serialize for RegisterContractAction
impl StructuralPartialEq for RegisterContractAction
Auto Trait Implementations§
impl Freeze for RegisterContractAction
impl RefUnwindSafe for RegisterContractAction
impl Send for RegisterContractAction
impl Sync for RegisterContractAction
impl Unpin for RegisterContractAction
impl UnsafeUnpin for RegisterContractAction
impl UnwindSafe for RegisterContractAction
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.