Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Develop into Master #34

Open
wants to merge 49 commits into
base: master
Choose a base branch
from
Open
Changes from 2 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
e281868
Adding a backup folder called mainnet for build artifacts to separate…
Ryanmtate Sep 18, 2018
6ee38f8
Update migrations scripts to separate files
Ryanmtate Oct 22, 2018
284dbb1
Reverted back to 0.4.24;
Ryanmtate Oct 22, 2018
1333896
WIP: Adding a Stable Coin swap contract for converting trusted stable…
Ryanmtate Oct 29, 2018
2d14bb4
Adding StableSwap contract; TODO decimal normalization
Ryanmtate Oct 29, 2018
68e2272
Add fee params per asset for stable swap contract; add natspec
Ryanmtate Oct 31, 2018
641094f
Merge pull request #36 from tokenio/stable_swap
Ryanmtate Oct 31, 2018
60d3621
Deployed TokenIOStableSwap w/ unit tests checking convert method in b…
Ryanmtate Nov 2, 2018
d1abd47
Added an ERC20 contract that includes fees; Gas costs for transfers a…
Ryanmtate Nov 8, 2018
e5784e2
Bypass forceTransfer() method in library and directly update storage …
Ryanmtate Nov 15, 2018
1d5b3cc
configs update
vlad-kostanda Dec 18, 2018
8516810
Storage improvement by making it more specific
vlad-kostanda Dec 18, 2018
78ea975
breaking transfer test. need investigation
vlad-kostanda Dec 18, 2018
745bf71
minor updates to correspond to new fee parameters format
vlad-kostanda Dec 18, 2018
df3b83c
1. updates to balance storage and mappings order; 2. logging transfer…
vlad-kostanda Jan 23, 2019
fabaa99
fix issue with forceTransfer in TokenIOLib
RostyslavBortman Jan 24, 2019
c7ceb89
oprimize set params functiom, created struct in storage
RostyslavBortman Jan 25, 2019
5ed7a55
optimized transger/transfer from functions
RostyslavBortman Jan 25, 2019
04aff17
optimized transfer/transferFrom functions in TokenIOERC20FeesApply
RostyslavBortman Jan 27, 2019
baceec3
optimization fixes
RostyslavBortman Jan 27, 2019
46e3f90
add comments
RostyslavBortman Jan 28, 2019
0e7145e
add tests and delete functions
RostyslavBortman Jan 29, 2019
f55e0aa
fix code before PR
RostyslavBortman Jan 30, 2019
78b24f6
fix code before meeting
RostyslavBortman Jan 30, 2019
14069f3
fix formatting
RostyslavBortmanAdoria Feb 1, 2019
6130966
remove excess
RostyslavBortmanAdoria Feb 1, 2019
11ea966
Merge pull request #40 from adoriasoft/fees_apply
Ryanmtate Feb 4, 2019
a47f73a
apply optimization changes for all contracts
RostyslavBortmanAdoria Feb 10, 2019
6d7f470
Merge pull request #2 from adoriasoft/fees_apply_dev2
vlad-kostanda Feb 10, 2019
f21b784
fix bug with fxUSDBPSRate parameter
RostyslavBortmanAdoria Feb 10, 2019
182257d
add comments to constructor
RostyslavBortmanAdoria Feb 10, 2019
d31cbf0
fees_apply_solidityVersionMigration
RostyslavBortmanAdoria Feb 10, 2019
d4164e3
solidity version migration
RostyslavBortmanAdoria Feb 11, 2019
191b4f8
Merge pull request #3 from adoriasoft/fees_apply_solidityVersionMigra…
vlad-kostanda Feb 12, 2019
5c0d72f
add proxy
RostyslavBortmanAdoria Feb 16, 2019
ed2fb5f
adding proxies
RostyslavBortmanAdoria Feb 19, 2019
8360ce9
fix compilation errors
RostyslavBortmanAdoria Feb 19, 2019
799dc45
update proxy contract
RostyslavBortmanAdoria Feb 20, 2019
e76b813
add upgrade function
RostyslavBortmanAdoria Feb 20, 2019
e090dbb
change tests for proxies
RostyslavBortmanAdoria Feb 27, 2019
a63b9f1
fixes in proxy implementation + tests
RostyslavBortmanAdoria Mar 2, 2019
84edbde
tests added
RostyslavBortmanAdoria Mar 5, 2019
ed1dafd
Merge pull request #38 from tokenio/fees_apply
Ryanmtate Mar 6, 2019
885258a
Merge pull request #4 from adoriasoft/fees_apply_dev_proxy
RostyslavBortmanAdoria Mar 6, 2019
c8ea85d
remove excess
RostyslavBortmanAdoria Mar 6, 2019
df35f92
Merge pull request #41 from adoriasoft/fees_apply
Ryanmtate Mar 8, 2019
936e5f0
Merge pull request #44 from tokenio/fees_apply
Ryanmtate Mar 21, 2019
c6ca884
Update compiler settings
Ryanmtate Mar 21, 2019
7346eb6
Merge pull request #45 from tokenio/feature/update_compiler_settings
Ryanmtate Mar 21, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 2 additions & 15 deletions contracts/TokenIOERC20Unlimited.sol
Original file line number Diff line number Diff line change
@@ -72,21 +72,8 @@ contract TokenIOERC20Unlimited is Ownable {
address _feeContract,
uint _fxUSDBPSRate
) onlyOwner public returns (bool success) {
require(lib.setTokenName(_name),
"Error: Unable to set token name. Please check arguments.");
require(lib.setTokenSymbol(_symbol),
"Error: Unable to set token symbol. Please check arguments.");
require(lib.setTokenTLA(_tla),
"Error: Unable to set token TLA. Please check arguments.");
require(lib.setTokenVersion(_version),
"Error: Unable to set token version. Please check arguments.");
require(lib.setTokenDecimals(_symbol, _decimals),
"Error: Unable to set token decimals. Please check arguments.");
require(lib.setFeeContract(_feeContract),
"Error: Unable to set fee contract. Please check arguments.");
require(lib.setFxUSDBPSRate(_symbol, _fxUSDBPSRate),
"Error: Unable to set fx USD basis points rate. Please check arguments.");
return true;
require(lib.setTokenParams(_name, _symbol, _tla, _version, _decimals, _feeContract, _fxUSDBPSRate),
"Error: Unable to set token params. Please check arguments.");
}

