AENS Marketpace example (Sophia/Python)

Here is another take at the example showcased by the Elixir team for an AENS Marketplace.

In this case the example is built using Sophia to keep the state of the marketplace while the Python SDK is used to interact with the contract and buy/sell the names.

In this case we use transaction delegation to allow the contract to transfer names on behalf of the caller.

The example contract supports also selling a name directly to an account or openly put a name for sale and also selling the whole marketplace to another merchant.

Here is a short video displaying the interaction via command line interface:
asciicast

For the source code check the github repo.

EDIT: there are some updates on the repo, it nows includes the configuration to run a local node to run the demo locally

7 Likes

in case there is an active offer for a name which - in the meantime - expired. then the name would be in the revoked state, right?

what do you think would then be the best way to clean up the contract from the corrupt state? I guess delist and other AENS relatec contract functions would always fail.

currently there is no way to get the expiration height of the name (it has been suggested though),
so this case is not properly handled.
Probably the best would be to have a force delist that removes the name from the state even if the transfer transaction fails, but my idea was to wait until I could test the expiration of the name and update the contract by then.

thanks for answering quickly I commented the issue because additionally it should - at least IMO - be possible to query the current owner of an AENS. the block to expire alone is not sufficient to build a reliable marketplace.

I think you have a typo (contract should be name) :slight_smile: