cadence icon indicating copy to clipboard operation
cadence copied to clipboard

[Test Framework] Add helper function for contract deployment

Open SupunS opened this issue 3 years ago • 0 comments

Work towards https://github.com/onflow/cadence/issues/331

Description

Introduced a utility function to deploy a contract to the blockchain.

let err = blockchain.deployContract(
    contractName,
    contractCode,
    authorizerAddress,
    signers,
    contractInitArgs,
)

Devs can also deploy contracts using a transaction. This is a utility method that does the same under the hood.


  • [ ] Targeted PR against master branch
  • [x] Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • [x] Code follows the standards mentioned here
  • [x] Updated relevant documentation
  • [x] Re-reviewed Files changed in the Github PR explorer
  • [x] Added appropriate labels

SupunS avatar Aug 09 '22 15:08 SupunS