Here’s a simple example of a contract that is licensed under the GNU Affero General Public License:
LICENSE = ["Copyright 2014 Rhea Myers", "Licensed GNU AGPL V3+"]
SOURCE = ["https:\/\/gitorious.org\/rheaplex\/", "artworld-ethereum/"]
// Make sure we have enough gas to run the contact
if tx.value < tx.basefee * 100:
// If not, stop
stop
if msg.data[0] == "license":
return(LICENSE, 2)
else if msg.data[0] == "source":
return(SOURCE, 2)
else:
// Return false
return(0)
Assuming that being part of the blockchain doesn’t clash with the AGPL. Anyone? 🙂
Comments
One response to “Ethereum Contract Free Software Licensing”
Looks fine to me. Contracts on ethereum are indeed open state (ie, ultimately the above code will always be visible to all), not necessarily open source (ie, in the absence of a license, default copyright laws apply).