Condor Testnet Task 2 - Release a DAPP
September 24th, 2022

In the first task of deploying a contract, we have learned how to deploy an on-chain contract,

If not, you can refer to the official tutorial and the tutorial of joio.eth.

Develop DAPP

Note: This tutorial must use the following supporting contracts (Comments) to use this DAPP normally, otherwise the operation will report an error!

https://explorer.condor.systems/address/0x9b6c936c9fa2a9e3fCbB10C2163a148e7A47CB7B/contracts#address-tabs

The second task needs to write a testnet application (dapp). At this time, we can use the contract in the first task to perform various contract operations.

Here I will take the dapp released by myself as an example to illustrate.

my example dapp
my example dapp

Open my dapp example address

Click “Fork Repl”, the repository name and introduction can be confirmed directly without changing.

Fork-1
Fork-1
Fork-2
Fork-2

After Fork, the code will be automatically opened, and then we only need to modify a few codes

  1. Modify the RPC address in pages/index.tsx

  2. Modify abi and contract address in hooks/useCommentsContract.ts

In fact, I have replaced the RPC address here with the correct one, which can be skipped here.

Modify the code
Modify the code
Modify the code
Modify the code

For this, we need the contract address and abi information. I will use the contract example of this dapp to illustrate.

This is my open source contract, you can copy the code and redeploy it

Get the contract address and copy it directly in the lower right corner after deployment

Get contract address
Get contract address

There are two ways to get abi information

  • If the contract has been verified, you can see copy abi in the Code column of the block browser
Find the Code
Find the Code
Copy abi
Copy abi
  • If the contract is not verified, you can find abi on remix, just copy the following [ … ] array
Get abi information
Get abi information

Copy and replace the contract address and abi obtained above into the file in the previous step

After the replacement, just click “RUN” in the middle of the top

Run the example
Run the example
open a new window
open a new window

We can see our interactions on the block explorer

Interaction record of block explorer
Interaction record of block explorer

If there is anything unclear about the above, please share , thank you

I'm Souleigh, follow on Twitter

Subscribe to Souleigh
Receive the latest updates directly to your inbox.
Nft graphic
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.
More from Souleigh

Skeleton

Skeleton

Skeleton