Code Monkey home page Code Monkey logo

Comments (6)

kazu80 avatar kazu80 commented on July 17, 2024

Connect with the user's Metamask

Metamask official reference
https://docs.metamask.io/guide/ethereum-provider.html#ethereum-request-args

Wallet connection request

ethereum.request({ method: 'eth_requestAccounts' })
非推奨: ethereum.enable()

STEP

  1. We need to create a function to see if the MetaMask Chrome extension is installed
  2. If MetaMask is not installed we:
  3. Change our connectButton to Click here to install MetaMask
  4. When clicking that button it should take us to a page that will allow us to install the extension
  5. Disable the button
  6. If MetaMask is installed we:
  7. Change our connectButton to Connect
  8. When clicking that button it should allow us to connect to our MetaMask wallet
  9. Disable the button

from community.

kazu80 avatar kazu80 commented on July 17, 2024

Get a list of authors from GraphQL

Devprotocol does not provide an interface to get a list of authors.
It is prepared in GraphQL below, so use this
https://explorer.graphql.devprotocol.xyz/

And, additional information (icons, etc.) is prepared below, so use it.
https://github.com/dev-protocol/dev-for-apps

from community.

kazu80 avatar kazu80 commented on July 17, 2024

Get a list of author properties

Process on the front side to minimize contract processing

It is prepared in GraphQL below, so use this
https://explorer.graphql.devprotocol.xyz/

from community.

kazu80 avatar kazu80 commented on July 17, 2024

Calculate the staking amount per property

Process on the front side to minimize contract processing

Staking Price / Total properties of designated Author = Staking amount per property

Give the remainder to the first property

from community.

kazu80 avatar kazu80 commented on July 17, 2024

Send to smart contract

The parameters to be sent are as follows

  1. User's address
  2. Array of "address of property to be given and staking amount of it"

from community.

kazu80 avatar kazu80 commented on July 17, 2024

Tell the front side the completion

Use it because you can notify the completion after the block is imported by dev-kit-js.

  • Regardless of contract

You can find out dev-kit-js from the contract.ts below.
https://github.com/dev-protocol/dev-kit-js/blob/main/lib/contract.ts

from community.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.