Skip to content
This repository has been archived by the owner on Dec 31, 2024. It is now read-only.

Donate without Registering through MyEtherWallet, MyCrypto #145

Closed
satyavh opened this issue Nov 16, 2017 · 10 comments
Closed

Donate without Registering through MyEtherWallet, MyCrypto #145

satyavh opened this issue Nov 16, 2017 · 10 comments
Assignees

Comments

@satyavh
Copy link
Contributor

satyavh commented Nov 16, 2017

Add functionality to the Donate button which would give you an option to donate through MyEtherWallet (just like on our website). The smart contracts need to be altered as well to allow donations from un-registered users.

@satyavh satyavh assigned satyavh and unassigned satyavh Nov 16, 2017
@ewingrj
Copy link
Contributor

ewingrj commented Nov 16, 2017

need pass data to mew so the tx calls the donate method on the liquidPledging contract with idGiver = 0 and idReceiver = dac/campaign/milestone id.

@satyavh
Copy link
Contributor Author

satyavh commented Nov 22, 2017

Soooo what would be the contract address? And the gas limit?

https://www.myetherwallet.com/?to=0x5ADF43DD006c6C36506e2b2DFA352E60002d22Dc&gaslimit=23000&idGiver=0&idReciever=0CtaM8eIQWeSz1Ed#donate

@ewingrj
Copy link
Contributor

ewingrj commented Nov 22, 2017

contract address can be found w/

getNetwork().then(network => network.liquidPledgingAddress)

gaslimit should be 550000

for dacs: idReceiver = dac.delegateId
for campaign/milestone: idReceiver = (campaign/milestone).projectId

@satyavh satyavh self-assigned this Nov 22, 2017
@satyavh
Copy link
Contributor Author

satyavh commented Nov 22, 2017

Can I pass the amount as well?

satyavh added a commit that referenced this issue Nov 22, 2017
@ewingrj
Copy link
Contributor

ewingrj commented Nov 23, 2017

this doesn't work.

you'll need to call the donate method on the contract. however I'm only taken to the mew send-tx page w/o any data pre-filled.

I'm not sure if you can redirect to the mew contracts page, and pre-fill the data. That would be ideal, as it is a bit scary as a user to have a random looking hex string pre-filled in the data. that string could be anything.

If not, you'll need to generate the data string for the lp.donate method.

another option would be to update each plugin's fallback method to forward to the lp contract. This would allow us to use the send-tx page on mew and just specify the gas & amount. This might be the ideal solution now that every dac/campaign/milestone will have their own plugin contract. They could also use the plugin contract as a donation address.

@ewingrj ewingrj reopened this Nov 23, 2017
@vojtechsimetka
Copy link
Collaborator

Oh right, sorry did not know about the data part, should have tested it all the way. There is definitely a way to put the donation data but still redirect.

What needs to go in the data field?

@vojtechsimetka
Copy link
Collaborator

What needs to be in the data field?

the URL param is data but requires already encoded data string.

@vojtechsimetka
Copy link
Collaborator

Ideas:

  • Send money to just a wallet that calls the donate method on LP.
  • Fallback method on LPP.
  • Having a proxy contract with button to sent the money from the contract and generate tokens.

@ewingrj
Copy link
Contributor

ewingrj commented Nov 29, 2017

the data would need to be generated depending on the dac/campaign/milestone.

I'll update this once I add the fallback method to the plugins, as we may not need the data field for dacs & campaigns, but I need to test if mew will estimateGas correctly

@ewingrj ewingrj self-assigned this Nov 29, 2017
@ewingrj ewingrj reopened this Dec 11, 2017
@vojtechsimetka vojtechsimetka changed the title Donate without Registering through MyEtherWallet Donate without Registering through MyEtherWallet, MyCrypto May 3, 2018
@ewingrj
Copy link
Contributor

ewingrj commented Jul 2, 2018

Just an update...

Because of the bridging situation now, this will need to be a contract deployed on the mainnet for each dac/campaign that can forward to the bridge the correct data. It probably isn't worth the cost of deploying a contract for any milestones.

The idea is that the adminId will be set on the mainnet contract. It will have a fallback function that forwards to the bridge if enough gas is provided, otherwise, just collects the funds. At anytime, someone can trigger any funds the contract holds to be sent to the bridge.

This will probably use the delegate proxy pattern to save on deployment costs. Possibly make this an AragonApp as the kernel functionality would be useful to store the current bridge instance to make upgrading the bridge pointer easy for all deployed proxies.

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

No branches or pull requests

3 participants