1

data domains[](owner, ip) # list

Source video:

Devcon 2

1

The example is in Serpent.

data domains[](owner, ip)

def register(addr):
   if not self.domains[addr].owner:
      self.domains[addr].owner = msg.sender

The keyword data declares a variable with persistant storage. In the example it is declaring an array of tupples, each tupple has two members owner and ip.

For more info check the A Programmer's Guide to Ethereum and Serpent.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.