StatusContribution: Remove SGT contribution period

Fixes #62
This commit is contained in:
nfnty 2017-06-13 15:15:43 +02:00
parent aa027c9dc0
commit 139c5c6291
No known key found for this signature in database
GPG Key ID: 32DD96A5D0370907
3 changed files with 0 additions and 42 deletions

View File

@ -44,8 +44,6 @@ contract StatusContribution is Owned, TokenController {
MiniMeToken public SNT;
uint256 public startBlock;
uint256 public endBlock;
uint256 public sgtPreferenceBlocks;
uint256 public sgtLimit;
address public destEthDevs;
@ -59,7 +57,6 @@ contract StatusContribution is Owned, TokenController {
mapping (address => uint256) public guaranteedBuyersLimit;
mapping (address => uint256) public guaranteedBuyersBought;
mapping (address => uint256) public sgtContributed;
uint256 public totalGuaranteedCollected;
uint256 public totalNormalCollected;
@ -103,8 +100,6 @@ contract StatusContribution is Owned, TokenController {
address _sntAddress,
uint256 _startBlock,
uint256 _endBlock,
uint256 _sgtPreferenceBlocks,
uint256 _sgtLimit,
address _dynamicCeiling,
address _destEthDevs,
@ -131,9 +126,6 @@ contract StatusContribution is Owned, TokenController {
startBlock = _startBlock;
endBlock = _endBlock;
sgtLimit = _sgtLimit;
sgtPreferenceBlocks = _sgtPreferenceBlocks;
if (_dynamicCeiling == 0x0) throw;
dynamicCeiling = DynamicCeiling(_dynamicCeiling);
@ -220,14 +212,6 @@ contract StatusContribution is Owned, TokenController {
toFund = toCollect;
}
if (getBlockNumber() < startBlock + sgtPreferenceBlocks) {
if (SGT.balanceOf(_th) == 0) throw;
if (sgtContributed[_th].add(toFund) > sgtLimit) {
toFund = sgtLimit.sub(sgtContributed[_th]);
}
sgtContributed[_th] = sgtContributed[_th].add(toFund);
}
totalNormalCollected = totalNormalCollected.add(toFund);
doBuy(_th, toFund, false);
}

View File

@ -38,8 +38,6 @@ contract("StatusContribution", (accounts) => {
];
const startBlock = 1000000;
const endBlock = 1003000;
const sgtPreferenceBlocks = 2000;
const sgtLimit = web3.toWei(0.1);
it("Should deploy Contribution contracts", async () => {
multisigStatus = await MultiSigWallet.new([accounts[0]], 1);
@ -78,8 +76,6 @@ contract("StatusContribution", (accounts) => {
snt.address,
startBlock,
endBlock,
sgtPreferenceBlocks,
sgtLimit,
dynamicCeiling.address,
contributionWallet.address,

View File

@ -38,9 +38,7 @@ contract("StatusContribution", (accounts) => {
[web3.toWei(15)],
];
const startBlock = 1000000;
const sgtPreferenceBlocks = 2000;
const endBlock = 1030000;
const sgtLimit = web3.toWei(0.1);
it("Should deploy Contribution contracts", async () => {
multisigStatus = await MultiSigWallet.new([accounts[0]], 1);
@ -80,8 +78,6 @@ contract("StatusContribution", (accounts) => {
snt.address,
startBlock,
endBlock,
sgtPreferenceBlocks,
sgtLimit,
dynamicCeiling.address,
contributionWallet.address,
@ -142,24 +138,6 @@ contract("StatusContribution", (accounts) => {
assert.equal(web3.fromWei(balance).toNumber(), b * 10000);
});
it("Should not allow transfers of no SGT holders in the SGT preference period", async () => {
try {
await snt.sendTransaction({value: web3.toWei(1), gas: 300000, gasPrice: "20000000000", from: accounts[1]});
throw new Error("Not throwed");
} catch (error) {
assertFail(error);
}
});
it("Should not allow exceed sgtLimit", async () => {
try {
await snt.sendTransaction({value: web3.toWei(1), gas: 300000, gasPrice: "20000000000", from: accounts[0]});
throw new Error("Not throwed");
} catch (error) {
assertFail(error);
}
});
it("Should return the remaining in the last transaction ", async () => {
await statusContribution.setMockedBlockNumber(1005000);
const initialBalance = await web3.eth.getBalance(accounts[0]);