district0x / name-bazaar

A peer-to-peer marketplace for the exchange of names registered via the Ethereum Name Service
Eclipse Public License 1.0
86 stars 23 forks source link

One tx offering setup #186

Closed ladislavdubravsky closed 3 years ago

ladislavdubravsky commented 3 years ago

resolves #177

For .eth subdomains (i.e. top level domains) it's possible to create offering and transfer ownership into it in one transaction.

We must start with ownership transfer, as that needs the original owner's authority. We transfer onto OfferingFactory, as no offering exists yet. EthRegistrar then notifies OfferingFactory that it's receiving a token, also passing to it encoded offering parameters. With this information the OfferingFactory is able to create the offering and give it the name ownership.

We use two workarounds of web3 0.19.0 issues: it's not exposing an abi coder and has an issue with overloaded s.c. functions. The workarounds can be removed after frontend web3 upgrade.

User can still reclaim a top level name from offering and then transfer it back manually.