Skip to content

Commit a4f224c

Browse files
committed
moving to solidity 0.4.24
1 parent 6cf1aca commit a4f224c

File tree

8 files changed

+17
-615
lines changed

8 files changed

+17
-615
lines changed

contracts/InviteToken.sol

Lines changed: 0 additions & 244 deletions
This file was deleted.

contracts/SPRINGToken.sol

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pragma solidity ^0.4.19;
1+
pragma solidity ^0.4.24;
22

33

44
/**
@@ -51,7 +51,7 @@ contract Ownable {
5151
*/
5252
function transferOwnership(address newOwner) onlyOwner public {
5353
require(newOwner != address(0));
54-
OwnershipTransferred(owner, newOwner);
54+
emit OwnershipTransferred(owner, newOwner);
5555
owner = newOwner;
5656
}
5757

@@ -89,15 +89,15 @@ contract Pausable is Ownable {
8989
*/
9090
function pause() onlyOwner whenNotPaused public {
9191
paused = true;
92-
Pause();
92+
emit Pause();
9393
}
9494

9595
/**
9696
* @dev called by the owner to unpause, returns to normal state
9797
*/
9898
function unpause() onlyOwner whenPaused public {
9999
paused = false;
100-
Unpause();
100+
emit Unpause();
101101
}
102102
}
103103

@@ -116,7 +116,7 @@ contract StandardToken is ERC20,Pausable {
116116
require(balances[msg.sender] >= _value && balances[_to] + _value > balances[_to]);
117117
balances[msg.sender] = balances[msg.sender].sub(_value);
118118
balances[_to] = balances[_to].add(_value);
119-
Transfer(msg.sender, _to, _value);
119+
emit Transfer(msg.sender, _to, _value);
120120
return true;
121121
}
122122

@@ -131,7 +131,7 @@ contract StandardToken is ERC20,Pausable {
131131
balances[_to] = balances[_to].add(_value);
132132
balances[_from] = balances[_from].sub(_value);
133133
allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
134-
Transfer(_from, _to, _value);
134+
emit Transfer(_from, _to, _value);
135135
return true;
136136
}
137137

@@ -154,7 +154,7 @@ contract StandardToken is ERC20,Pausable {
154154
function approve(address _spender, uint256 _value) whenNotPaused returns (bool success) {
155155
require(allowed[msg.sender][_spender] == 0);
156156
allowed[msg.sender][_spender] = _value;
157-
Approval(msg.sender, _spender, _value);
157+
emit Approval(msg.sender, _spender, _value);
158158
return true;
159159
}
160160

@@ -174,7 +174,7 @@ contract StandardToken is ERC20,Pausable {
174174
*/
175175
function increaseApproval(address _spender, uint _addedValue) whenNotPaused public returns (bool) {
176176
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
177-
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
177+
emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
178178
return true;
179179
}
180180

@@ -185,7 +185,7 @@ contract StandardToken is ERC20,Pausable {
185185
} else {
186186
allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
187187
}
188-
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
188+
emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
189189
return true;
190190
}
191191
}
@@ -229,7 +229,7 @@ contract SPRINGToken is StandardToken {
229229

230230
/* Contructor function to set maxSupply*/
231231
function SPRINGToken(uint256 _maxSupply){
232-
maxSupply = _maxSupply.mul(10**decimals);
232+
maxSupply = _maxSupply;
233233
}
234234

235235
/**
@@ -241,7 +241,7 @@ contract SPRINGToken is StandardToken {
241241
require (maxSupply >= (totalSupply.add(_amount)));
242242
totalSupply = totalSupply.add(_amount);
243243
balances[msg.sender] = balances[msg.sender].add(_amount);
244-
Transfer(address(0), msg.sender, _amount);
244+
emit Transfer(address(0), msg.sender, _amount);
245245
return true;
246246
}
247247

migrations/2_deploy_contracts.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
1-
var InviteToken = artifacts.require("./InviteToken.sol");
21
var VanityURL = artifacts.require("./VanityURL.sol");
32
var AirDrop = artifacts.require("./AirDrop.sol");
43
var SpringToken = artifacts.require("./SPRINGToken.sol");
54
var Attestation = artifacts.require("./Attestation.sol");
65

76
module.exports = function(deployer,network,accounts) {
8-
deployer.deploy(InviteToken,1000000).then(function() {
9-
return deployer.deploy(AirDrop, InviteToken.address);
7+
deployer.deploy(SpringToken,1000000).then(function() {
8+
return deployer.deploy(AirDrop, SpringToken.address);
109
}).then(function() {
1110
return deployer.deploy(VanityURL);
1211
}).then(function() {
1312
return deployer.deploy(Attestation);
14-
}).then(function() {
15-
return deployer.deploy(SpringToken,1000000);
1613
});
1714
};

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"test": "test"
88
},
99
"dependencies": {
10-
"solc": "^0.4.19",
11-
"truffle": "^4.0.6"
10+
"solc": "^0.4.25",
11+
"truffle": "^4.1.14"
1212
},
1313
"devDependencies": {},
1414
"scripts": {

test/2_airdrop.js renamed to test/1_airdrop.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var InviteToken = artifacts.require("./InviteToken.sol");
1+
var SPRINGToken = artifacts.require("./SPRINGToken.sol");
22
var AirDrop = artifacts.require("./AirDrop.sol");
33

44
contract('Airdrop', function(accounts) {
@@ -13,7 +13,7 @@ contract('Airdrop', function(accounts) {
1313
before(function () {
1414
return AirDrop.deployed().then(function(instance) {
1515
airdropInstance = instance;
16-
return InviteToken.deployed();
16+
return SPRINGToken.deployed();
1717
}).then(function(token) {
1818
tokenInstance = token;
1919
airdropInstance.send(eth_contract_balance,{from:accounts[0]});

0 commit comments

Comments
 (0)