-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
57 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
pragma solidity ^0.4.15; | ||
|
||
import "../marketJob/MarketJob.sol"; | ||
|
||
contract AgentInterface { | ||
|
||
function sendPacket(address target, bytes packet) external; | ||
function appendPacket(bytes packet) external; | ||
function getPacket(uint id) external constant returns (bytes); | ||
function appendJob(address[] agents, uint[] amounts, address payer, bytes firstPacket, bytes lastPacket) external constant returns (address); | ||
function setJob(MarketJob _job) external returns (address); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
const fs = require('fs') | ||
const AgiCrowdsale = artifacts.require("AgiCrowdsale.sol") | ||
|
||
module.exports = function(deployer, network, accounts) { | ||
const startTime = web3.eth.getBlock(web3.eth.blockNumber).timestamp + 1 // one second in the future | ||
const endTime = startTime + (86400 * 20) // 20 days | ||
const rate = new web3.BigNumber(1000) | ||
const wallet = accounts[0] | ||
const goal = 8 * 1000 | ||
const cap = 10 * 1000 | ||
|
||
console.log(startTime,endTime,cap,goal,wallet) | ||
|
||
deployer.deploy( | ||
AgiCrowdsale, startTime, endTime, rate, goal, cap, wallet | ||
).then(() => { | ||
const fileName = "addresses.json" | ||
|
||
fs.readFile(fileName, (err, data) => { | ||
if (!err) { | ||
let content = JSON.parse(data.toString()) | ||
content["AgiCrowdsale"] = AgiCrowdsale.address | ||
|
||
fs.writeFile(fileName, JSON.stringify(content), 'utf-8', (err) => { | ||
if (err) { throw err } | ||
console.log("Added AgiCrowdsale to " + fileName) | ||
}) | ||
} | ||
}) | ||
}) | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters