Skip to content

Commit 93d8338

Browse files
committed
upgraded
1 parent a4f224c commit 93d8338

File tree

4 files changed

+21
-26
lines changed

4 files changed

+21
-26
lines changed

contracts/AirDrop.sol

Lines changed: 4 additions & 4 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
* @title Token
@@ -20,7 +20,7 @@ contract Ownable {
2020
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
2121
* account.
2222
*/
23-
function Ownable() {
23+
constructor() public {
2424
owner = msg.sender;
2525
}
2626

@@ -40,7 +40,7 @@ contract Ownable {
4040
*/
4141
function transferOwnership(address newOwner) onlyOwner public {
4242
require(newOwner != address(0));
43-
OwnershipTransferred(owner, newOwner);
43+
emit OwnershipTransferred(owner, newOwner);
4444
owner = newOwner;
4545
}
4646

@@ -54,7 +54,7 @@ contract AirDrop is Ownable {
5454
/*
5555
constructor function to set token address
5656
*/
57-
function AirDrop(address _tokenAddress){
57+
constructor(address _tokenAddress) public {
5858
tokenInstance = Token(_tokenAddress);
5959
}
6060

contracts/Attestation.sol

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

33
contract Attestation {
44

55
event Attest(address _address,string _type,string _data);
66

77
function write(string _type,string _data) public returns (bool) {
8-
Attest(msg.sender,_type,_data);
8+
emit Attest(msg.sender,_type,_data);
99
return true;
1010
}
1111
}

contracts/SPRINGToken.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ contract Ownable {
3131
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
3232
* account.
3333
*/
34-
function Ownable() {
34+
constructor() public {
3535
owner = msg.sender;
3636
}
3737

@@ -145,7 +145,7 @@ contract StandardToken is ERC20,Pausable {
145145
}
146146

147147
/**
148-
* @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender.
148+
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
149149
* This only works when the allowance is 0. Cannot be used to change allowance.
150150
* https://github.com/ethereum/EIPs/issues/738#issuecomment-336277632
151151
* @param _spender The address which will spend the funds.
@@ -227,8 +227,8 @@ contract SPRINGToken is StandardToken {
227227
uint256 public totalSupply;
228228
uint256 public maxSupply;
229229

230-
/* Contructor function to set maxSupply*/
231-
function SPRINGToken(uint256 _maxSupply){
230+
/* Constructor function to set maxSupply*/
231+
constructor(uint256 _maxSupply) public {
232232
maxSupply = _maxSupply;
233233
}
234234

contracts/VanityURL.sol

Lines changed: 11 additions & 16 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
* Contract for Vanity URL on SpringRole
@@ -21,7 +21,7 @@ contract Ownable {
2121
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
2222
* account.
2323
*/
24-
function Ownable() {
24+
constructor() public {
2525
owner = msg.sender;
2626
}
2727

@@ -41,7 +41,7 @@ contract Ownable {
4141
*/
4242
function transferOwnership(address newOwner) onlyOwner public {
4343
require(newOwner != address(0));
44-
OwnershipTransferred(owner, newOwner);
44+
emit OwnershipTransferred(owner, newOwner);
4545
owner = newOwner;
4646
}
4747

@@ -80,15 +80,15 @@ contract Pausable is Ownable {
8080
*/
8181
function pause() onlyOwner whenNotPaused public {
8282
paused = true;
83-
Pause();
83+
emit Pause();
8484
}
8585

8686
/**
8787
* @dev called by the owner to unpause, returns to normal state
8888
*/
8989
function unpause() onlyOwner whenPaused public {
9090
paused = false;
91-
Unpause();
91+
emit Unpause();
9292
}
9393
}
9494

@@ -110,11 +110,6 @@ contract VanityURL is Ownable,Pausable {
110110
mapping (string => string) vanity_springrole_id_mapping;
111111
// This declares a state variable that mapping for Springrole ID to vanityURL
112112
mapping (string => string) springrole_id_vanity_mapping;
113-
/*
114-
constructor function to set token address & Pricing for reserving and token transfer address
115-
*/
116-
function VanityURL(){
117-
}
118113

119114
event VanityReserved(address _to, string _vanity_url);
120115
event VanityTransfered(address _to,address _from, string _vanity_url);
@@ -163,7 +158,7 @@ contract VanityURL is Ownable,Pausable {
163158
springrole_id_vanity_mapping[_springrole_id] = _vanity_url;
164159
/* adding to address vanity mapping */
165160
address_vanity_mapping[msg.sender] = _vanity_url;
166-
VanityReserved(msg.sender, _vanity_url);
161+
emit VanityReserved(msg.sender, _vanity_url);
167162
}
168163

169164
/*
@@ -224,7 +219,7 @@ contract VanityURL is Ownable,Pausable {
224219
vanity_springrole_id_mapping[_vanity_url]=_springrole_id;
225220
springrole_id_vanity_mapping[_springrole_id]=_vanity_url;
226221

227-
VanityReserved(msg.sender, _vanity_url);
222+
emit VanityReserved(msg.sender, _vanity_url);
228223
}
229224

230225
/*
@@ -235,7 +230,7 @@ contract VanityURL is Ownable,Pausable {
235230
require(bytes(address_vanity_mapping[msg.sender]).length != 0);
236231
address_vanity_mapping[_to] = address_vanity_mapping[msg.sender];
237232
vanity_address_mapping[address_vanity_mapping[msg.sender]] = _to;
238-
VanityTransfered(msg.sender,_to,address_vanity_mapping[msg.sender]);
233+
emit VanityTransfered(msg.sender,_to,address_vanity_mapping[msg.sender]);
239234
delete(address_vanity_mapping[msg.sender]);
240235
}
241236

@@ -249,7 +244,7 @@ contract VanityURL is Ownable,Pausable {
249244
if(vanity_address_mapping[_vanity_url] != address(0x0))
250245
{
251246
/* Sending Vanity Transfered Event */
252-
VanityTransfered(vanity_address_mapping[_vanity_url],_to,_vanity_url);
247+
emit VanityTransfered(vanity_address_mapping[_vanity_url],_to,_vanity_url);
253248
/* delete from address mapping */
254249
delete(address_vanity_mapping[vanity_address_mapping[_vanity_url]]);
255250
/* delete from vanity mapping */
@@ -262,7 +257,7 @@ contract VanityURL is Ownable,Pausable {
262257
else
263258
{
264259
/* sending VanityReserved event */
265-
VanityReserved(_to, _vanity_url);
260+
emit VanityReserved(_to, _vanity_url);
266261
}
267262
/* add new address to mapping */
268263
vanity_address_mapping[_vanity_url] = _to;
@@ -285,7 +280,7 @@ contract VanityURL is Ownable,Pausable {
285280
/* delete from vanity springrole id mapping */
286281
delete(vanity_springrole_id_mapping[_vanity_url]);
287282
/* sending VanityReleased event */
288-
VanityReleased(_vanity_url);
283+
emit VanityReleased(_vanity_url);
289284
}
290285

291286
/*

0 commit comments

Comments
 (0)