Contract
Smart contracts are an advanced feature of Terra Station. If you’re using Terra Station for the first time, follow the Terra Station tutorial.
Prerequisites
Compile a contract locally and create a .wasm
file.
Upload
Deploy a contract by uploading your .wasm
file to Terra Station.
-
Open Terra Station and connect your wallet. Click Contracts.
-
Click Upload.
-
Upload your
.wasm
file and enter your password. -
Click Submit.
Your contract is now uploaded, and you received a contract code ID.
Instantiate
Use Create to initialize your contract after uploading.
-
Click Create.
-
Enter your contract code ID,
InitMsg JSON
, name, and description. -
Confirm the fee amounts and enter your password. Click Submit.
Your contract is now initialized.
Query
Use Query to find out contract values. Querying does not cost anything.
-
Click Query located under your contract address.
-
Enter your
HandleMsg JSON
. Click Next.
Station will show your query result.
Interact
Use Interact to use the contract. Interacting will spend gas.
-
Click Interact located under your contract address.
-
Enter your
HandleMsg JSON
. Click Next. -
Confirm the fee amounts and enter your password. Click Interact.