aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-04-11 13:24:21 +0800
committerAmir Bandeali <abandeali1@gmail.com>2018-04-21 04:56:17 +0800
commitd72a7318658e3f6f860db7e9aa6dc9059451d7b0 (patch)
treebe32a2f0f862d388e0abc1f2bbfe4fffe8c69f8d /packages
parentf35fe56d9b60ccee84e1bb8898700f839f92a917 (diff)
downloaddexon-sol-tools-d72a7318658e3f6f860db7e9aa6dc9059451d7b0.tar
dexon-sol-tools-d72a7318658e3f6f860db7e9aa6dc9059451d7b0.tar.gz
dexon-sol-tools-d72a7318658e3f6f860db7e9aa6dc9059451d7b0.tar.bz2
dexon-sol-tools-d72a7318658e3f6f860db7e9aa6dc9059451d7b0.tar.lz
dexon-sol-tools-d72a7318658e3f6f860db7e9aa6dc9059451d7b0.tar.xz
dexon-sol-tools-d72a7318658e3f6f860db7e9aa6dc9059451d7b0.tar.zst
dexon-sol-tools-d72a7318658e3f6f860db7e9aa6dc9059451d7b0.zip
setAssetProxy to addAssetProxy
Diffstat (limited to 'packages')
-rw-r--r--packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/AssetProxyDispatcher.sol2
-rw-r--r--packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/IAssetProxyDispatcher.sol2
-rw-r--r--packages/contracts/test/asset_proxy_dispatcher/dispatcher.ts28
-rw-r--r--packages/contracts/test/exchange/core.ts6
-rw-r--r--packages/contracts/test/exchange/helpers.ts4
-rw-r--r--packages/contracts/test/exchange/wrapper.ts4
6 files changed, 23 insertions, 23 deletions
diff --git a/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/AssetProxyDispatcher.sol b/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/AssetProxyDispatcher.sol
index cce330818..e22b88b34 100644
--- a/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/AssetProxyDispatcher.sol
+++ b/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/AssetProxyDispatcher.sol
@@ -58,7 +58,7 @@ contract AssetProxyDispatcher is
/// @param assetProxyId Id of the asset proxy.
/// @param newAssetProxyAddress Address of the asset proxy contract to register.
/// @param currentAssetProxyAddress Address of existing asset proxy to overwrite.
- function setAssetProxy(
+ function addAssetProxy(
uint8 assetProxyId,
address newAssetProxyAddress,
address currentAssetProxyAddress)
diff --git a/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/IAssetProxyDispatcher.sol b/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/IAssetProxyDispatcher.sol
index 9fe7b49a3..e86e99ab9 100644
--- a/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/IAssetProxyDispatcher.sol
+++ b/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/IAssetProxyDispatcher.sol
@@ -36,7 +36,7 @@ contract IAssetProxyDispatcher is
/// @param assetProxyId Id of the asset proxy.
/// @param newAssetProxyAddress Address of the asset proxy contract to register.
/// @param currentAssetProxyAddress Address of existing asset proxy to overwrite.
- function setAssetProxy(
+ function addAssetProxy(
uint8 assetProxyId,
address newAssetProxyAddress,
address currentAssetProxyAddress)
diff --git a/packages/contracts/test/asset_proxy_dispatcher/dispatcher.ts b/packages/contracts/test/asset_proxy_dispatcher/dispatcher.ts
index f7235ae47..6df4e0eab 100644
--- a/packages/contracts/test/asset_proxy_dispatcher/dispatcher.ts
+++ b/packages/contracts/test/asset_proxy_dispatcher/dispatcher.ts
@@ -124,9 +124,9 @@ describe('AssetProxyDispatcher', () => {
await blockchainLifecycle.revertAsync();
});
- describe('setAssetProxy', () => {
+ describe('addAssetProxy', () => {
it('should record proxy upon registration', async () => {
- await assetProxyDispatcher.setAssetProxy.sendTransactionAsync(
+ await assetProxyDispatcher.addAssetProxy.sendTransactionAsync(
AssetProxyId.ERC20,
erc20TransferProxy.address,
nilAddress,
@@ -137,7 +137,7 @@ describe('AssetProxyDispatcher', () => {
});
it('should be able to record multiple proxies', async () => {
- await assetProxyDispatcher.setAssetProxy.sendTransactionAsync(
+ await assetProxyDispatcher.addAssetProxy.sendTransactionAsync(
AssetProxyId.ERC20,
erc20TransferProxy.address,
nilAddress,
@@ -146,7 +146,7 @@ describe('AssetProxyDispatcher', () => {
let proxyAddress = await assetProxyDispatcher.getAssetProxy.callAsync(AssetProxyId.ERC20);
expect(proxyAddress).to.be.equal(erc20TransferProxy.address);
- await assetProxyDispatcher.setAssetProxy.sendTransactionAsync(
+ await assetProxyDispatcher.addAssetProxy.sendTransactionAsync(
AssetProxyId.ERC721,
erc721TransferProxy.address,
nilAddress,
@@ -157,7 +157,7 @@ describe('AssetProxyDispatcher', () => {
});
it('should replace proxy address upon re-registration', async () => {
- await assetProxyDispatcher.setAssetProxy.sendTransactionAsync(
+ await assetProxyDispatcher.addAssetProxy.sendTransactionAsync(
AssetProxyId.ERC20,
erc20TransferProxy.address,
nilAddress,
@@ -176,7 +176,7 @@ describe('AssetProxyDispatcher', () => {
const newAddress = newErc20TransferProxy.address;
const currentAddress = erc20TransferProxy.address;
- await assetProxyDispatcher.setAssetProxy.sendTransactionAsync(
+ await assetProxyDispatcher.addAssetProxy.sendTransactionAsync(
AssetProxyId.ERC20,
newAddress,
currentAddress,
@@ -187,7 +187,7 @@ describe('AssetProxyDispatcher', () => {
});
it('should throw if registering with incorrect "old_address" field', async () => {
- await assetProxyDispatcher.setAssetProxy.sendTransactionAsync(
+ await assetProxyDispatcher.addAssetProxy.sendTransactionAsync(
AssetProxyId.ERC20,
erc20TransferProxy.address,
nilAddress,
@@ -198,7 +198,7 @@ describe('AssetProxyDispatcher', () => {
// The following transaction will throw because the currentAddress is no longer nilAddress
return expect(
- assetProxyDispatcher.setAssetProxy.sendTransactionAsync(
+ assetProxyDispatcher.addAssetProxy.sendTransactionAsync(
AssetProxyId.ERC20,
erc20TransferProxy.address,
nilAddress,
@@ -208,7 +208,7 @@ describe('AssetProxyDispatcher', () => {
});
it('should be able to reset proxy address to NULL', async () => {
- await assetProxyDispatcher.setAssetProxy.sendTransactionAsync(
+ await assetProxyDispatcher.addAssetProxy.sendTransactionAsync(
AssetProxyId.ERC20,
erc20TransferProxy.address,
nilAddress,
@@ -218,7 +218,7 @@ describe('AssetProxyDispatcher', () => {
expect(proxyAddress).to.be.equal(erc20TransferProxy.address);
// The following transaction will reset the proxy address
- await assetProxyDispatcher.setAssetProxy.sendTransactionAsync(
+ await assetProxyDispatcher.addAssetProxy.sendTransactionAsync(
AssetProxyId.ERC20,
nilAddress,
erc20TransferProxy.address,
@@ -230,7 +230,7 @@ describe('AssetProxyDispatcher', () => {
it('should throw if requesting address is not authorized', async () => {
return expect(
- assetProxyDispatcher.setAssetProxy.sendTransactionAsync(
+ assetProxyDispatcher.addAssetProxy.sendTransactionAsync(
AssetProxyId.ERC20,
erc20TransferProxy.address,
nilAddress,
@@ -242,7 +242,7 @@ describe('AssetProxyDispatcher', () => {
describe('getAssetProxy', () => {
it('should return correct address of registered proxy', async () => {
- await assetProxyDispatcher.setAssetProxy.sendTransactionAsync(
+ await assetProxyDispatcher.addAssetProxy.sendTransactionAsync(
AssetProxyId.ERC20,
erc20TransferProxy.address,
nilAddress,
@@ -261,7 +261,7 @@ describe('AssetProxyDispatcher', () => {
describe('transferFrom', () => {
it('should dispatch transfer to registered proxy', async () => {
// Register ERC20 proxy
- await assetProxyDispatcher.setAssetProxy.sendTransactionAsync(
+ await assetProxyDispatcher.addAssetProxy.sendTransactionAsync(
AssetProxyId.ERC20,
erc20TransferProxy.address,
nilAddress,
@@ -312,7 +312,7 @@ describe('AssetProxyDispatcher', () => {
it('should throw if requesting address is not authorized', async () => {
// Register ERC20 proxy
- await assetProxyDispatcher.setAssetProxy.sendTransactionAsync(
+ await assetProxyDispatcher.addAssetProxy.sendTransactionAsync(
AssetProxyId.ERC20,
erc20TransferProxy.address,
nilAddress,
diff --git a/packages/contracts/test/exchange/core.ts b/packages/contracts/test/exchange/core.ts
index f0856eac3..49a05fd5b 100644
--- a/packages/contracts/test/exchange/core.ts
+++ b/packages/contracts/test/exchange/core.ts
@@ -154,19 +154,19 @@ describe('Exchange', () => {
from: accounts[0],
});
const nilAddress = '0x0000000000000000000000000000000000000000';
- await assetProxyDispatcher.setAssetProxy.sendTransactionAsync(
+ await assetProxyDispatcher.addAssetProxy.sendTransactionAsync(
AssetProxyId.ERC20_V1,
erc20TransferProxyV1.address,
nilAddress,
{ from: accounts[0] },
);
- await assetProxyDispatcher.setAssetProxy.sendTransactionAsync(
+ await assetProxyDispatcher.addAssetProxy.sendTransactionAsync(
AssetProxyId.ERC20,
erc20TransferProxy.address,
nilAddress,
{ from: accounts[0] },
);
- await assetProxyDispatcher.setAssetProxy.sendTransactionAsync(
+ await assetProxyDispatcher.addAssetProxy.sendTransactionAsync(
AssetProxyId.ERC721,
erc721TransferProxy.address,
nilAddress,
diff --git a/packages/contracts/test/exchange/helpers.ts b/packages/contracts/test/exchange/helpers.ts
index 32e06e988..97421e644 100644
--- a/packages/contracts/test/exchange/helpers.ts
+++ b/packages/contracts/test/exchange/helpers.ts
@@ -69,13 +69,13 @@ describe('Exchange', () => {
from: accounts[0],
});
const nilAddress = '0x0000000000000000000000000000000000000000';
- await assetProxyDispatcher.setAssetProxy.sendTransactionAsync(
+ await assetProxyDispatcher.addAssetProxy.sendTransactionAsync(
AssetProxyId.ERC20_V1,
erc20TransferProxyV1.address,
nilAddress,
{ from: accounts[0] },
);
- await assetProxyDispatcher.setAssetProxy.sendTransactionAsync(
+ await assetProxyDispatcher.addAssetProxy.sendTransactionAsync(
AssetProxyId.ERC20,
erc20TransferProxy.address,
nilAddress,
diff --git a/packages/contracts/test/exchange/wrapper.ts b/packages/contracts/test/exchange/wrapper.ts
index 28547034e..f993eb2d3 100644
--- a/packages/contracts/test/exchange/wrapper.ts
+++ b/packages/contracts/test/exchange/wrapper.ts
@@ -119,13 +119,13 @@ describe('Exchange', () => {
from: accounts[0],
});
const nilAddress = '0x0000000000000000000000000000000000000000';
- await assetProxyDispatcher.setAssetProxy.sendTransactionAsync(
+ await assetProxyDispatcher.addAssetProxy.sendTransactionAsync(
AssetProxyId.ERC20_V1,
erc20TransferProxyV1.address,
nilAddress,
{ from: accounts[0] },
);
- await assetProxyDispatcher.setAssetProxy.sendTransactionAsync(
+ await assetProxyDispatcher.addAssetProxy.sendTransactionAsync(
AssetProxyId.ERC20,
erc20TransferProxy.address,
nilAddress,