/**
2 changes: 1 addition & 1 deletion contracts/TokenIOFeeContract.sol
Original file line number Diff line number Diff line change
@@ -62,7 +62,7 @@ contract TokenIOFeeContract is Ownable {
* returns {"success" : "Returns true if successfully called from another contract"}
*/
function setFeeParams(uint feeBps, uint feeMin, uint feeMax, uint feeFlat, bytes feeMsg) public onlyOwner returns (bool success) {
require(lib.setFees(feeMax, feeMin, feeBps, feeFlat), "Error: Unable to set fee contract settings");
require(lib.setFees(address(this), feeMax, feeMin, feeBps, feeFlat), "Error: Unable to set fee contract settings");
require(lib.setFeeMsg(feeMsg), "Error: Unable to set fee contract default message.");
return true;
}
4 changes: 2 additions & 2 deletions contracts/TokenIOLib.sol
Original file line number Diff line number Diff line change
@@ -148,8 +148,8 @@ library TokenIOLib {
* @param flatFee Flat fee for interface contract transactions
* @return {"success" : "Returns true when successfully called from another contract"}
*/
function setFees(Data storage self, uint maxFee, uint minFee, uint bpsFee, uint flatFee) internal returns (bool success) {
return self.Storage.setFees(address(this), maxFee, minFee, bpsFee, flatFee);
function setFees(Data storage self, address asset, uint maxFee, uint minFee, uint bpsFee, uint flatFee) internal returns (bool success) {
return self.Storage.setFees(asset, maxFee, minFee, bpsFee, flatFee);
}

/**
12 changes: 1 addition & 11 deletions contracts/TokenIOStableSwap.sol
Original file line number Diff line number Diff line change
@@ -181,17 +181,7 @@ contract TokenIOStableSwap is Ownable {
function setAssetFeeParams(address asset, uint feeBps, uint feeMin, uint feeMax, uint feeFlat) public onlyOwner notDeprecated returns (bool success) {
/// @dev This method bypasses the setFee library methods and directly sets the fee params for a requested asset.
/// @notice Fees can be different per asset. Some assets may have different liquidity requirements.
require(lib.Storage.setUint(keccak256(abi.encodePacked('fee.max', asset)), feeMax),
'Error: Failed to set fee parameters with storage contract. Please check permissions.');

require(lib.Storage.setUint(keccak256(abi.encodePacked('fee.min', asset)), feeMin),
'Error: Failed to set fee parameters with storage contract. Please check permissions.');

require(lib.Storage.setUint(keccak256(abi.encodePacked('fee.bps', asset)), feeBps),
'Error: Failed to set fee parameters with storage contract. Please check permissions.');

require(lib.Storage.setUint(keccak256(abi.encodePacked('fee.flat', asset)), feeFlat),
'Error: Failed to set fee parameters with storage contract. Please check permissions.');
require(lib.setFees(asset, feeMax, feeMin, feeBps, feeFlat), "Error: Unable to set fee contract settings");

return true;
}
4 changes: 2 additions & 2 deletions contracts/TokenIOStorage.sol
Original file line number Diff line number Diff line change
@@ -637,7 +637,7 @@ contract TokenIOStorage is Ownable {
* @param _fxUSDBPSRate usdbps rate
* @return { "uint" : "Returns the uint value associated with the key" }
*/
function setTokenfxUSDBPSRate(address _address, uint _fxUSDBPSRate) external view returns(bool success) {
function setTokenfxUSDBPSRate(address _address, uint _fxUSDBPSRate) external onlyOwner returns(bool success) {
assets[_address].fxUSDBPSRate = _fxUSDBPSRate;
return true;
}
@@ -647,7 +647,7 @@ contract TokenIOStorage is Ownable {
* @param _address Pointer identifier for value in mapping
* @return { "uint" : "Returns the uint value associated with the key" }
*/
function deleteTokenfxUSDBPSRate(address _address) external view returns(bool success) {
function deleteTokenfxUSDBPSRate(address _address) external onlyOwner returns(bool success) {
delete assets[_address].fxUSDBPSRate;
return true;
}