aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src/2.0.0/test
diff options
context:
space:
mode:
authorAmir Bandeali <abandeali1@gmail.com>2018-07-07 05:12:53 +0800
committerAmir Bandeali <abandeali1@gmail.com>2018-07-11 02:24:22 +0800
commit092ca6bcf5de2d94ff503f11233c87d428eedcb8 (patch)
tree892cc61220dd4bbc769ef0e43c034b9a780103b0 /packages/contracts/src/2.0.0/test
parent2625cbbfed087dae55c62950a9260145cf5ca8e6 (diff)
downloaddexon-sol-tools-092ca6bcf5de2d94ff503f11233c87d428eedcb8.tar.gz
dexon-sol-tools-092ca6bcf5de2d94ff503f11233c87d428eedcb8.tar.zst
dexon-sol-tools-092ca6bcf5de2d94ff503f11233c87d428eedcb8.zip
Use 0.4.10 in AssetProxyOwner, add readBytes4 to contract and remove LibBytes
Diffstat (limited to 'packages/contracts/src/2.0.0/test')
-rw-r--r--packages/contracts/src/2.0.0/test/TestAssetProxyOwner/TestAssetProxyOwner.sol23
1 files changed, 18 insertions, 5 deletions
diff --git a/packages/contracts/src/2.0.0/test/TestAssetProxyOwner/TestAssetProxyOwner.sol b/packages/contracts/src/2.0.0/test/TestAssetProxyOwner/TestAssetProxyOwner.sol
index d6b6b29f2..75e782d43 100644
--- a/packages/contracts/src/2.0.0/test/TestAssetProxyOwner/TestAssetProxyOwner.sol
+++ b/packages/contracts/src/2.0.0/test/TestAssetProxyOwner/TestAssetProxyOwner.sol
@@ -16,7 +16,7 @@
*/
-pragma solidity 0.4.24;
+pragma solidity 0.4.10;
import "../../protocol/AssetProxyOwner/AssetProxyOwner.sol";
@@ -26,7 +26,7 @@ contract TestAssetProxyOwner is
AssetProxyOwner
{
- constructor(
+ function TestAssetProxyOwner(
address[] memory _owners,
address[] memory _assetProxyContracts,
uint256 _required,
@@ -38,7 +38,6 @@ contract TestAssetProxyOwner is
function testValidRemoveAuthorizedAddressAtIndexTx(uint256 id)
public
- view
validRemoveAuthorizedAddressAtIndexTx(id)
returns (bool)
{
@@ -51,9 +50,23 @@ contract TestAssetProxyOwner is
/// @return Successful if data is a call to `removeAuthorizedAddressAtIndex`.
function isFunctionRemoveAuthorizedAddressAtIndex(bytes memory data)
public
- pure
returns (bool)
{
- return data.readBytes4(0) == REMOVE_AUTHORIZED_ADDRESS_AT_INDEX_SELECTOR;
+ return readBytes4(data, 0) == REMOVE_AUTHORIZED_ADDRESS_AT_INDEX_SELECTOR;
+ }
+
+ /// @dev Reads an unpadded bytes4 value from a position in a byte array.
+ /// @param b Byte array containing a bytes4 value.
+ /// @param index Index in byte array of bytes4 value.
+ /// @return bytes4 value from byte array.
+ function publicReadBytes4(
+ bytes memory b,
+ uint256 index
+ )
+ public
+ returns (bytes4 result)
+ {
+ result = readBytes4(b, index);
+ return result;
}
}