Options
All
  • Public
  • Public/Protected
  • All
Menu
class

Governable.CommitAgreement

package

Governable

subpackage

Contracts

since

v1.0.0

description

Class that describes a contract for finalizing a DAO launch agreement. Operators must be the same as those whom previously executed the CreateAgreement contract.

The funds locked by secret are hereby unlocked and owned by the agreed upon target public account of the DAO.

see

{Governable.CreateAgreement}

summary

This digital contract accepts the following arguments:

Argument Description Example
target Target public account new PublicAccount(...)
agreement Agreement public account new PublicAccount(...)

The execution of this contract results in the creation of the following list of transactions with their respective signer and a description:

Sequence Type Signer Description
01 SecretProof Agreement Account Proves the agreement of operators to start a DAO with the included governance asset identifier.
02 TransferTransaction Agreement Account Sends information containing the target account public key that is hereby being agreed upon.
03 TransferTransaction Agreement Account Adds an execution proof message sent to the agreement account.

Hierarchy

Implements

Index

Constructors

constructor

Properties

agreement

agreement: AggregateTransaction | undefined
access

public

description

The transaction representing a committed DAO agreement that has been confirmed on the network.

arguments

arguments: string[] = ['target','agreement',]
access

public

description

The list of required arguments to execute this digital contract.

context

context: Context

The execution context.

Protected identifier

identifier: AssetIdentifier

The organization governance asset identifier.

metadata

metadata: MetadataBucket | undefined
access

public

description

Metadata about the distributed organization.

mosaicInfo

mosaicInfo: MosaicInfo | undefined
access

public

description

Mosaic information for the network-wide created organization governance assets.

operators

operators: Address[] = []
access

public

description

List of operators of a distributed organization.

target

target: PublicAccount
access

public

description

The deterministic public account which owns a governable organization. This account is used to issue the organization governance mosaic.

Accessors

descriptor

  • get descriptor(): string

name

  • get name(): string

specification

  • get specification(): Taxonomy

Protected transactions

  • get transactions(): Transaction[]
  • This method returns a list of unsigned transactions in a sequencial order of execution. The resulting transaction array is later wrapped inside a digital contract that is executed atomically such that either all transactions do succeed or all transactions are cancelled.

    see

    {execute()}

    access

    public

    Returns Transaction[]

    Given the execution of a contract, returns a list of unsigned transactions.

Methods

Protected assertExecutionAllowance

  • assertExecutionAllowance(actor: PublicAccount, argv: ContractOption[] | undefined): boolean

Protected assertHasMandatoryArguments

  • assertHasMandatoryArguments(argv: ContractOption[] | undefined, fields: string[]): boolean

canExecute

  • Verifies allowance of \a actor to execute a contract with arguments \a argv. This method asserts the presence of mandatory arguments.

    Additionally, this method checks that there is no other key ceremony that was commited to and confirmed on the network, it also makes sure that the contract always executes with operators readable from the network and gives an allowance only to operator account.

    access

    public

    throws

    {FailureMissingArgument} On missing mandatory argument(s).

    Parameters

    • actor: PublicAccount

      The actor is whom executes the contract.

    • Optional argv: ContractOption[]

      The contract options (arguments).

    Returns AllowanceResult

    Returns whether an actor is authorized to execute this contract.

execute

  • execute(actor: PublicAccount, argv?: ContractOption[]): TransactionURI<Transaction>
  • Executes a digital contract with \a actor given \a argv contract options.

    access

    public

    throws

    {FailureMissingArgument} On missing mandatory argument(s).

    throws

    {FailureOperationForbidden} On denial of authorization.

    Parameters

    • actor: PublicAccount

      The actor is whom executes the contract.

    • Optional argv: ContractOption[]

      The contract options (arguments).

    Returns TransactionURI<Transaction>

    Returns one transaction URI with all transactions.

Protected prepare

  • prepare(): AggregateTransaction | Transaction

Generated using TypeDoc