Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save monperrus/cfe3a758774d5b424caae6579fdafaf5 to your computer and use it in GitHub Desktop.
Save monperrus/cfe3a758774d5b424caae6579fdafaf5 to your computer and use it in GitHub Desktop.
etherscan data of 0x3fb60ad76992222e540200f1d514509845a1d195.txt
>>>>>>creator_addr:
0x5f40c0104527c79ac98281acc8b3901d62f941c2
>>>>>>creator_trans_hash:
0xe1f43b4c16e93776ddba47b9e44eb490d47ff7efbc11bd3628b9f2c8952adca8
>>>>>>contract_name:
Contributor
>>>>>>compiler_version:
v0.4.15+commit.bbb8e64f
>>>>>>optimization_options:
Yes with 200 runs
>>>>>>evm_version:
default
>>>>>>contract_license:
None
>>>>>>source code:
/**
*Submitted for verification at Etherscan.io on 2018-06-03
*/
pragma solidity ^0.4.15;
contract Contributor {
//=================Variables================
bool isInitiated = false;
//Addresses
address creatorAddress;
address contributorAddress;
address marketplaceAddress;
//State
string name;
uint creationTime;
bool isRepudiated = false;
//Publications
enum ExtensionType {MODULE, THEME}
struct Extension {
string name;
string version;
ExtensionType extType;
string moduleKey;
}
mapping (string => Extension) private publications;
//Modifiers
modifier onlyBy(address _account) {
require(msg.sender == _account);
_;
}
//Events
event newExtensionPublished (string _name, string _hash, string _version, ExtensionType _type, string _moduleKey);
//=================Transactions================
//Constructor
function Contributor(string _name, address _contributorAddress, address _marketplaceAddress) {
creatorAddress = msg.sender;
contributorAddress = _contributorAddress;
marketplaceAddress = _marketplaceAddress;
creationTime = now;
name = _name;
isInitiated = true;
}
//Publish a new extension in structure
function publishExtension(string _hash, string _name, string _version, ExtensionType _type, string _moduleKey)
onlyBy(creatorAddress) {
publications[_hash] = Extension(_name, _version, _type, _moduleKey);
newExtensionPublished(_name, _hash, _version, _type, _moduleKey);
}
//=================Calls================
//Check if the contract is initialised
function getInitiated() constant returns (bool) {
return isInitiated;
}
//Return basic information about the contract
function getInfos() constant returns (address, string, uint) {
return (creatorAddress, name, creationTime);
}
//Return information about a module
function getExtensionPublication(string _hash) constant returns (string, string, ExtensionType) {
return (publications[_hash].name, publications[_hash].version, publications[_hash].extType);
}
function haveExtension(string _hash) constant returns (bool) {
bool result = true;
if (bytes(publications[_hash].name).length == 0) {
result = false;
}
return result;
}
}
>>>>>>contract abi:
[{"constant":true,"inputs":[{"name":"_hash","type":"string"}],"name":"getExtensionPublication","outputs":[{"name":"","type":"string"},{"name":"","type":"string"},{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getInfos","outputs":[{"name":"","type":"address"},{"name":"","type":"string"},{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_hash","type":"string"},{"name":"_name","type":"string"},{"name":"_version","type":"string"},{"name":"_type","type":"uint8"},{"name":"_moduleKey","type":"string"}],"name":"publishExtension","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getInitiated","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_hash","type":"string"}],"name":"haveExtension","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"inputs":[{"name":"_name","type":"string"},{"name":"_contributorAddress","type":"address"},{"name":"_marketplaceAddress","type":"address"}],"payable":false,"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_name","type":"string"},{"indexed":false,"name":"_hash","type":"string"},{"indexed":false,"name":"_version","type":"string"},{"indexed":false,"name":"_type","type":"uint8"},{"indexed":false,"name":"_moduleKey","type":"string"}],"name":"newExtensionPublished","type":"event"}]
>>>>>>contract creation code:
60606040526000805460ff19908116909155600580549091169055341561002557600080fd5b604051610da8380380610da883398101604052808051820191906020018051919060200180519150505b60008054600160a060020a033381166101000261010060a860020a03199092169190911790915560018054848316600160a060020a03199182161790915560028054928416929091169190911790554260045560038380516100b59291602001906100cc565b506000805460ff191660011790555b50505061016c565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010d57805160ff191683800117855561013a565b8280016001018555821561013a579182015b8281111561013a57825182559160200191906001019061011f565b5b5061014792915061014b565b5090565b61016991905b808211156101475760008155600101610151565b5090565b90565b610c2d8061017b6000396000f300606060405263ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663382008018114610069578063643d6dc0146101b2578063d33ef3a114610262578063f9a2916f14610387578063fa6e5776146103ae575b600080fd5b341561007457600080fd5b6100ba60046024813581810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061041395505050505050565b6040518080602001806020018460018111156100d257fe5b60ff168152602001838103835286818151815260200191508051906020019080838360005b838110156101105780820151818401525b6020016100f7565b50505050905090810190601f16801561013d5780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b838110156101745780820151818401525b60200161015b565b50505050905090810190601f1680156101a15780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b34156101bd57600080fd5b6101c56106ac565b60405173ffffffffffffffffffffffffffffffffffffffff841681526040810182905260606020820181815290820184818151815260200191508051906020019080838360005b838110156102255780820151818401525b60200161020c565b50505050905090810190601f1680156102525780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b341561026d57600080fd5b61038560046024813581810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284378201915050505050509190803590602001908201803590602001908080601f01602080910402602001604051908101604052818152929190602084018383808284378201915050505050509190803590602001908201803590602001908080601f01602080910402602001604051908101604052818152929190602084018383808284378201915050505050509190803560ff1690602001909190803590602001908201803590602001908080601f01602080910402602001604051908101604052818152929190602084018383808284375094965061078795505050505050565b005b341561039257600080fd5b61039a610ab2565b604051901515815260200160405180910390f35b34156103b957600080fd5b61039a60046024813581810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650610abc95505050505050565b604051901515815260200160405180910390f35b61041b610b4f565b610423610b4f565b60006006846040518082805190602001908083835b6020831061045857805182525b601f199092019160209182019101610438565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040519081900390206006856040518082805190602001908083835b602083106104bf57805182525b601f19909201916020918201910161049f565b6001836020036101000a03801982511681845116808217855250505050505090500191505090815260200160405180910390206001016006866040518082805190602001908083835b6020831061052857805182525b601f199092019160209182019101610508565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051908190039020600290810154835460ff9091169184916000196001821615610100020116046020601f820181900481020160405190810160405280929190818152602001828054600181600116156101000203166002900480156105fb5780601f106105d0576101008083540402835291602001916105fb565b820191906000526020600020905b8154815290600101906020018083116105de57829003601f168201915b50505050509250818054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106975780601f1061066c57610100808354040283529160200191610697565b820191906000526020600020905b81548152906001019060200180831161067a57829003601f168201915b505050505091509250925092505b9193909250565b60006106b6610b4f565b60008060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff166003600454818054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107745780601f1061074957610100808354040283529160200191610774565b820191906000526020600020905b81548152906001019060200180831161075757829003601f168201915b505050505091509250925092505b909192565b60005473ffffffffffffffffffffffffffffffffffffffff610100909104811690331681146107b557600080fd5b6080604051908101604052808681526020018581526020018460018111156107d957fe5b81526020018390526006876040518082805190602001908083835b6020831061081457805182525b601f1990920191602091820191016107f4565b6001836020036101000a03801982511681845116808217855250505050505090500191505090815260200160405190819003902081518190805161085c929160200190610b61565b50602082015181600101908051610877929160200190610b61565b50604082015160028201805460ff19166001838181111561089457fe5b02179055506060820151816003019080516108b3929160200190610b61565b509050507fb73879b9b9048a207d16d382d9b536047473fea4a84b72831a2e3fefcaf90e458587868686604051808060200180602001806020018660018111156108f957fe5b60ff1681526020018060200185810385528a818151815260200191508051906020019080838360005b8381101561093b5780820151818401525b602001610922565b50505050905090810190601f1680156109685780820380516001836020036101000a031916815260200191505b50858103845289818151815260200191508051906020019080838360005b8381101561099f5780820151818401525b602001610986565b50505050905090810190601f1680156109cc5780820380516001836020036101000a031916815260200191505b50858103835288818151815260200191508051906020019080838360005b83811015610a035780820151818401525b6020016109ea565b50505050905090810190601f168015610a305780820380516001836020036101000a031916815260200191505b50858103825286818151815260200191508051906020019080838360005b83811015610a675780820151818401525b602001610a4e565b50505050905090810190601f168015610a945780820380516001836020036101000a031916815260200191505b50995050505050505050505060405180910390a15b5b505050505050565b60005460ff165b90565b600060016006836040518082805190602001908083835b60208310610af357805182525b601f199092019160209182019101610ad3565b6001836020036101000a03801982511681845116808217855250505050505090500191505090815260200160405190819003902054600260001961010060018416150201909116041515610b45575060005b8091505b50919050565b60206040519081016040526000815290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610ba257805160ff1916838001178555610bcf565b82800160010185558215610bcf579182015b82811115610bcf578251825591602001919060010190610bb4565b5b50610bdc929150610be0565b5090565b610ab991905b80821115610bdc5760008155600101610be6565b5090565b905600a165627a7a72305820eda3db96521a0a48441e1aa14eeb0a0e3f93bc657056159c56ea662f70a673aa0029000000000000000000000000000000000000000000000000000000000000006000000000000000000000000024ca4de04f3ec79296742139589b4f9a9892e1ec0000000000000000000000005f40c0104527c79ac98281acc8b3901d62f941c200000000000000000000000000000000000000000000000000000000000000206534313633613833303637623936393735336230313830353536626361643962
>>>>>>swarm source:
bzzr://eda3db96521a0a48441e1aa14eeb0a0e3f93bc657056159c56ea662f70a673aa
>>>>>>address:
0x3fb60ad76992222e540200f1d514509845a1d195
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment