aboutsummaryrefslogtreecommitdiffstats
path: root/test/compilationTests/corion
diff options
context:
space:
mode:
authorChase McDermott <chasemcd1745@tamu.edu>2018-07-15 05:42:01 +0800
committerChase McDermott <chasemcd1745@tamu.edu>2018-07-15 05:42:43 +0800
commit3267adcd14ba10e27a4b177e771fca9c9ab39646 (patch)
tree1c9b69f82d2af0e7eaf56b17188014b541b66ce8 /test/compilationTests/corion
parent31e56f9f9976cee44f000226318dca566f0f0b79 (diff)
downloaddexon-solidity-3267adcd14ba10e27a4b177e771fca9c9ab39646.tar
dexon-solidity-3267adcd14ba10e27a4b177e771fca9c9ab39646.tar.gz
dexon-solidity-3267adcd14ba10e27a4b177e771fca9c9ab39646.tar.bz2
dexon-solidity-3267adcd14ba10e27a4b177e771fca9c9ab39646.tar.lz
dexon-solidity-3267adcd14ba10e27a4b177e771fca9c9ab39646.tar.xz
dexon-solidity-3267adcd14ba10e27a4b177e771fca9c9ab39646.tar.zst
dexon-solidity-3267adcd14ba10e27a4b177e771fca9c9ab39646.zip
Added default data locations to docs and other external tests.
Diffstat (limited to 'test/compilationTests/corion')
-rw-r--r--test/compilationTests/corion/ico.sol2
-rw-r--r--test/compilationTests/corion/moduleHandler.sol10
-rw-r--r--test/compilationTests/corion/multiOwner.sol4
-rw-r--r--test/compilationTests/corion/premium.sol4
-rw-r--r--test/compilationTests/corion/provider.sol2
-rw-r--r--test/compilationTests/corion/publisher.sol2
-rw-r--r--test/compilationTests/corion/schelling.sol16
-rw-r--r--test/compilationTests/corion/token.sol4
8 files changed, 22 insertions, 22 deletions
diff --git a/test/compilationTests/corion/ico.sol b/test/compilationTests/corion/ico.sol
index abb6020b..2f60e0fe 100644
--- a/test/compilationTests/corion/ico.sol
+++ b/test/compilationTests/corion/ico.sol
@@ -50,7 +50,7 @@ contract ico is safeMath {
uint256 public totalMint;
uint256 public totalPremiumMint;
- constructor(address foundation, address priceSet, uint256 exchangeRate, uint256 startBlockNum, address[] genesisAddr, uint256[] genesisValue) public {
+ constructor(address foundation, address priceSet, uint256 exchangeRate, uint256 startBlockNum, address[] memory genesisAddr, uint256[] memory genesisValue) public {
/*
Installation function.
diff --git a/test/compilationTests/corion/moduleHandler.sol b/test/compilationTests/corion/moduleHandler.sol
index fddd2a29..ce53114b 100644
--- a/test/compilationTests/corion/moduleHandler.sol
+++ b/test/compilationTests/corion/moduleHandler.sol
@@ -36,7 +36,7 @@ contract moduleHandler is multiOwner, announcementTypes {
uint256 debugModeUntil = block.number + 1000000;
- constructor(address[] newOwners) multiOwner(newOwners) public {}
+ constructor(address[] memory newOwners) multiOwner(newOwners) public {}
function load(address foundation, bool forReplace, address Token, address Premium, address Publisher, address Schelling, address Provider) public {
/*
Loading modulest to ModuleHandler.
@@ -60,7 +60,7 @@ contract moduleHandler is multiOwner, announcementTypes {
addModule( modules_s(Schelling, keccak256('Schelling'), false, true), ! forReplace);
addModule( modules_s(Provider, keccak256('Provider'), true, true), ! forReplace);
}
- function addModule(modules_s input, bool call) internal {
+ function addModule(modules_s memory input, bool call) internal {
/*
Inside function for registration of the modules in the database.
If the call is false, won't happen any direct call.
@@ -81,7 +81,7 @@ contract moduleHandler is multiOwner, announcementTypes {
}
modules[id] = input;
}
- function getModuleAddressByName(string name) public view returns( bool success, bool found, address addr ) {
+ function getModuleAddressByName(string memory name) public view returns( bool success, bool found, address addr ) {
/*
Search by name for module. The result is an Ethereum address.
@@ -109,7 +109,7 @@ contract moduleHandler is multiOwner, announcementTypes {
}
return (true, false, 0);
}
- function getModuleIDByName(string name) public view returns( bool success, bool found, uint256 id ) {
+ function getModuleIDByName(string memory name) public view returns( bool success, bool found, uint256 id ) {
/*
Search by name for module. The result is an index array.
@@ -177,7 +177,7 @@ contract moduleHandler is multiOwner, announcementTypes {
require( abstractModule(modules[_id].addr).replaceModule(newModule) );
return true;
}
-
+
function newModule(string name, address addr, bool schellingEvent, bool transferEvent) external returns (bool success) {
/*
Adding new module to the database. Can be called only by the Publisher contract.
diff --git a/test/compilationTests/corion/multiOwner.sol b/test/compilationTests/corion/multiOwner.sol
index 337467db..ecc51ac3 100644
--- a/test/compilationTests/corion/multiOwner.sol
+++ b/test/compilationTests/corion/multiOwner.sol
@@ -12,7 +12,7 @@ contract multiOwner is safeMath {
/*
Constructor
*/
- constructor(address[] newOwners) public {
+ constructor(address[] memory newOwners) public {
for ( uint256 a=0 ; a<newOwners.length ; a++ ) {
_addOwner(newOwners[a]);
}
@@ -41,7 +41,7 @@ contract multiOwner is safeMath {
function ownersForChange() public view returns (uint256 owners) {
return ownerCount * 75 / 100;
}
- function calcDoHash(string job, bytes32 data) public pure returns (bytes32 hash) {
+ function calcDoHash(string memory job, bytes32 data) public pure returns (bytes32 hash) {
return keccak256(abi.encodePacked(job, data));
}
function validDoHash(bytes32 doHash) public view returns (bool valid) {
diff --git a/test/compilationTests/corion/premium.sol b/test/compilationTests/corion/premium.sol
index e1f12ed0..45fe7666 100644
--- a/test/compilationTests/corion/premium.sol
+++ b/test/compilationTests/corion/premium.sol
@@ -40,7 +40,7 @@ contract premium is module, safeMath {
mapping(address => bool) public genesis;
- constructor(bool forReplace, address moduleHandler, address dbAddress, address icoContractAddr, address[] genesisAddr, uint256[] genesisValue) public {
+ constructor(bool forReplace, address moduleHandler, address dbAddress, address icoContractAddr, address[] memory genesisAddr, uint256[] memory genesisValue) public {
/*
Setup function.
If an ICOaddress is defined then the balance of the genesis addresses will be set as well.
@@ -246,7 +246,7 @@ contract premium is module, safeMath {
return true;
}
- function transferToContract(address from, address to, uint256 amount, bytes extraData) internal {
+ function transferToContract(address from, address to, uint256 amount, bytes memory extraData) internal {
/*
Inner function in order to transact a contract.
diff --git a/test/compilationTests/corion/provider.sol b/test/compilationTests/corion/provider.sol
index 35ade69f..3327ba8a 100644
--- a/test/compilationTests/corion/provider.sol
+++ b/test/compilationTests/corion/provider.sol
@@ -299,7 +299,7 @@ contract provider is module, safeMath, announcementTypes {
providers[addr].data[currHeight].currentRate = rate;
emit EProviderDetailsChanged(addr, currHeight, website, country, info, rate, admin);
}
- function getProviderInfo(address addr, uint256 height) public view returns (string name, string website, string country, string info, uint256 create) {
+ function getProviderInfo(address addr, uint256 height) public view returns (string memory name, string memory website, string memory country, string memory info, uint256 create) {
/*
for the infos of the provider.
In case the height is unknown then the system will use the last known height.
diff --git a/test/compilationTests/corion/publisher.sol b/test/compilationTests/corion/publisher.sol
index 44bc5964..575b99a8 100644
--- a/test/compilationTests/corion/publisher.sol
+++ b/test/compilationTests/corion/publisher.sol
@@ -70,7 +70,7 @@ contract publisher is announcementTypes, module, safeMath {
super.registerModuleHandler(moduleHandler);
}
- function Announcements(uint256 id) public view returns (uint256 Type, uint256 Start, uint256 End, bool Closed, string Announcement, string Link, bool Opposited, string _str, uint256 _uint, address _addr) {
+ function Announcements(uint256 id) public view returns (uint256 Type, uint256 Start, uint256 End, bool Closed, string memory Announcement, string memory Link, bool Opposited, string memory _str, uint256 _uint, address _addr) {
/*
Announcement data query
diff --git a/test/compilationTests/corion/schelling.sol b/test/compilationTests/corion/schelling.sol
index b8beaa3a..f236d378 100644
--- a/test/compilationTests/corion/schelling.sol
+++ b/test/compilationTests/corion/schelling.sol
@@ -174,7 +174,7 @@ contract schelling is module, announcementTypes, schellingVars {
function setFunds(address addr, uint256 amount) internal {
require( db.setFunds(addr, amount) );
}
- function setVoter(address owner, _voter voter) internal {
+ function setVoter(address owner, _voter memory voter) internal {
require( db.setVoter(owner,
voter.roundID,
voter.hash,
@@ -182,13 +182,13 @@ contract schelling is module, announcementTypes, schellingVars {
voter.voteResult,
voter.rewards
) );
- }
- function getVoter(address addr) internal view returns (_voter) {
+ }
+ function getVoter(address addr) internal view returns (_voter memory) {
(bool a, uint256 b, bytes32 c, schellingVars.voterStatus d, bool e, uint256 f) = db.getVoter(addr);
require( a );
return _voter(b, c, d, e, f);
}
- function setRound(uint256 id, _rounds round) internal {
+ function setRound(uint256 id, _rounds memory round) internal {
require( db.setRound(id,
round.totalAboveWeight,
round.totalBelowWeight,
@@ -197,8 +197,8 @@ contract schelling is module, announcementTypes, schellingVars {
round.voted
) );
}
- function pushRound(_rounds round) internal returns (uint256) {
- (bool a, uint256 b) = db.pushRound(
+ function pushRound(_rounds memory round) internal returns (uint256) {
+ (bool a, uint256 b) = db.pushRound(
round.totalAboveWeight,
round.totalBelowWeight,
round.reward,
@@ -208,7 +208,7 @@ contract schelling is module, announcementTypes, schellingVars {
require( a );
return b;
}
- function getRound(uint256 id) internal returns (_rounds) {
+ function getRound(uint256 id) internal returns (_rounds memory) {
(bool a, uint256 b, uint256 c, uint256 d, uint256 e, bool f) = db.getRound(id);
require( a );
return _rounds(b, c, d, e, f);
@@ -529,7 +529,7 @@ contract schelling is module, announcementTypes, schellingVars {
return belowW;
}
}
- function isWinner(_rounds round, bool aboveVote) internal returns (bool) {
+ function isWinner(_rounds memory round, bool aboveVote) internal returns (bool) {
/*
Inside function for calculating the result of the game.
diff --git a/test/compilationTests/corion/token.sol b/test/compilationTests/corion/token.sol
index 8ca18083..6c8f6f24 100644
--- a/test/compilationTests/corion/token.sol
+++ b/test/compilationTests/corion/token.sol
@@ -48,7 +48,7 @@ contract token is safeMath, module, announcementTypes {
mapping(address => bool) public genesis;
- constructor(bool forReplace, address moduleHandler, address dbAddr, address icoContractAddr, address exchangeContractAddress, address[] genesisAddr, uint256[] genesisValue) public payable {
+ constructor(bool forReplace, address moduleHandler, address dbAddr, address icoContractAddr, address exchangeContractAddress, address[] memory genesisAddr, uint256[] memory genesisValue) public payable {
/*
Installation function
@@ -288,7 +288,7 @@ contract token is safeMath, module, announcementTypes {
return true;
}
- function _transferToContract(address from, address to, uint256 amount, bytes extraData) internal {
+ function _transferToContract(address from, address to, uint256 amount, bytes memory extraData) internal {
/*
Internal function to start transactions to a contract