mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Update external tests.
This commit is contained in:
parent
13905a2094
commit
b30da8859a
@ -140,7 +140,7 @@ contract moduleHandler is multiOwner, announcementTypes {
|
||||
}
|
||||
return (true, false, 0);
|
||||
}
|
||||
function replaceModule(string name, address addr, bool callCallback) external returns (bool success) {
|
||||
function replaceModule(string calldata name, address addr, bool callCallback) external returns (bool success) {
|
||||
/*
|
||||
Module replace, can be called only by the Publisher contract.
|
||||
|
||||
@ -167,7 +167,7 @@ contract moduleHandler is multiOwner, announcementTypes {
|
||||
return true;
|
||||
}
|
||||
|
||||
function callReplaceCallback(string moduleName, address newModule) external returns (bool success) {
|
||||
function callReplaceCallback(string calldata moduleName, address newModule) external returns (bool success) {
|
||||
require( block.number < debugModeUntil );
|
||||
if ( ! insertAndCheckDo(calcDoHash("callReplaceCallback", keccak256(abi.encodePacked(moduleName, newModule)))) ) {
|
||||
return true;
|
||||
@ -178,7 +178,7 @@ contract moduleHandler is multiOwner, announcementTypes {
|
||||
return true;
|
||||
}
|
||||
|
||||
function newModule(string name, address addr, bool schellingEvent, bool transferEvent) external returns (bool success) {
|
||||
function newModule(string calldata 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.
|
||||
|
||||
@ -199,7 +199,7 @@ contract moduleHandler is multiOwner, announcementTypes {
|
||||
addModule( modules_s(addr, keccak256(bytes(name)), schellingEvent, transferEvent), true);
|
||||
return true;
|
||||
}
|
||||
function dropModule(string name, bool callCallback) external returns (bool success) {
|
||||
function dropModule(string calldata name, bool callCallback) external returns (bool success) {
|
||||
/*
|
||||
Deleting module from the database. Can be called only by the Publisher contract.
|
||||
|
||||
@ -224,7 +224,7 @@ contract moduleHandler is multiOwner, announcementTypes {
|
||||
return true;
|
||||
}
|
||||
|
||||
function callDisableCallback(string moduleName) external returns (bool success) {
|
||||
function callDisableCallback(string calldata moduleName) external returns (bool success) {
|
||||
require( block.number < debugModeUntil );
|
||||
if ( ! insertAndCheckDo(calcDoHash("callDisableCallback", keccak256(bytes(moduleName)))) ) {
|
||||
return true;
|
||||
@ -406,7 +406,7 @@ contract moduleHandler is multiOwner, announcementTypes {
|
||||
require( token(modules[_id].addr).burn(from, value) );
|
||||
return true;
|
||||
}
|
||||
function configureModule(string moduleName, announcementType aType, uint256 value) external returns (bool success) {
|
||||
function configureModule(string calldata moduleName, announcementType aType, uint256 value) external returns (bool success) {
|
||||
/*
|
||||
Changing configuration of a module. Can be called only by Publisher or while debug mode by owners.
|
||||
|
||||
|
@ -5,8 +5,8 @@ import "./tokenDB.sol";
|
||||
import "./module.sol";
|
||||
|
||||
contract thirdPartyPContractAbstract {
|
||||
function receiveCorionPremiumToken(address, uint256, bytes) external returns (bool, uint256) {}
|
||||
function approvedCorionPremiumToken(address, uint256, bytes) external returns (bool) {}
|
||||
function receiveCorionPremiumToken(address, uint256, bytes calldata) external returns (bool, uint256) {}
|
||||
function approvedCorionPremiumToken(address, uint256, bytes calldata) external returns (bool) {}
|
||||
}
|
||||
|
||||
contract ptokenDB is tokenDB {}
|
||||
@ -108,7 +108,7 @@ contract premium is module, safeMath {
|
||||
* @param extraData Data to give forward to the receiver
|
||||
* @return True if the approval was successful
|
||||
*/
|
||||
function approveAndCall(address spender, uint256 amount, uint256 nonce, bytes extraData) isReady external returns (bool success) {
|
||||
function approveAndCall(address spender, uint256 amount, uint256 nonce, bytes calldata extraData) isReady external returns (bool success) {
|
||||
/*
|
||||
Authorize another address to use an exact amount of the principal’s balance.
|
||||
After the transaction the approvedCorionPremiumToken function of the address will be called with the given data.
|
||||
@ -226,7 +226,7 @@ contract premium is module, safeMath {
|
||||
* @param extraData Data to give forward to the receiver
|
||||
* @return Whether the transfer was successful or not
|
||||
*/
|
||||
function transfer(address to, uint256 amount, bytes extraData) isReady external returns (bool success) {
|
||||
function transfer(address to, uint256 amount, bytes calldata extraData) isReady external returns (bool success) {
|
||||
/*
|
||||
Launch a transaction where we transfer from a given address to another one.
|
||||
After thetransaction the approvedCorionPremiumToken function of the receiver’s address is going to be called with the given data.
|
||||
|
@ -213,7 +213,7 @@ contract provider is module, safeMath, announcementTypes {
|
||||
return ( ! priv && ( rate >= publicMinRate && rate <= publicMaxRate ) ) ||
|
||||
( priv && ( rate >= privateMinRate && rate <= privateMaxRate ) );
|
||||
}
|
||||
function createProvider(bool priv, string name, string website, string country, string info, uint8 rate, bool isForRent, address admin) isReady external {
|
||||
function createProvider(bool priv, string calldata name, string calldata website, string calldata country, string calldata info, uint8 rate, bool isForRent, address admin) isReady external {
|
||||
/*
|
||||
Creating a provider.
|
||||
During the ICO its not allowed to create provider.
|
||||
@ -270,7 +270,7 @@ contract provider is module, safeMath, announcementTypes {
|
||||
}
|
||||
emit EProviderOpen(msg.sender, currHeight);
|
||||
}
|
||||
function setProviderDetails(address addr, string website, string country, string info, uint8 rate, address admin) isReady external {
|
||||
function setProviderDetails(address addr, string calldata website, string calldata country, string calldata info, uint8 rate, address admin) isReady external {
|
||||
/*
|
||||
Modifying the datas of the provider.
|
||||
This can only be invited by the provider’s admin.
|
||||
@ -369,7 +369,7 @@ contract provider is module, safeMath, announcementTypes {
|
||||
setRightForInterest(getProviderCurrentSupply(msg.sender), 0, providers[msg.sender].data[currHeight].priv);
|
||||
emit EProviderClose(msg.sender, currHeight);
|
||||
}
|
||||
function allowUsers(address provider, address[] addr) isReady external {
|
||||
function allowUsers(address provider, address[] calldata addr) isReady external {
|
||||
/*
|
||||
Permition of the user to be able to connect to the provider.
|
||||
This can only be invited by the provider’s admin.
|
||||
@ -387,7 +387,7 @@ contract provider is module, safeMath, announcementTypes {
|
||||
providers[provider].data[currHeight].allowedUsers[addr[a]] = true;
|
||||
}
|
||||
}
|
||||
function disallowUsers(address provider, address[] addr) isReady external {
|
||||
function disallowUsers(address provider, address[] calldata addr) isReady external {
|
||||
/*
|
||||
Disable of the user not to be able to connect to the provider.
|
||||
It is can called only for the admin of the provider.
|
||||
|
@ -116,7 +116,7 @@ contract publisher is announcementTypes, module, safeMath {
|
||||
return _amount * oppositeRate / 100 > weight;
|
||||
}
|
||||
|
||||
function newAnnouncement(announcementType Type, string Announcement, string Link, bool Oppositable, string _str, uint256 _uint, address _addr) onlyOwner external {
|
||||
function newAnnouncement(announcementType Type, string calldata Announcement, string calldata Link, bool Oppositable, string calldata _str, uint256 _uint, address _addr) onlyOwner external {
|
||||
/*
|
||||
New announcement. Can be called only by those in the admin list
|
||||
|
||||
|
@ -310,7 +310,7 @@ contract schelling is module, announcementTypes, schellingVars {
|
||||
|
||||
setRound(currentRound, round);
|
||||
}
|
||||
function sendVote(string vote) isReady noContract external {
|
||||
function sendVote(string calldata vote) isReady noContract external {
|
||||
/*
|
||||
Check vote (Envelope opening)
|
||||
Only the sent “envelopes” can be opened.
|
||||
|
@ -7,8 +7,8 @@ import "./moduleHandler.sol";
|
||||
import "./tokenDB.sol";
|
||||
|
||||
contract thirdPartyContractAbstract {
|
||||
function receiveCorionToken(address, uint256, bytes) external returns (bool, uint256) {}
|
||||
function approvedCorionToken(address, uint256, bytes) external returns (bool) {}
|
||||
function receiveCorionToken(address, uint256, bytes calldata) external returns (bool, uint256) {}
|
||||
function approvedCorionToken(address, uint256, bytes calldata) external returns (bool) {}
|
||||
}
|
||||
|
||||
contract token is safeMath, module, announcementTypes {
|
||||
@ -123,7 +123,7 @@ contract token is safeMath, module, announcementTypes {
|
||||
* @param extraData Data to give forward to the receiver
|
||||
* @return True if the approval was successful
|
||||
*/
|
||||
function approveAndCall(address spender, uint256 amount, uint256 nonce, bytes extraData) isReady external returns (bool success) {
|
||||
function approveAndCall(address spender, uint256 amount, uint256 nonce, bytes calldata extraData) isReady external returns (bool success) {
|
||||
/*
|
||||
Authorise another address to use a certain quantity of the authorising owner’s balance
|
||||
Following the transaction the receiver address `approvedCorionToken` function is called by the given data
|
||||
@ -267,7 +267,7 @@ contract token is safeMath, module, announcementTypes {
|
||||
* @param extraData Data to give forward to the receiver
|
||||
* @return Whether the transfer was successful or not
|
||||
*/
|
||||
function transfer(address to, uint256 amount, bytes extraData) isReady external returns (bool success) {
|
||||
function transfer(address to, uint256 amount, bytes calldata extraData) isReady external returns (bool success) {
|
||||
/*
|
||||
Start transaction to send a quantity from a given address to another address
|
||||
After transaction the function `receiveCorionToken`of the receiver is called by the given data
|
||||
|
@ -55,7 +55,7 @@ contract MultisigWallet is Multisig, Shareable, DayLimit {
|
||||
* @param _value The value to send
|
||||
* @param _data The data part of the transaction
|
||||
*/
|
||||
function execute(address _to, uint256 _value, bytes _data) external onlyOwner returns (bytes32 _r) {
|
||||
function execute(address _to, uint256 _value, bytes calldata _data) external onlyOwner returns (bytes32 _r) {
|
||||
// first, take the opportunity to check that we're under the daily limit.
|
||||
if (underLimit(_value)) {
|
||||
emit SingleTransact(msg.sender, _value, _to, _data);
|
||||
|
@ -18,7 +18,7 @@ contract HasNoTokens is Ownable {
|
||||
* @param value_ uint256 the amount of the specified token
|
||||
* @param data_ Bytes The data passed from the caller.
|
||||
*/
|
||||
function tokenFallback(address from_, uint256 value_, bytes data_) external {
|
||||
function tokenFallback(address from_, uint256 value_, bytes calldata data_) external {
|
||||
revert();
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,6 @@ contract Multisig {
|
||||
|
||||
// TODO: document
|
||||
function changeOwner(address _from, address _to) external;
|
||||
function execute(address _to, uint256 _value, bytes _data) external returns (bytes32);
|
||||
function execute(address _to, uint256 _value, bytes calldata _data) external returns (bytes32);
|
||||
function confirm(bytes32 _h) public returns (bool);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user