Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Research on reward distrbution #1816

Open
Raj6939 opened this issue Nov 30, 2022 · 0 comments
Open

Research on reward distrbution #1816

Raj6939 opened this issue Nov 30, 2022 · 0 comments

Comments

@Raj6939
Copy link
Collaborator

Raj6939 commented Nov 30, 2022

  • Admin can create distribution to winners he has selected.
  • Distribution through Smart contracts in two ways
  1. He can create tokens ie(erc20,erc721,eth) by deploying smart contract from Fyre
  2. If he has smart contract already then he can enter contract address in the UI and on his behalf we call approve function to his contract
    -> For the 2 one is if contract is ERC721 token then in ERC721 standard we have setApprovalForAll so that we can easily pass list of userAddress with the amount of tokenId (Ex 0x68E6ecaAe37F9a780B9A337ec9D88768c0425A4d,2) like this.
    -> But For ERC20 there is No Standard function like setApprovalForAll. there is only approve function which accepts only one address and one value (Ex 0x68E6ecaAe37F9a780B9A337ec9D88768c0425A4d, no of tokens), so for that, we have to make another custom smart contract which can take multiple addresses. Now this custom smart contract gets approval from the admin's contract and we can complete a transaction in a single go!
  • Flow diagram
    image

  • If we integrate this on our own then UI would look like this

Image

================================OR===============================================================
We can USE Multisender app

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant