Skip to content

Commit

Permalink
Add Subscan to Indexers & GraphQL section
Browse files Browse the repository at this point in the history
  • Loading branch information
meganskye committed Aug 3, 2023
1 parent 6e436b9 commit 470dc45
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/build/integrations/indexers/covalent.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Covalent
sidebar_position: 3
sidebar_position: 7
---

# Covalent Indexing and Querying API
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
sidebar_position: 3
---

# Subscan
## Introduction

Expand All @@ -14,39 +18,39 @@ A Substrate ecological explorer that not only allows ordinary users to view WASM

Visit [Transactions](https://astar.subscan.io/wasm_transaction) under the WASM category in Subscan navbar.

![transactions](./static/img/tutorial/subscan/transactions.png)
![transactions](./img/subscan/transactions.png)

Click on the link in list item to view transaction Detail.

![transaction_detail](./static/img/tutorial/subscan/transaction_detail.png)
![transaction_detail](./img/subscan/transaction_detail.png)

### View WASM Smart Contracts and Detail

Visit [Transactions](https://astar.subscan.io/wasm_transaction) under WASM category in Subscan navbar.

![contracts](./static/img/tutorial/subscan/contracts.png)
![contracts](./img/subscan/contracts.png)

Click on the link in the list item to view contract detail.

![contract_detail](./static/img/tutorial/subscan/contract_detail.png)
![contract_detail](./img/subscan/contract_detail.png)

### Verify WASM Smart Contract

Visit [WASM Contract Verification Tool](https://astar.subscan.io/verify_wasm_contract) under Tools category in Subscan
navbar or [Contract tab in contract detail](https://astar.subscan.io/wasm_contract/bZ2uiFGTLcYyP8F88XzXa13xu5Mmp13VLiaW1gGn7rzxktc?tab=contract) to verify WASM smart contract

![contract_verify](./static/img/tutorial/subscan/contract_verify.png)
![contract_verify](./img/subscan/contract_verify.png)

As the tip section says, we provide [docker images](https://quay.io/repository/subscan-explorer/wasm-compile-build?tab=tags) for developers to compile contract. This ensures that Subscan is consistent with the contract deployer compilation environment.

After compiling contract in docker, you need to fill in the Contract Verification form and submit Code and Cargo file from docker. The contract verification process will run in the background and may take 5 to 10 minutes. Once it's done, you'll see contract abi and source code in contract detail, and you can read/call the contract as you like now.

![verified_contract](./static/img/tutorial/subscan/verified_contract.png)
![verified_contract](./img/subscan/verified_contract.png)

### Read/Call WASM Smart Contract
Visit [Contract tab in contract detail](https://astar.subscan.io/wasm_contract/aBmKPunRKt9VaW6AuMS8ZUhpSYZqHJHYKhvjdNb1M4VQgqS?tab=contract&contractTab=read). Please note that read/call features only apply to verified WASM smart contract, and you need to connect to polkadot{.js} extension before calling contract.

![read_call](./static/img/tutorial/subscan/read_call.png)
![read_call](./img/subscan/read_call.png)

## Troubleshooting

Expand All @@ -56,7 +60,7 @@ It happens mainly in two situations:
1. The verifying process is still undergoing. Just wait for 5 to 10 minutes and check again
2. Verification failed. In this case, you'll see Last Compiled Code Hash as follows. Please check the parameters and confirm using the above docker image for compilation.

![failed](./static/img/tutorial/subscan/failed.png)
![failed](./img/subscan/failed.png)

## Learn more

Expand Down

0 comments on commit 470dc45

Please sign in to comment.