Verified contractPartial
Crowdsign
Address0xd39130d30394bda1149c6c13c70fb75bae8a046f
- Balance
0.002 ETH
- Transactions
4
- Compiler
solc 0.1.7
- Same code
1 more contract
Details
- Compiler
- solc 0.1.7+commit.b4e666cc
- Language
- solidity
- Optimization
- No
- License
- Not stated
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 587,248
- Creation transaction
- 0x1b7541f302…b195c14d90
Crowdsign.sol
// Recovered by EthereumHistory (ethereumhistory.com) -sw
contract Crowdsign {
struct Document {
string text;
address[] signers;
bool executed;
}
struct Token {
string name;
string symbol;
uint8 decimals;
}
struct Funder {
address addr;
}
Document public document;
Token public token;
Funder[] public funders;
uint public amountRaised;
uint public fundingGoal;
address public chairperson;
address public ownAddress;
mapping (address => bool) public canSign;
mapping (address => bool) public signed;
function Crowdsign(string _text, address[] _signers) {
address creator = msg.sender;
chairperson = creator;
ownAddress = this;
document.text = _text;
document.signers = _signers;
document.executed = false;
fundingGoal = _signers.length;
token.name = _text;
token.symbol = "My";
token.decimals = 0;
}
function() {
address sender = msg.sender;
bool allowed = canSign[msg.sender];
if (canSign[msg.sender]) {
signed[msg.sender] = true;
funders[funders.length++] = Funder({addr: sender});
if (executeDoc()) document.executed = true;
}
if (sender == chairperson) {
for (uint i = 0; i < document.signers.length; ++i) {
canSign[document.signers[i]] = true;
document.signers[i].send(6 finney);
}
}
}
function executeDoc() returns (bool) {
if (funders.length < document.signers.length) return false;
return true;
}
}
Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": false
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.