NovaDAOx / homepage

https://novadaodev.vercel.app
1 stars 4 forks source link

Staking #3

Closed novadaodev closed 2 years ago

novadaodev commented 2 years ago

use ether.js to

  1. approveAll on staking contract (allow staking and unstaking)
  2. stake selected via staking contract
novadaodev commented 2 years ago

should include a select all button to check off all available NFTs

novadaodev commented 2 years ago

https://github.com/novadaox/homepage/blob/4330b9dfad08544869414703eafea7505b32da83/src/app/index/staking

novadaodev commented 2 years ago

contract to interact with: https://rinkeby.etherscan.io/address/0x550B38EdAe1d4868CD7e3AB4574a9E6c1fD66362#code

novadaodev commented 2 years ago

outline of functions: [UML]

https://rinkeby.etherscan.io/viewsvg?t=1&a=0x550B38EdAe1d4868CD7e3AB4574a9E6c1fD66362

important functions: setApprovalForAll stakeMany

pawanlapits commented 2 years ago

@novadaodev I did not find ether.js

jb4earth commented 2 years ago

ether js

jb4earth commented 2 years ago

the smart contract engineer wrote some code for us

https://gist.github.com/jb4earth/0288d6461fff5131023b82e284f704a4

https://gist.github.com/jb4earth/64a6dc382ec92ee05fbeb8cecfeddb42

please check it out and see if we can implement -- all questions should be posted here

jb4earth commented 2 years ago

the above code is not an exact duplicate of what we need to do - of course we will need to use the actual logged in address and the actual selected NFTs

@pawanlapits @dave-16 please do not hesitate to ask questions. if you want to speak direct to the smart contract engineer send me your discord usernames and I'll connect you

pawanlapits commented 2 years ago

@jb4earth can we use web3 js https://web3js.readthedocs.io/en/v1.7.4/

jb4earth commented 2 years ago

@pawanlapits absolutely -- whatever gets the job done

jb4earth commented 2 years ago

@pawanlapits @dave-16

working smart contract call here: https://gist.github.com/jb4earth/01d9bb15b4369f4b1d098bf3ce75f38f

let's get this going today - we can't wait another week to get this done.

pawanlapits commented 2 years ago

Hi @jb4earth

I will try to get it done by tomorrow. please let me know if you are ok with it.

jb4earth commented 2 years ago

branch dev2 has the most advanced version of the project

issues -- testing on web in Rinkeby is impossible approveAll shown even if transaction already occured on blockchain (check state of ApproveAll) number of nfts staked not shown $NOVA reward not shown [check smart contract UML for functions to check the above values]

jb4earth commented 2 years ago

I am creating separate issues for all of these @pawanlapits and @dave-16 please claim issues as you are ready to writing code for them

jb4earth commented 2 years ago

this thread will be closed shortly in favor of issues #16 #17 #18 #19 #20

jb4earth commented 2 years ago

merged to dev