Skip to content

Commit ed74d75

Browse files
authored
Merge pull request #25 from SpringRole/token-name-updated
token name and symbol updated
2 parents 5d866da + a685573 commit ed74d75

File tree

6 files changed

+36
-36
lines changed

6 files changed

+36
-36
lines changed

contracts/SRTToken.sol renamed to contracts/InviteToken.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,17 +202,17 @@ contract WhiteListedContracts is Ownable {
202202
}
203203

204204
/* Contract class to mint tokens and transfer */
205-
contract SRTToken is Ownable,StandardToken,WhiteListedContracts {
205+
contract InviteToken is Ownable,StandardToken,WhiteListedContracts {
206206
using SafeMath for uint256;
207207

208-
string constant public name = 'SpringRole Pre Mint Token';
209-
string constant public symbol = 'SRPMT';
208+
string constant public name = 'Invite Token';
209+
string constant public symbol = 'INVITE';
210210
uint constant public decimals = 18;
211211
uint256 public totalSupply;
212212
uint256 public maxSupply;
213213

214214
/* Contructor function to set maxSupply*/
215-
function SRTToken(uint256 _maxSupply){
215+
function InviteToken(uint256 _maxSupply){
216216
maxSupply = _maxSupply.mul(10**decimals);
217217
}
218218

contracts/VanityURL.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ contract VanityURL is Ownable,Pausable {
207207
require(length >= 4 && length <= 200);
208208
for (uint i =0; i< length; i++){
209209
var c = bytes(_vanity_url)[i];
210-
if (c < 48 || c > 122 || (c > 57 && c < 65) || (c > 90 && c < 97 ) )
210+
if ((c < 48 || c > 122 || (c > 57 && c < 65) || (c > 90 && c < 97 )) && (c != 95))
211211
return false;
212212
}
213213
return true;

migrations/2_deploy_contracts.js

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

55
module.exports = function(deployer,network,accounts) {
6-
deployer.deploy(SRTToken,1000000).then(function() {
7-
return deployer.deploy(AirDrop, SRTToken.address);
6+
deployer.deploy(InviteToken,1000000).then(function() {
7+
return deployer.deploy(AirDrop, InviteToken.address);
88
}).then(function() {
9-
return deployer.deploy(VanityURL, SRTToken.address,1,accounts[2]);
9+
return deployer.deploy(VanityURL, InviteToken.address,1,accounts[2]);
1010
});
1111
};

test/1_srttoken.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
1-
var SRTToken = artifacts.require("./SRTToken.sol");
1+
var InviteToken = artifacts.require("./InviteToken.sol");
22

3-
contract('SRTToken', function(accounts) {
3+
contract('InviteToken', function(accounts) {
44
it("should have decimal place of 18", function() {
5-
return SRTToken.deployed().then(function(instance) {
5+
return InviteToken.deployed().then(function(instance) {
66
return instance.decimals.call();
77
}).then(function(decimals) {
88
assert.equal(decimals.valueOf(), 18, "18 decimals not found");
99
});
1010
});
1111

1212
it("token should have a name", function() {
13-
return SRTToken.deployed().then(function(instance) {
13+
return InviteToken.deployed().then(function(instance) {
1414
return instance.name.call();
1515
}).then(function(name) {
1616
assert.isDefined(name.valueOf(), 'token should have a name');
1717
});
1818
});
1919

2020
it("token should have a symbol", function() {
21-
return SRTToken.deployed().then(function(instance) {
21+
return InviteToken.deployed().then(function(instance) {
2222
return instance.symbol.call();
2323
}).then(function(symbol) {
2424
assert.isDefined(symbol.valueOf(), 'token should have a symbol');
2525
});
2626
});
2727

2828
it("token should have a maxSupply", function() {
29-
return SRTToken.deployed().then(function(instance) {
29+
return InviteToken.deployed().then(function(instance) {
3030
return instance.maxSupply.call();
3131
}).then(function(maxSupply) {
3232
assert.isDefined(maxSupply.valueOf(), 'token should have a maxSupply');
3333
});
3434
});
3535

3636
it("mint should throw error when tried by non owner account", function() {
37-
return SRTToken.deployed().then(function(instance) {
37+
return InviteToken.deployed().then(function(instance) {
3838
return instance.mint.call(10000,{from: accounts[1]});
3939
}).then(function(minted) {
4040
assert.isFalse(minted, "transaction should have thrown error");
@@ -44,7 +44,7 @@ contract('SRTToken', function(accounts) {
4444
});
4545

4646
it("addWhiteListedContracts should throw error when tried by non owner account", function() {
47-
return SRTToken.deployed().then(function(instance) {
47+
return InviteToken.deployed().then(function(instance) {
4848
return instance.addWhiteListedContracts.call(accounts[2],{from: accounts[1]});
4949
}).then(function(minted) {
5050
assert.isFalse(minted, "transaction should have thrown error");
@@ -56,7 +56,7 @@ contract('SRTToken', function(accounts) {
5656
it("mint should throw error when tried to mint more than max supply", function() {
5757
var token;
5858

59-
return SRTToken.deployed().then(function(instance) {
59+
return InviteToken.deployed().then(function(instance) {
6060
token = instance;
6161
return token.maxSupply.call();
6262
}).then(function(maxSupply) {
@@ -74,7 +74,7 @@ contract('SRTToken', function(accounts) {
7474
var old_balance;
7575
var new_balance;
7676

77-
return SRTToken.deployed().then(function(instance) {
77+
return InviteToken.deployed().then(function(instance) {
7878
token = instance;
7979
return token.balanceOf.call(accounts[0]);
8080
}).then(function(balance) {
@@ -102,7 +102,7 @@ contract('SRTToken', function(accounts) {
102102

103103
var amount = 10;
104104

105-
return SRTToken.deployed().then(function(instance) {
105+
return InviteToken.deployed().then(function(instance) {
106106
token = instance;
107107
return token.balanceOf.call(account_one);
108108
}).then(function(balance) {
@@ -137,7 +137,7 @@ contract('SRTToken', function(accounts) {
137137

138138
var amount = 10;
139139

140-
return SRTToken.deployed().then(function(instance) {
140+
return InviteToken.deployed().then(function(instance) {
141141
token = instance;
142142
return token.balanceOf.call(account_one);
143143
}).then(function(balance) {
@@ -168,7 +168,7 @@ contract('SRTToken', function(accounts) {
168168

169169
var amount = 10;
170170

171-
return SRTToken.deployed().then(function(instance) {
171+
return InviteToken.deployed().then(function(instance) {
172172
token = instance;
173173
return token.balanceOf.call(account_one);
174174
}).then(function(balance) {
@@ -199,7 +199,7 @@ contract('SRTToken', function(accounts) {
199199

200200
var amount = 10;
201201

202-
return SRTToken.deployed().then(function(instance) {
202+
return InviteToken.deployed().then(function(instance) {
203203
token = instance;
204204
return token.addWhiteListedContracts(account_three);
205205
}).then(function() {
@@ -227,7 +227,7 @@ contract('SRTToken', function(accounts) {
227227

228228
var amount = 1;
229229

230-
return SRTToken.deployed().then(function(instance) {
230+
return InviteToken.deployed().then(function(instance) {
231231
token = instance;
232232
return token.approve(accounts[2],amount,{from:accounts[1]});
233233
}).then(function() {
@@ -245,7 +245,7 @@ contract('SRTToken', function(accounts) {
245245
var approval_starting_balance;
246246
var approval_ending_balance;
247247

248-
return SRTToken.deployed().then(function(instance) {
248+
return InviteToken.deployed().then(function(instance) {
249249
token = instance;
250250
return token.allowance.call(accounts[1],accounts[2]);
251251
}).then(function(balance) {
@@ -267,7 +267,7 @@ contract('SRTToken', function(accounts) {
267267
var approval_starting_balance;
268268
var approval_ending_balance;
269269

270-
return SRTToken.deployed().then(function(instance) {
270+
return InviteToken.deployed().then(function(instance) {
271271
token = instance;
272272
return token.allowance.call(accounts[1],accounts[2]);
273273
}).then(function(balance) {
@@ -286,7 +286,7 @@ contract('SRTToken', function(accounts) {
286286

287287
var amount = 1;
288288

289-
return SRTToken.deployed().then(function(instance) {
289+
return InviteToken.deployed().then(function(instance) {
290290
token = instance;
291291
return token.approve(accounts[2],amount,{from:accounts[1]});
292292
}).then(function(status) {

test/2_airdrop.js

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

44
contract('Airdrop', function(accounts) {
@@ -9,7 +9,7 @@ contract('Airdrop', function(accounts) {
99
before(function () {
1010
return AirDrop.deployed().then(function(instance) {
1111
airdropInstance = instance;
12-
return SRTToken.deployed();
12+
return InviteToken.deployed();
1313
}).then(function(token) {
1414
tokenInstance = token;
1515
});

test/2_vanity.js

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

44
contract('VanityURL', function(accounts) {
@@ -8,7 +8,7 @@ contract('VanityURL', function(accounts) {
88
before(function () {
99
return VanityURL.deployed().then(function(instance) {
1010
vanityInstance = instance;
11-
return SRTToken.deployed();
11+
return InviteToken.deployed();
1212
}).then(function(token) {
1313
tokenInstance = token;
1414
// mint 1000 tokens
@@ -56,14 +56,14 @@ contract('VanityURL', function(accounts) {
5656
return tokenInstance.balanceOf.call(account_two);
5757
}).then(function(balance){
5858
account_two_starting_balance = balance.toNumber();
59-
return vanityInstance.reserve('vinay035',{from:accounts[1]});
59+
return vanityInstance.reserve('vinay_035',{from:accounts[1]});
6060
}).then(function(instance){
61-
return vanityInstance.retrieveWalletForVanity.call('vinay035');
61+
return vanityInstance.retrieveWalletForVanity.call('vinay_035');
6262
}).then(function(result) {
6363
assert.equal(result,accounts[1],"Should be able to retrive the same wallet address");
6464
return vanityInstance.retrieveVanityForWallet.call(accounts[1]);
6565
}).then(function(result) {
66-
assert.equal(result,'vinay035',"Should be able to retrive the same vanity");
66+
assert.equal(result,'vinay_035',"Should be able to retrive the same vanity");
6767
}).then(function() {
6868
return tokenInstance.balanceOf.call(account_one);
6969
}).then(function(balance) {
@@ -117,12 +117,12 @@ contract('VanityURL', function(accounts) {
117117

118118
it("should be able to transfer a vanity", function() {
119119
return vanityInstance.transferOwnershipForVanityURL(accounts[3],{from:accounts[1]}).then(function(instance){
120-
return vanityInstance.retrieveWalletForVanity.call('vinay035');
120+
return vanityInstance.retrieveWalletForVanity.call('vinay_035');
121121
}).then(function(result) {
122122
assert.equal(result,accounts[3],"Should be able to retrive the same wallet address");
123123
return vanityInstance.retrieveVanityForWallet.call(accounts[3]);
124124
}).then(function(result) {
125-
assert.equal(result,'vinay035',"Should be able to retrive the same vanity");
125+
assert.equal(result,'vinay_035',"Should be able to retrive the same vanity");
126126
}).catch(function(error){
127127
assert.isUndefined(error,"should be able to reserve a url")
128128
})

0 commit comments

Comments
 (0)