sendContractOriginationOperation static method

dynamic sendContractOriginationOperation(
  1. String server,
  2. SoftSigner signer,
  3. KeyStoreModel keyStore,
  4. int amount,
  5. String delegate,
  6. String code,
  7. String storage,
  8. TezosParameterFormat codeFormat,
  9. int offset,
)

send a contract origination operation fee, gasLimit and storageLimit are estimated by the fee estimation service

Implementation

static sendContractOriginationOperation(
    String server,
    SoftSigner signer,
    KeyStoreModel keyStore,
    int amount,
    String delegate,
    String code,
    String storage,
    TezosParameterFormat codeFormat,
    int offset) async {
  var counter = await TezosNodeReader.getCounterForAccount(
          server, keyStore.publicKeyHash) +
      1;
  var operation = constructContractOriginationOperation(
      keyStore, amount, delegate, code, storage, codeFormat, counter);
  var operations = await appendRevealOperation(server, keyStore.publicKey,
      keyStore.publicKeyHash, counter - 1, [operation]);
  return sendOperation(server, operations, signer, offset);
}