Skip to content

lucusfly/iost-helloworld-dapp

 
 

Repository files navigation

iost-helloworld-dapp

npm install
npm start

To use this, valid contract address should be in src/components/HelloWorld.js 's hello method. src/components/HelloWorld.js

  hello = () => {
    const contractAddress = 'ContractEuBvAH3ruoB4zC8b9jMRrBxT7u6nENbFXmJhhSC3z5QB' //update with your contract address
    const { someone } = this.state

    window.IWalletJS.enable().then((account) => {
      if(account){
        const iost = window.IWalletJS.newIOST(IOST)
        const tx = iost.callABI(contractAddress, "hello", [someone]);
        iost.signAndSend(tx)
        .on('pending', (pending) => {
        })
      }
    })

After installing iost-extension, fill name on the input like above screenshot, finally click the 'hello' button.

Warning: To send a transaction, iost chrome extension should be installed before!

Download extension

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 87.2%
  • HTML 7.4%
  • CSS 5.4%