OpenZeppelin / openzeppelin-gsn-helpers

Test and development helper methods and scripts for GSN
MIT License
21 stars 16 forks source link

Funding recipient only works on Ganache #19

Open EnchanterIO opened 5 years ago

EnchanterIO commented 5 years ago

Hey OZ team,

I would suggest to remove this hardcoded dependency from Ganache:

https://github.com/OpenZeppelin/openzeppelin-gsn-helpers/blob/master/src/fund.js#L10

Would be better if the oz fund cmd would accept a new parameter called "relayHub", aside of "recipient", otherwise the funding script "succeeds visually" but a recipient is funded in a wrong, default hub: "0xd216153c06e857cd7f72665e0af1d7d82172f494".

starter-kit-gsn-works $npx oz-gsn fund-recipient --recipient 0xC8882EfBdf54eFaAE2095e472680b22994a9Bb9f

Recipient 0xC8882EfBdf54eFaAE2095e472680b22994a9Bb9f balance is now 1000000000000000000 wei

This is painful when setting it up with a custom network. Atm I had to modify the JS script or change the value in src/data.js.relayHub.address

nventuro commented 5 years ago

Interesting! Given that there's a single Hub, we didn't see much reason to expose this, but it wouldn't be too hard.

May I ask why you chose to change the deployment scheme and end up with RelayHub in a non-standard address, instead of using the deploy-relay-hub script, which results in the default one?

Thanks!