Deploy a Contract and Call its Methods with a Few Clicks

sCrypt
2 min readDec 31, 2020

--

sCrypt IDE v0.5.0 allows users to deploy a contract to testnet and interact with it without writing a single line of code.

Prerequisite

We need a private key of testnet to fund the deployment and calling transactions. To do so, open sCrypt settings in VSCode and input your private key.

sCrypt Settings

Deploy

  1. Before we deploy a contract, we need to compile it. Right click on it and select Compile to Bitcoin Script.
  2. Now click the sCrypt logo in the Activity Bar on the left, you should see your contract listed. Click on the contract you want to deploy and a panel similar to the following shall appear.
Deploy a Contract

3. Input arguments in the panel and click Deploy. It should deploy your contract on testnet if everything goes well.

4. There is a new contract instance listed under Deployed Contracts. You can view the deployment transaction in a block explorer by clicking View Tx.

Call

Click on the deployed contract, you can see a list of its methods. Click on the one you want to call, a Call panel shall appear similar to the Deploy panel we have seen. Similarly, input all arguments and click Call. Afterwards, you can also view the calling transaction by clicking on View Tx next to the method.

Enjoy and Happy New Year!

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

sCrypt
sCrypt

Written by sCrypt

sCrypt (https://scrypt.io) is a web3 development platform specialized in UTXO-blockchains like Bitcoin

No responses yet

Write a response