/sdk-sc-vite-sample

Small sample about interacting with smart contracts (on OPAL)

Primary LanguageVue

Small example of interacting with smart contracts via @unique-nft/utils and @unique-nft/sdk

Uses @unique-nft/utils and Metamask to deploy contract

Uses @unique-nft/sdk to interact with contract

  1. after clone
yarn

yarn dev
  1. go to browser tab, open dev console
  2. press 'Switch to OPAL', look the output in console

for example

Switched to OPAL

Address: 0xd54e86b1c8755366cf4d3166e0642d57b62dba17

Mirror: 5FzQnDfkFCC2tWrzm8vKt2CHpEFRMvDFb2rJqdVNiRKqv4c7

Balance is 3993.622787976646418112

if your balance is 0, you can use faucet to get some OPAL https://t.me/unique2faucet_opal_bot

  1. press 'Deploy Contract', wait for 10-30 seconds, output is contract address

  2. check other buttons - they are using @unique-nft/sdk under the hood