Quick deploy (re-originate)

Factori lets you quickly re-originate a contract you have imported from the blockchain.

The syntax is

factori deploy OPTIONS CONTRACT_NAME

where

  • CONTRACT_NAME is the name under which you have imported your contract. If you don't remember it, you can look up the file contracts.json in you Factori project folder, it will appear in the contract_name field as in: json "contracts": [ { "contract_name": "test", "original_format": "kT1", "original_kt1": [ "KT1Ty5iiGhgBKxUgAbNbSPU58dx6J3ULVRdk", "mainnet" ], "import_date": "13/4/2023 11:50:6", "options": [ "ocaml", "csharp" ] where the name of the contract is test.
  • OPTIONS can be
    • network is the network you wish to deploy to. Typical choices will be ghostnet (where alice from flextesa is an account which is always replenished and from which you can originate for free) or flextesa if you are deploying in a sandbox).
    • --ocaml means that an OCaml interface will be used to deploy the contract. For this to work, you will need to have generated the OCaml SDK for your contract;
    • --typescript means that a Typescript interface will be used to deploy the contract. For this to work, you will need to have generated the Typescript SDK for your contract.
    • --storage is the initial storage you want to use, it can be either random or blockchain:
      • random will use a randomly generated storage
      • blockchain will use the initial blockchain storage from the contract at the time you imported it. Please note that this will not, however, include the content of big_maps. Other languages will be added in the deploy command in the future.

When run, this command will generate a (OCaml or Typescript) scenario which deploys your contract to the desired network. Upon successful deployment, the scenario will be destroyed. If the deployment fails, the scenario will remain so that you can debug what went wrong or submit an issue.