From ae68c061d11f112c3fff4c8b5ab887d36c47c8d8 Mon Sep 17 00:00:00 2001 From: Lawrence Forman Date: Thu, 6 Feb 2020 01:01:03 -0500 Subject: [PATCH] `@0x/asset-proxy`: Add more functions to `IDydx`. `@0x/dev-utils`: Fix all the weird dydx base unit madness. --- contracts/asset-proxy/contracts/src/interfaces/IDydx.sol | 9 +++++++++ contracts/asset-proxy/contracts/test/TestDydxBridge.sol | 3 +++ 2 files changed, 12 insertions(+) diff --git a/contracts/asset-proxy/contracts/src/interfaces/IDydx.sol b/contracts/asset-proxy/contracts/src/interfaces/IDydx.sol index 1ec67a2dfe..b1aaac75b7 100644 --- a/contracts/asset-proxy/contracts/src/interfaces/IDydx.sol +++ b/contracts/asset-proxy/contracts/src/interfaces/IDydx.sol @@ -189,4 +189,13 @@ interface IDydx { external view returns (Value memory supplyValue, Value memory borrowValue); + + // @dev Approves/disapproves any number of operators. An operator is an external address that has the + // same permissions to manipulate an account as the owner of the account. Operators are simply + // addresses and therefore may either be externally-owned Ethereum accounts OR smart contracts. + // Operators are also able to act as AutoTrader contracts on behalf of the account owner if the + // operator is a smart contract and implements the IAutoTrader interface. + // @param args A list of OperatorArgs which have an address and a boolean. The boolean value + // denotes whether to approve (true) or revoke approval (false) for that address. + function setOperators(OperatorArg[] calldata args) external; } diff --git a/contracts/asset-proxy/contracts/test/TestDydxBridge.sol b/contracts/asset-proxy/contracts/test/TestDydxBridge.sol index d23425b865..275d4f1dfb 100644 --- a/contracts/asset-proxy/contracts/test/TestDydxBridge.sol +++ b/contracts/asset-proxy/contracts/test/TestDydxBridge.sol @@ -226,6 +226,9 @@ contract TestDydxBridge is returns (Value memory supplyValue, Value memory borrowValue) {} + /// @dev Unused. + function setOperators(OperatorArg[] calldata args) external {} + /// @dev overrides `_getDydxAddress()` from `DeploymentConstants` to return this address. function _getDydxAddress() internal