wighawag / singleton-1776-meta-transaction

A Singleton MetaTx Processor using EIP-1776 that support all ERC20 tokens
17 stars 4 forks source link

Instructions on how to use #1

Open fvictorio opened 4 years ago

fvictorio commented 4 years ago

Hi, are there some docs (or maybe a tutorial somewhere) on how to build on top of this? Thanks!

wighawag commented 4 years ago

Hi, sorry for the late reply. I don't have any documentation yet except for the EIP : https://github.com/ethereum/EIPs/issues/1776

But currently to try it out you can see the contract example that receive EIP-1776 metatx here : https://github.com/wighawag/singleton-1776-meta-transaction/blob/master/contracts/src/Test/NumberSale.sol

As for relayer, you can see some code here to execute the tx : https://github.com/wighawag/singleton-1776-meta-transaction/blob/dda23ec90b2bdb6fcdabbfc49bc3679a79f86878/webapp/src/routes/index.svelte#L331

Hope that helps. But I ll leave the issue open and once I get some time, I ll try to write documentation or maybe even a tutorial about it. What kind of perspective are you interested in ? Someone that want to make a contract to receive native meta tx?

fvictorio commented 4 years ago

Awesome, thank you!

What kind of perspective are you interested in ? Someone that want to make a contract to receive native meta tx?

Yeah, I think that should work, a sort of "how to build a contract with support for meta transactions".