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.
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.