Interface DeployOptions

Hierarchy

Properties

abi?: string

ABI

ABI to be stored in the koinos-contract-meta-store. This option is optional.

abis?: Record<string, Abi>

Collection of Abis so that the receiver can parse the operations in the transaction

authorizesCallContract?: boolean

Authorizes call contract

Set it true if the contract implements the "authorize" function and can authorize calling other contracts in its name.

authorizesTransactionApplication?: boolean

Authorizes transaction application

Set it true if the contract implements the "authorize" function and can authorize paying the mana to apply transactions, or can authorize the use of its nonce to apply transactions.

authorizesUploadContract?: boolean

Authorizes upload contract

Set it true if the contract implements the "authorize" function and can authorize upgrades of the actual contract

beforeSend?: ((tx: TransactionJson, options?: SendTransactionOptions) => Promise<void>)

Type declaration

    • (tx: TransactionJson, options?: SendTransactionOptions): Promise<void>
    • Function to be called before sending a transaction to the blockchain. It is useful to apply multisignatures to the transaction.

      Example

      const signer2 = Signer.fromSeed("signer2");
      const signer3 = Signer.fromSeed("signer3");

      const addMoreSignatures = async (tx, opts) => {
      await signer2.signTransaction(tx);
      await signer3.signTransaction(tx);
      };

      const { transaction } = await koin.transfer(
      {
      from: "16MT1VQFgsVxEfJrSGinrA5buiqBsN5ViJ",
      to: "1Gvqdo9if6v6tFomEuTuMWP1D7H7U9yksb",
      value: "1000000",
      },
      {
      payer: signer2.getAddress(),
      beforeSend: addMoreSignatures,
      }
      );

      Parameters

      Returns Promise<void>

broadcast?: boolean

Broadcast

Boolean to define if the transaction should be broadcasted to the different nodes in the network. By default it is true.

Set it to false if you want to interact with a contract for testing purposes and check the possible events triggered.

chainId?: string

Chain ID

If this option is not set it will be taken by querying the blockchain

nextOperations?: OperationJson[]

Next operations

List of extra operations to be included after the actual one in the transaction

nonce?: string

Transaction nonce

It can be the nonce of the payee or the nonce of the payer. Use the payee's nonce when the payer's nonce changes continuosly without your control, for instance, when the payer is a dApp.

The nonce is not required to be consecutive, only greater than the previous one.

If this option is not set it will be taken from the blockchain depending on the payer/payee configuration.

onlyOperation?: boolean

Only operation

Boolean to define if the intention is to get only the operation. No transaction or connection with the provider established. By default it is false.

payee?: string

Payee

Address that increases the nonce. When this option is not set the blockchain will increase the payer's nonce.

payer?: string

Payer

Address that will pay the resource credits (aka mana) consumed in the transaction.

If this option is not set it will take the address of the signer as payer.

previousOperations?: OperationJson[]

Previous operations

List of extra operations to be included before the actual one in the transaction

rcLimit?: string | number

Resource Credits limit

Max amount of mana to be spent. If this option is not set it will be taken by querying the actual mana of the payer

sendAbis?: boolean

Send abis

Boolean to define if the abis should be shared with the signer so it will be able to decode the operations. By default it is true.

sendTransaction?: boolean

Send transaction

Boolean to define if the transaction should be signed and sent to the RPC node. By default it is true.

signTransaction?: boolean

Sign transaction

Boolean to define if the transaction should be signed. By default it is true.

Generated using TypeDoc