Closed mohammadranjbarz closed 23 hours ago
This is where on the UI we can give permission to a specified ETH address to have minting privileges for $nice
I will ask amin the process for securely generating a new account we can use for minting from the impact-graph
Generally, we have two ways Hold the key in our application and do the transactions! less research and hard to maintenance!! Relying on a third-party service which I am not sure will work for us, but it's worth giving it a shot
These third-party services may help https://www.openzeppelin.com/defender https://docs.gelato.network/introduction/what-is-gelato
Defender Relay service seems to be right up to our alley https://docs.openzeppelin.com/defender/relay
Defender Relay service seems to be right up to our alley https://docs.openzeppelin.com/defender/relay
Also supports all networks we use
Openzeppelin Defender Relay has a webhook trigger that enables us to send transaction and monitor it. It has versatile features like replacing/rejecting blocked transactions and tracking the state of a sent transaction. Gelato hasn't implemented the webhook feature yet
Coming back around to this feature. I tested out OP Defender and managed to setup a relayer instance in the dapp and make a local call to the relayer which then minted a token to a specified address using an aragon DAO token-manager. You can check it out here: https://github.com/divine-comedian/defender-autotask-examples/blob/master/typescript/src/index.ts#L11
I think we can implement this without too much headache. @jainkrati maybe this is a good issue for training some devs who are interested in BE work.
Currently in the dapp when a user donates to the giveth project on giveth in stablecoins (USDC, DAI, USDT etc..) we give them $nice tokens - these $nice tokens are used to buy swag from our shop and are an extra thank you for donating stable tokens. $nice tokens are minted at a rate of 1:1 per stable donated to Giveth.
However this is done manually every 2 weeks according to GIVbacks rounds and collecting the list of eligible receipients, making the votes to send the tokens etc.. all of it is done manually! So the idea here is that we could do it automatically using a service like OP Defender which can recevier HTTPS requests and make authenticated calls and trigger smart contract interactions from an EOA relayer address that Open Zeppelin facilitates our control over.
In order to make this happen we would need to:
then on donation of eligible stable tokens:
from there the relayer forwards the callData to aragon DAO and mints the $nice tokens to the donor on gnosis chain
we would also need to keep an eye on the relayer's balance since I think we do have to top it up manually with gas
Well @RamRamez is all set with his BE skills and can take this up for progressing along the learning curve!!
Now givback-calculation get donations data, and @divine-comedian fetchs data from that and distribute/mint $nice tokens for donors, but we would move it to impact-graph
If a donation to the giveth project is made in certain stablecoins - once it is confirmed we mint automatically the tokens
I need to know how to call smart contract function for this purpose (@divine-comedian would setup an address that we can give the minter permission to) then pass the private key to the impact-graph and allow it to call mint for the $nice token