diff options
author | Greg Hysen <greg.hysen@gmail.com> | 2018-04-18 08:00:55 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-04-21 04:56:18 +0800 |
commit | ab13ce96cccb2e3f35f3c420e0613d7fa82a3936 (patch) | |
tree | 69f2cbc4ed25380ee7025664526f270ae35a8af5 /packages/contracts/src | |
parent | ac0c35424b75bf365301819217960be2602e1c44 (diff) | |
download | dexon-sol-tools-ab13ce96cccb2e3f35f3c420e0613d7fa82a3936.tar dexon-sol-tools-ab13ce96cccb2e3f35f3c420e0613d7fa82a3936.tar.gz dexon-sol-tools-ab13ce96cccb2e3f35f3c420e0613d7fa82a3936.tar.bz2 dexon-sol-tools-ab13ce96cccb2e3f35f3c420e0613d7fa82a3936.tar.lz dexon-sol-tools-ab13ce96cccb2e3f35f3c420e0613d7fa82a3936.tar.xz dexon-sol-tools-ab13ce96cccb2e3f35f3c420e0613d7fa82a3936.tar.zst dexon-sol-tools-ab13ce96cccb2e3f35f3c420e0613d7fa82a3936.zip |
Renamed addAssetProxy back to registerAssetProxy; this seemed to cause less confusion. Also updated the function description.
Diffstat (limited to 'packages/contracts/src')
3 files changed, 15 insertions, 11 deletions
diff --git a/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/AssetProxyDispatcher.sol b/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/AssetProxyDispatcher.sol index 0a1bb0437..2c689496f 100644 --- a/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/AssetProxyDispatcher.sol +++ b/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/AssetProxyDispatcher.sol @@ -24,9 +24,9 @@ import "../../utils/Ownable/Ownable.sol"; import "../../utils/Authorizable/Authorizable.sol"; contract AssetProxyDispatcher is - IAssetProxyDispatcher, Ownable, - Authorizable + Authorizable, + IAssetProxyDispatcher { // Mapping from Asset Proxy Id's to their respective Asset Proxy mapping (uint8 => IAssetProxy) public assetProxies; @@ -53,11 +53,13 @@ contract AssetProxyDispatcher is assetProxy.transferFrom(assetMetadata, from, to, amount); } - /// @dev Adds a new asset proxy. - /// @param assetProxyId Id of the asset proxy. - /// @param newAssetProxy Asset proxy contract to add, or 0x0 to unset assetProxyId. + /// @dev Registers an asset proxy to an asset proxy id. + /// An id can only be assigned to a single proxy at a given time, + /// however, an asset proxy may be registered to multiple ids. + /// @param assetProxyId Id to register`newAssetProxy` under. + /// @param newAssetProxy asset proxy to register, or 0x0 to unset assetProxyId. /// @param currentAssetProxy Existing asset proxy to overwrite, or 0x0 if assetProxyId is currently unused. - function addAssetProxy( + function registerAssetProxy( uint8 assetProxyId, IAssetProxy newAssetProxy, IAssetProxy currentAssetProxy) diff --git a/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/IAssetProxy.sol b/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/IAssetProxy.sol index 5e2ba4843..60e74723d 100644 --- a/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/IAssetProxy.sol +++ b/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/IAssetProxy.sol @@ -18,7 +18,7 @@ pragma solidity ^0.4.21; -import "../../../utils/Authorizable/IAuthorizable.sol"; +import "../../utils/Authorizable/IAuthorizable.sol"; contract IAssetProxy is IAuthorizable { diff --git a/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/IAssetProxyDispatcher.sol b/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/IAssetProxyDispatcher.sol index 912a413e8..044983823 100644 --- a/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/IAssetProxyDispatcher.sol +++ b/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/IAssetProxyDispatcher.sol @@ -35,11 +35,13 @@ contract IAssetProxyDispatcher is IAssetProxy oldAssetClassAddress ); - /// @dev Adds a new asset proxy. - /// @param assetProxyId Id of the asset proxy. - /// @param newAssetProxy Asset proxy contract to add, or 0x0 to unset assetProxyId. + /// @dev Registers an asset proxy to an asset proxy id. + /// An id can only be assigned to a single proxy at a given time, + /// however, an asset proxy may be registered to multiple ids. + /// @param assetProxyId Id to register`newAssetProxy` under. + /// @param newAssetProxy asset proxy to register, or 0x0 to unset assetProxyId. /// @param currentAssetProxy Existing asset proxy to overwrite, or 0x0 if assetProxyId is currently unused. - function addAssetProxy( + function registerAssetProxy( uint8 assetProxyId, IAssetProxy newAssetProxy, IAssetProxy currentAssetProxy) |