Scheme

Let be defined as in the section Pallas and Vesta.

Deploy

This function initializes a smart contract deployment.

  • Wallet builder: src/contract/deployooor/src/client/deploy_v1.rs
  • WASM VM code: src/contract/deployooor/src/entrypoint/deploy_v1.rs

Function Params

Define the deploy params

/// Parameters for `Deploy::Deploy`
#[derive(Clone, Debug, SerialEncodable, SerialDecodable)]
pub struct DeployParamsV1 {
    /// Webassembly bincode of the smart contract
    pub wasm_bincode: Vec<u8>,
    /// Public key used to sign the transaction and derive the `ContractId`
    pub public_key: PublicKey,
    /// Serialized deployment payload instruction
    pub ix: Vec<u8>,
}

Contract Statement

Contract deployment status   whether the contract is locked. If yes then fail.

WASM bincode validity   whether the provided WASM bincode is valid. If no then fail.

Signatures

There should be a single signature attached, which uses as the signature public key.

Lock

This function finalizes the smart contract state definition.

  • Wallet builder: src/contract/deployooor/src/client/lock_v1.rs
  • WASM VM code: src/contract/deployooor/src/entrypoint/lock_v1.rs

Function Params

Define the lock params

/// Parameters for `Deploy::Lock`
#[derive(Clone, Debug, SerialEncodable, SerialDecodable)]
pub struct LockParamsV1 {
    /// Public key used to sign the transaction and derive the `ContractId`
    pub public_key: PublicKey,
}

Contract Statement

Contract deployment status   whether the contract is already locked. If yes then fail.

Signatures

There should be a single signature attached, which uses as the signature public key.