Skip to content
This repository was archived by the owner on Jan 18, 2023. It is now read-only.

Commit a5e6869

Browse files
committed
Remove usage of setName and setSymbol
1 parent 2e427b0 commit a5e6869

File tree

2 files changed

+3
-36
lines changed

2 files changed

+3
-36
lines changed

contracts/SetToken.sol

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ contract SetToken is StandardToken, DetailedERC20("", "", 18), Set {
2727
* @param _components address[] A list of component address which you want to include
2828
* @param _units uint[] A list of quantities in gWei of each component (corresponds to the {Set} of _components)
2929
*/
30-
function SetToken(address[] _components, uint[] _units, string _name, string _symbol) public {
30+
function SetToken(address[] _components, uint[] _units) public {
3131
// There must be component present
3232
require(_components.length > 0);
3333

@@ -55,8 +55,6 @@ contract SetToken is StandardToken, DetailedERC20("", "", 18), Set {
5555

5656
components = _components;
5757
units = _units;
58-
name = _name;
59-
symbol = _symbol;
6058
}
6159

6260
/**

test/setToken-base.spec.ts

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ const { expect, assert } = chai;
2424
import { INVALID_OPCODE, REVERT_ERROR } from "./constants/txn_error";
2525

2626
contract("{Set}", (accounts) => {
27-
const components = [];
28-
const units = [];
29-
3027
let componentA: any;
3128
let unitsA: BigNumber;
3229
let componentB: any;
@@ -40,10 +37,6 @@ contract("{Set}", (accounts) => {
4037
const initialTokens: BigNumber = ether(100);
4138

4239
const TX_DEFAULTS = { from: testAccount };
43-
const EXPECTED_FAILURE_GAS_LIMIT_DEFAULT = 3000000;
44-
45-
const setName = "TEST SET";
46-
const setSymbol = "TEST";
4740

4841
describe("{Set} creation", async () => {
4942
beforeEach(async () => {
@@ -55,21 +48,10 @@ contract("{Set}", (accounts) => {
5548
const setTokenInstance = await SetToken.new(
5649
[componentA.address, componentB.address],
5750
[unitsA, unitsB],
58-
setName,
59-
setSymbol,
6051
TX_DEFAULTS,
6152
);
62-
// assert.exists(setTokenInstance, 'Set Token does not exist');
6353
expect(setTokenInstance).to.exist;
6454

65-
// // Assert correct name
66-
const setTokenName = await setTokenInstance.name(TX_DEFAULTS);
67-
assert.strictEqual(setTokenName, setName);
68-
69-
// Assert correct symbol
70-
const setTokenSymbol = await setTokenInstance.symbol(TX_DEFAULTS);
71-
assert.strictEqual(setTokenSymbol, setSymbol);
72-
7355
// Assert correctness of number of components
7456
const setTokenCount = await setTokenInstance.componentCount(TX_DEFAULTS);
7557
expect(setTokenCount).to.be.bignumber.equal(2);
@@ -104,16 +86,14 @@ contract("{Set}", (accounts) => {
10486
SetToken.new(
10587
[componentA.address, componentB.address],
10688
[unitsA],
107-
setName,
108-
setSymbol,
10989
TX_DEFAULTS,
11090
),
11191
).to.eventually.be.rejectedWith(REVERT_ERROR);
11292
});
11393

11494
describe("should not allow creation of a {Set} with no inputs", async () => {
11595
await expect(
116-
SetToken.new([], [], setName, setSymbol, TX_DEFAULTS),
96+
SetToken.new([], [], TX_DEFAULTS),
11797
).to.eventually.be.rejectedWith(REVERT_ERROR);
11898
});
11999

@@ -124,16 +104,14 @@ contract("{Set}", (accounts) => {
124104
SetToken.new(
125105
[componentA.address, componentB.address],
126106
[unitsA, badUnit],
127-
setName,
128-
setSymbol,
129107
TX_DEFAULTS,
130108
),
131109
).to.eventually.be.rejectedWith(REVERT_ERROR);
132110
});
133111

134112
it("should not allow creation of a {Set} with address of 0", async () => {
135113
await expect(
136-
SetToken.new([componentA.address, null], [unitsA, unitsB], setName, setSymbol, TX_DEFAULTS),
114+
SetToken.new([componentA.address, null], [unitsA, unitsB], TX_DEFAULTS),
137115
).to.eventually.be.rejectedWith(REVERT_ERROR);
138116
});
139117

@@ -149,8 +127,6 @@ contract("{Set}", (accounts) => {
149127
setToken = await SetToken.new(
150128
[componentA.address, componentB.address],
151129
[unitsA, unitsB],
152-
setName,
153-
setSymbol,
154130
TX_DEFAULTS,
155131
);
156132

@@ -245,8 +221,6 @@ contract("{Set}", (accounts) => {
245221
setToken = await SetToken.new(
246222
[componentA.address],
247223
[halfGWeiUnits],
248-
setName,
249-
setSymbol,
250224
TX_DEFAULTS,
251225
);
252226

@@ -282,12 +256,9 @@ contract("{Set}", (accounts) => {
282256
// This unit represents a ten-thousandth of a gWei
283257
const gWeiUnits = gWei(1).div(10000);
284258

285-
// This creates a SetToken with only one backing token.
286259
setToken = await SetToken.new(
287260
[componentA.address],
288261
[gWeiUnits],
289-
setName,
290-
setSymbol,
291262
TX_DEFAULTS,
292263
);
293264

@@ -311,8 +282,6 @@ contract("{Set}", (accounts) => {
311282
setToken = await SetToken.new(
312283
[componentB.address],
313284
[overflowUnits],
314-
setName,
315-
setSymbol,
316285
TX_DEFAULTS,
317286
);
318287

0 commit comments

Comments
 (0)