Skip to content

Commit

Permalink
Adding Campaign + Test
Browse files Browse the repository at this point in the history
  • Loading branch information
sirmikecarter committed Aug 21, 2017
1 parent 7646645 commit 2e885f5
Show file tree
Hide file tree
Showing 7 changed files with 553 additions and 3 deletions.
285 changes: 285 additions & 0 deletions build/contracts/Campaign.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,285 @@
{
"contract_name": "Campaign",
"abi": [
{
"constant": true,
"inputs": [
{
"name": "",
"type": "uint256"
}
],
"name": "funderStructs",
"outputs": [
{
"name": "funder",
"type": "address"
},
{
"name": "amount",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "isSuccess",
"outputs": [
{
"name": "isIndeed",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "refundsSent",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "deadline",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "goal",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "fundsRaised",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "hasFailed",
"outputs": [
{
"name": "hasIndeed",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "widthdrawFunds",
"outputs": [
{
"name": "success",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "owner",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "sendMeFunds",
"outputs": [
{
"name": "success",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "contribute",
"outputs": [
{
"name": "success",
"type": "bool"
}
],
"payable": true,
"type": "function"
},
{
"inputs": [
{
"name": "campaignDuration",
"type": "uint256"
},
{
"name": "campaignGoal",
"type": "uint256"
}
],
"payable": false,
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "sender",
"type": "address"
},
{
"indexed": false,
"name": "amount",
"type": "uint256"
}
],
"name": "LogContribution",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "funder",
"type": "address"
},
{
"indexed": false,
"name": "amount",
"type": "uint256"
}
],
"name": "LogRefundSent",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "beneficiary",
"type": "address"
},
{
"indexed": false,
"name": "amount",
"type": "uint256"
}
],
"name": "LogWithdrawal",
"type": "event"
}
],
"unlinked_binary": "0x6060604052341561000f57600080fd5b60405160408061073b83398101604052808051919060200180519150505b60008054600160a060020a03191633600160a060020a031617905543820160015560028190555b50505b6106d5806100666000396000f300606060405236156100935763ffffffff60e060020a60003504166302c0602381146100985780630b6c754b146100d0578063158c9875146100f757806329dcb0cf1461011e57806340193883146101435780636681b9fd14610168578063708b1fed1461018d5780637f2e6bd7146101b45780638da5cb5b146101db578063b7b91cae1461020a578063d7bb99ba14610231575b600080fd5b34156100a357600080fd5b6100ae60043561024d565b604051600160a060020a03909216825260208201526040908101905180910390f35b34156100db57600080fd5b6100e3610285565b604051901515815260200160405180910390f35b341561010257600080fd5b6100e3610291565b604051901515815260200160405180910390f35b341561012957600080fd5b61013161029a565b60405190815260200160405180910390f35b341561014e57600080fd5b6101316102a0565b60405190815260200160405180910390f35b341561017357600080fd5b6101316102a6565b60405190815260200160405180910390f35b341561019857600080fd5b6100e36102ac565b604051901515815260200160405180910390f35b34156101bf57600080fd5b6100e36102c8565b604051901515815260200160405180910390f35b34156101e657600080fd5b6101ee61038c565b604051600160a060020a03909116815260200160405180910390f35b341561021557600080fd5b6100e361039b565b604051901515815260200160405180910390f35b6100e361051f565b604051901515815260200160405180910390f35b600580548290811061025b57fe5b906000526020600020906002020160005b508054600190910154600160a060020a03909116915082565b60025460035410155b90565b60045460ff1681565b60015481565b60025481565b60035481565b60006002546003541080156102c2575060015443115b90505b90565b60008054819033600160a060020a039081169116146102e657600080fd5b6102ee610285565b15156102f957600080fd5b50600054600160a060020a0330811631911681156108fc0282604051600060405180830381858888f19350505050151561033257600080fd5b6000547fb4214c8c54fc7442f36d3682f59aebaf09358a4431835b30efb29d52cf9e1e9190600160a060020a031682604051600160a060020a03909216825260208201526040908101905180910390a1600191505b5b5090565b600054600160a060020a031681565b600080548190819033600160a060020a039081169116146103bb57600080fd5b60045460ff16156103cb57600080fd5b6103d36102ac565b15156103de57600080fd5b505060055460005b818110156105065760058054829081106103fc57fe5b906000526020600020906002020160005b505460058054600160a060020a03909216916108fc91908490811061042e57fe5b906000526020600020906002020160005b50600101549081150290604051600060405180830381858888f19350505050151561046957600080fd5b7fdd896e09a507baf21c108627cf41469f315fb779fe323f5e1c6154fd5d869e6960058281548110151561049957fe5b906000526020600020906002020160005b505460058054600160a060020a0390921691849081106104c657fe5b906000526020600020906002020160005b5060010154604051600160a060020a03909216825260208201526040908101905180910390a15b6001016103e6565b6004805460ff1916600190811790915592505b5b505090565b600061052961062e565b60005433600160a060020a0390811691161461054457600080fd5b34151561055057600080fd5b610558610285565b1561056257600080fd5b61056a6102ac565b1561057457600080fd5b6003805434908101909155600160a060020a0333168252602082015260058054600181016105a28382610645565b916000526020600020906002020160005b50829081518154600160a060020a031916600160a060020a0391909116178155602082015181600101555050507f370510fa7e8c74204b8d2fd52b7a0837e535ea0c1491fd4e13730ce825e405243334604051600160a060020a03909216825260208201526040908101905180910390a1600191505b5b5090565b604080519081016040526000808252602082015290565b815481835581811511610671576002028160020283600052602060002091820191016106719190610677565b5b505050565b61028e91905b80821115610387578054600160a060020a03191681556000600182015560020161067d565b5090565b905600a165627a7a723058204f14e48894b1c102c252cb615e6ea5204920c4ad440015e7746f17beb647a0700029",
"networks": {
"1503344289293": {
"events": {
"0x370510fa7e8c74204b8d2fd52b7a0837e535ea0c1491fd4e13730ce825e40524": {
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "sender",
"type": "address"
},
{
"indexed": false,
"name": "amount",
"type": "uint256"
}
],
"name": "LogContribution",
"type": "event"
},
"0xdd896e09a507baf21c108627cf41469f315fb779fe323f5e1c6154fd5d869e69": {
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "funder",
"type": "address"
},
{
"indexed": false,
"name": "amount",
"type": "uint256"
}
],
"name": "LogRefundSent",
"type": "event"
},
"0xb4214c8c54fc7442f36d3682f59aebaf09358a4431835b30efb29d52cf9e1e91": {
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "beneficiary",
"type": "address"
},
{
"indexed": false,
"name": "amount",
"type": "uint256"
}
],
"name": "LogWithdrawal",
"type": "event"
}
},
"links": {},
"address": "0x2bc7e06d8f39ab35ad4d3ce8f4ebd7ffd8fbbdff",
"updated_at": 1503344322171
}
},
"schema_version": "0.0.5",
"updated_at": 1503344322171
}
14 changes: 13 additions & 1 deletion build/contracts/Migrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,20 @@
"links": {},
"address": "0x5253e813a9ccebfe788ec68702e94a6d949c6c11",
"updated_at": 1503280788978
},
"1503331253724": {
"events": {},
"links": {},
"address": "0xeac28c02bfc9d2752382f8d6d56d732000969599",
"updated_at": 1503331352619
},
"1503344289293": {
"events": {},
"links": {},
"address": "0xcbcb2baa26c63c5dc4f73e3b5e01eaeb51cea053",
"updated_at": 1503344322193
}
},
"schema_version": "0.0.5",
"updated_at": 1503280788978
"updated_at": 1503344322193
}
60 changes: 59 additions & 1 deletion build/contracts/Remittance.json
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,66 @@
"links": {},
"address": "0x531c1be79e10525cf2729549bf70eb4f4c9d5277",
"updated_at": 1503280788971
},
"1503331253724": {
"events": {
"0xbc2674b1c231352f5fe99c10d8db7182a2c0c857f496f1157968bdcbdb52bf3d": {
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "msgSender",
"type": "address"
},
{
"indexed": false,
"name": "recieverAddress",
"type": "address"
},
{
"indexed": false,
"name": "contractAmount",
"type": "uint256"
}
],
"name": "LogExchange",
"type": "event"
}
},
"links": {},
"address": "0x38488b50098718292ee6202ee345a7d623fef07e",
"updated_at": 1503331352609
},
"1503344289293": {
"events": {
"0xbc2674b1c231352f5fe99c10d8db7182a2c0c857f496f1157968bdcbdb52bf3d": {
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "msgSender",
"type": "address"
},
{
"indexed": false,
"name": "recieverAddress",
"type": "address"
},
{
"indexed": false,
"name": "contractAmount",
"type": "uint256"
}
],
"name": "LogExchange",
"type": "event"
}
},
"links": {},
"address": "0x539f80bd726c1815c82135dfbab03cf457c6c003",
"updated_at": 1503344322162
}
},
"schema_version": "0.0.5",
"updated_at": 1503280788971
"updated_at": 1503344322162
}
Loading

0 comments on commit 2e885f5

Please sign in to comment.