Skip to content

Commit

Permalink
Fix contract size issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdossa committed Jun 14, 2019
1 parent 5af03b7 commit 4599ecd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
13 changes: 4 additions & 9 deletions contracts/mocks/SecurityTokenRegistryMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,13 @@ contract SecurityTokenRegistryMock is SecurityTokenRegistry {
/// @notice It is a dummy function
/// Alert! Alert! Do NOT use it for the mainnet release

modifier onlyOwnerOrSelf() {
require(msg.sender == owner() || msg.sender == address(this), "Only owner or self");
_;
}

uint256 public someValue;
function changeTheDeployedAddress(string memory _ticker, address _newSecurityTokenAddress) public {
set(Encoder.getKey("tickerToSecurityToken", _ticker), _newSecurityTokenAddress);

function changeTheFee(uint256 _newFee) public {
set(STLAUNCHFEE, _newFee);
}

function configure(uint256 _someValue) public onlyOwnerOrSelf {
function configure(uint256 _someValue) public {
someValue = _someValue;
}

Expand Down
8 changes: 5 additions & 3 deletions test/t_security_token_registry_proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,11 @@ contract("SecurityTokenRegistryProxy", async (accounts) => {
});

it("Should alter the old storage", async () => {
await I_STRProxied.changeTheDeployedAddress(symbol, account_temp, { from: account_polymath });
let _tokenAddress = await I_Getter.getSecurityTokenAddress.call(symbol);
assert.equal(_tokenAddress, account_temp, "Should match with the changed address");
await I_STRProxied.changeTheFee(0, { from: account_polymath });
let feesToken = await I_STRProxied.getFees.call("0xd677304bb45536bb7fdfa6b9e47a3c58fe413f9e8f01474b0a4b9c6e0275baf2");
console.log(feesToken);
// assert.equal(feesToken[0].toString(), origPriceUSD.toString());
// assert.equal(feesToken[1].toString(), origPricePOLY.toString());
});
});

Expand Down

0 comments on commit 4599ecd

Please sign in to comment.