@reflexer-finance/geb-contract-api
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -1,2 +0,2 @@ | ||
import { AccountingEngine, TaxCollector, LiquidationEngine, OracleRelayer, GlobalSettlement, DebtAuctionHouse, PreSettlementSurplusAuctionHouse, PostSettlementSurplusAuctionHouse, SettlementSurplusAuctioneer, Coin, GebSafeManager, GetSafes, BasicCollateralJoin, CoinJoin, GebProxyRegistry, EnglishCollateralAuctionHouse, FixedDiscountCollateralAuctionHouse, Weth } from '.'; | ||
import { AccountingEngine, TaxCollector, LiquidationEngine, OracleRelayer, GlobalSettlement, DebtAuctionHouse, PreSettlementSurplusAuctionHouse, PostSettlementSurplusAuctionHouse, SettlementSurplusAuctioneer, Coin, GebSafeManager, GetSafes, BasicCollateralJoin, CoinJoin, GebProxyRegistry, EnglishCollateralAuctionHouse, FixedDiscountCollateralAuctionHouse, Weth, SafeEngine } from '.'; | ||
import { ChainProviderInterface } from '@reflexer-finance/geb-provider'; | ||
@@ -10,2 +10,3 @@ export declare type ContractKey = 'ETH_FROM' | 'STARTING_BLOCK_NUMBER' | 'PROXY_DEPLOYER' | 'COIN_TYPE' | 'GOVERNANCE_TYPE' | 'MULTICALL' | 'FAUCET' | 'GEB_MULTISIG' | 'GEB_MULTISIG_PROXY' | 'GEB_DEPLOY' | 'GEB_PROT' | 'PROTOCOL_TOKEN_AUTHORITY' | 'PRINTING_PERMISSIONS_REGISTRY' | 'GEB_PAUSE_AUTHORITY' | 'GEB_POLLING_EMITTER' | 'GEB_SAFE_ENGINE' | 'GEB_TAX_COLLECTOR' | 'GEB_LIQUIDATION_ENGINE' | 'GEB_ACCOUNTING_ENGINE' | 'GEB_COIN_JOIN' | 'GEB_SETTLEMENT_SURPLUS_AUCTIONEER' | 'GEB_PRE_SETTLEMENT_SURPLUS_AUCTION_HOUSE' | 'GEB_POST_SETTLEMENT_SURPLUS_AUCTION_HOUSE' | 'GEB_DEBT_AUCTION_HOUSE' | 'GEB_PAUSE' | 'GEB_PAUSE_PROXY' | 'GEB_GOV_ACTIONS' | 'GEB_COIN' | 'GEB_ORACLE_RELAYER' | 'GEB_GLOBAL_SETTLEMENT' | 'GEB_ESM' | 'GEB_ESM_TOKEN_BURNER' | 'PROXY_ACTIONS' | 'PROXY_ACTIONS_GLOBAL_SETTLEMENT' | 'SAFE_MANAGER' | 'GET_SAFES' | 'FSM_GOV_INTERFACE' | 'PROXY_FACTORY' | 'PROXY_REGISTRY' | 'ETH' | 'MEDIANIZER_ETH' | 'ORACLE_SECURITY_MODULE_ETH' | 'GEB_JOIN_ETH_A' | 'GEB_COLLATERAL_AUCTION_HOUSE_ETH_A' | 'PROXY_PAUSE_ACTIONS' | 'PROXY_DEPLOYER' | 'UNISWAP_FACTORY' | 'UNISWAP_ROUTER' | 'GEB_DS_COMPARE' | 'GEB_TX_MANAGER'; | ||
chainProvider: ChainProviderInterface; | ||
safeEngine: SafeEngine; | ||
accountingEngine: AccountingEngine; | ||
@@ -12,0 +13,0 @@ taxCollector: TaxCollector; |
@@ -13,2 +13,3 @@ "use strict"; | ||
var addressList = utils_1.getAddressList(network); | ||
this.safeEngine = new _1.SafeEngine(addressList.GEB_SAFE_ENGINE, this.chainProvider); | ||
this.accountingEngine = new _1.AccountingEngine(addressList.GEB_ACCOUNTING_ENGINE, this.chainProvider); | ||
@@ -15,0 +16,0 @@ this.taxCollector = new _1.TaxCollector(addressList.GEB_TAX_COLLECTOR, this.chainProvider); |
import { BaseContractAPI } from '@reflexer-finance/geb-provider'; | ||
import { TransactionRequest } from '@reflexer-finance/geb-provider'; | ||
import { BytesLike } from '@ethersproject/bytes'; | ||
import { BigNumberish } from '@ethersproject/bignumber'; | ||
export declare class DsProxy extends BaseContractAPI { | ||
authority(): Promise<string>; | ||
cache(): Promise<string>; | ||
execute(_target: string, _data: BytesLike): Promise<TransactionRequest>; | ||
execute(ethValue: BigNumberish, _target: string, _data: BytesLike): Promise<TransactionRequest>; | ||
owner(): Promise<string>; | ||
@@ -9,0 +10,0 @@ setAuthority(authority_: string): Promise<TransactionRequest>; |
@@ -20,2 +20,3 @@ "use strict"; | ||
var geb_provider_1 = require("@reflexer-finance/geb-provider"); | ||
var bignumber_1 = require("@ethersproject/bignumber"); | ||
var DsProxy = /** @class */ (function (_super) { | ||
@@ -38,7 +39,7 @@ __extends(DsProxy, _super); | ||
}; | ||
DsProxy.prototype.execute = function (_target, _data) { | ||
DsProxy.prototype.execute = function (ethValue, _target, _data) { | ||
// prettier-ignore | ||
// @ts-ignore | ||
var abi = { "inputs": [{ "internalType": "address", "name": "_target", "type": "address" }, { "internalType": "bytes", "name": "_data", "type": "bytes" }], "name": "execute", "outputs": [{ "internalType": "bytes", "name": "response", "type": "bytes" }], "stateMutability": "payable", "type": "function" }; | ||
return this.ethSend(abi, [_target, _data]); | ||
return this.ethSend(abi, [_target, _data], bignumber_1.BigNumber.from(ethValue)); | ||
}; | ||
@@ -45,0 +46,0 @@ DsProxy.prototype.owner = function () { |
@@ -28,3 +28,3 @@ import { BaseContractAPI } from '@reflexer-finance/geb-provider'; | ||
*/ | ||
join(account: string): Promise<TransactionRequest>; | ||
join(ethValue: BigNumberish, account: string): Promise<TransactionRequest>; | ||
/** | ||
@@ -31,0 +31,0 @@ * Remove auth from an account |
@@ -20,2 +20,3 @@ "use strict"; | ||
var geb_provider_1 = require("@reflexer-finance/geb-provider"); | ||
var bignumber_1 = require("@ethersproject/bignumber"); | ||
var EthJoin = /** @class */ (function (_super) { | ||
@@ -83,7 +84,7 @@ __extends(EthJoin, _super); | ||
*/ | ||
EthJoin.prototype.join = function (account) { | ||
EthJoin.prototype.join = function (ethValue, account) { | ||
// prettier-ignore | ||
// @ts-ignore | ||
var abi = { "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], "name": "join", "outputs": [], "stateMutability": "payable", "type": "function" }; | ||
return this.ethSend(abi, [account]); | ||
return this.ethSend(abi, [account], bignumber_1.BigNumber.from(ethValue)); | ||
}; | ||
@@ -90,0 +91,0 @@ /** |
@@ -12,3 +12,3 @@ import { BaseContractAPI } from '@reflexer-finance/geb-provider'; | ||
enterSystem(manager: string, src: string, safe: BigNumberish): Promise<TransactionRequest>; | ||
ethJoin_join(apt: string, safe: string): Promise<TransactionRequest>; | ||
ethJoin_join(ethValue: BigNumberish, apt: string, safe: string): Promise<TransactionRequest>; | ||
exitETH(manager: string, ethJoin: string, safe: BigNumberish, wad: BigNumberish): Promise<TransactionRequest>; | ||
@@ -20,4 +20,4 @@ exitTokenCollateral(manager: string, collateralJoin: string, safe: BigNumberish, amt: BigNumberish): Promise<TransactionRequest>; | ||
generateDebtAndProtectSAFE(manager: string, taxCollector: string, coinJoin: string, safe: BigNumberish, wad: BigNumberish, liquidationEngine: string, saviour: string): Promise<TransactionRequest>; | ||
lockETH(manager: string, ethJoin: string, safe: BigNumberish): Promise<TransactionRequest>; | ||
lockETHAndGenerateDebt(manager: string, taxCollector: string, ethJoin: string, coinJoin: string, safe: BigNumberish, deltaWad: BigNumberish): Promise<TransactionRequest>; | ||
lockETH(ethValue: BigNumberish, manager: string, ethJoin: string, safe: BigNumberish): Promise<TransactionRequest>; | ||
lockETHAndGenerateDebt(ethValue: BigNumberish, manager: string, taxCollector: string, ethJoin: string, coinJoin: string, safe: BigNumberish, deltaWad: BigNumberish): Promise<TransactionRequest>; | ||
lockTokenCollateral(manager: string, collateralJoin: string, safe: BigNumberish, amt: BigNumberish, transferFrom: boolean): Promise<TransactionRequest>; | ||
@@ -29,4 +29,4 @@ lockTokenCollateralAndGenerateDebt(manager: string, taxCollector: string, collateralJoin: string, coinJoin: string, safe: BigNumberish, collateralAmount: BigNumberish, deltaWad: BigNumberish, transferFrom: boolean): Promise<TransactionRequest>; | ||
moveSAFE(manager: string, safeSrc: BigNumberish, safeDst: BigNumberish): Promise<TransactionRequest>; | ||
openLockETHAndGenerateDebt(manager: string, taxCollector: string, ethJoin: string, coinJoin: string, collateralType: BytesLike, deltaWad: BigNumberish): Promise<TransactionRequest>; | ||
openLockETHGenerateDebtAndProtectSAFE(manager: string, taxCollector: string, ethJoin: string, coinJoin: string, collateralType: BytesLike, deltaWad: BigNumberish, liquidationEngine: string, saviour: string): Promise<TransactionRequest>; | ||
openLockETHAndGenerateDebt(ethValue: BigNumberish, manager: string, taxCollector: string, ethJoin: string, coinJoin: string, collateralType: BytesLike, deltaWad: BigNumberish): Promise<TransactionRequest>; | ||
openLockETHGenerateDebtAndProtectSAFE(ethValue: BigNumberish, manager: string, taxCollector: string, ethJoin: string, coinJoin: string, collateralType: BytesLike, deltaWad: BigNumberish, liquidationEngine: string, saviour: string): Promise<TransactionRequest>; | ||
openLockGNTAndGenerateDebt(manager: string, taxCollector: string, gntJoin: string, coinJoin: string, collateralType: BytesLike, collateralAmount: BigNumberish, deltaWad: BigNumberish): Promise<TransactionRequest>; | ||
@@ -45,3 +45,3 @@ openLockGNTGenerateDebtAndProtectSAFE(manager: string, taxCollector: string, gntJoin: string, coinJoin: string, collateralType: BytesLike, collateralAmount: BigNumberish, deltaWad: BigNumberish, liquidationEngine: string, saviour: string): Promise<TransactionRequest>; | ||
repayDebtAndFreeTokenCollateral(manager: string, collateralJoin: string, coinJoin: string, safe: BigNumberish, collateralAmount: BigNumberish, deltaWad: BigNumberish): Promise<TransactionRequest>; | ||
safeLockETH(manager: string, ethJoin: string, safe: BigNumberish, owner: string): Promise<TransactionRequest>; | ||
safeLockETH(ethValue: BigNumberish, manager: string, ethJoin: string, safe: BigNumberish, owner: string): Promise<TransactionRequest>; | ||
safeLockTokenCollateral(manager: string, collateralJoin: string, safe: BigNumberish, amt: BigNumberish, transferFrom: boolean, owner: string): Promise<TransactionRequest>; | ||
@@ -48,0 +48,0 @@ safeRepayAllDebt(manager: string, coinJoin: string, safe: BigNumberish, owner: string): Promise<TransactionRequest>; |
@@ -20,2 +20,3 @@ "use strict"; | ||
var geb_provider_1 = require("@reflexer-finance/geb-provider"); | ||
var bignumber_1 = require("@ethersproject/bignumber"); | ||
var GebProxyActions = /** @class */ (function (_super) { | ||
@@ -62,7 +63,7 @@ __extends(GebProxyActions, _super); | ||
}; | ||
GebProxyActions.prototype.ethJoin_join = function (apt, safe) { | ||
GebProxyActions.prototype.ethJoin_join = function (ethValue, apt, safe) { | ||
// prettier-ignore | ||
// @ts-ignore | ||
var abi = { "inputs": [{ "internalType": "address", "name": "apt", "type": "address" }, { "internalType": "address", "name": "safe", "type": "address" }], "name": "ethJoin_join", "outputs": [], "stateMutability": "payable", "type": "function" }; | ||
return this.ethSend(abi, [apt, safe]); | ||
return this.ethSend(abi, [apt, safe], bignumber_1.BigNumber.from(ethValue)); | ||
}; | ||
@@ -113,20 +114,13 @@ GebProxyActions.prototype.exitETH = function (manager, ethJoin, safe, wad) { | ||
}; | ||
GebProxyActions.prototype.lockETH = function (manager, ethJoin, safe) { | ||
GebProxyActions.prototype.lockETH = function (ethValue, manager, ethJoin, safe) { | ||
// prettier-ignore | ||
// @ts-ignore | ||
var abi = { "inputs": [{ "internalType": "address", "name": "manager", "type": "address" }, { "internalType": "address", "name": "ethJoin", "type": "address" }, { "internalType": "uint256", "name": "safe", "type": "uint256" }], "name": "lockETH", "outputs": [], "stateMutability": "payable", "type": "function" }; | ||
return this.ethSend(abi, [manager, ethJoin, safe]); | ||
return this.ethSend(abi, [manager, ethJoin, safe], bignumber_1.BigNumber.from(ethValue)); | ||
}; | ||
GebProxyActions.prototype.lockETHAndGenerateDebt = function (manager, taxCollector, ethJoin, coinJoin, safe, deltaWad) { | ||
GebProxyActions.prototype.lockETHAndGenerateDebt = function (ethValue, manager, taxCollector, ethJoin, coinJoin, safe, deltaWad) { | ||
// prettier-ignore | ||
// @ts-ignore | ||
var abi = { "inputs": [{ "internalType": "address", "name": "manager", "type": "address" }, { "internalType": "address", "name": "taxCollector", "type": "address" }, { "internalType": "address", "name": "ethJoin", "type": "address" }, { "internalType": "address", "name": "coinJoin", "type": "address" }, { "internalType": "uint256", "name": "safe", "type": "uint256" }, { "internalType": "uint256", "name": "deltaWad", "type": "uint256" }], "name": "lockETHAndGenerateDebt", "outputs": [], "stateMutability": "payable", "type": "function" }; | ||
return this.ethSend(abi, [ | ||
manager, | ||
taxCollector, | ||
ethJoin, | ||
coinJoin, | ||
safe, | ||
deltaWad, | ||
]); | ||
return this.ethSend(abi, [manager, taxCollector, ethJoin, coinJoin, safe, deltaWad], bignumber_1.BigNumber.from(ethValue)); | ||
}; | ||
@@ -195,3 +189,3 @@ GebProxyActions.prototype.lockTokenCollateral = function (manager, collateralJoin, safe, amt, transferFrom) { | ||
}; | ||
GebProxyActions.prototype.openLockETHAndGenerateDebt = function (manager, taxCollector, ethJoin, coinJoin, collateralType, deltaWad) { | ||
GebProxyActions.prototype.openLockETHAndGenerateDebt = function (ethValue, manager, taxCollector, ethJoin, coinJoin, collateralType, deltaWad) { | ||
// prettier-ignore | ||
@@ -207,5 +201,5 @@ // @ts-ignore | ||
deltaWad, | ||
]); | ||
], bignumber_1.BigNumber.from(ethValue)); | ||
}; | ||
GebProxyActions.prototype.openLockETHGenerateDebtAndProtectSAFE = function (manager, taxCollector, ethJoin, coinJoin, collateralType, deltaWad, liquidationEngine, saviour) { | ||
GebProxyActions.prototype.openLockETHGenerateDebtAndProtectSAFE = function (ethValue, manager, taxCollector, ethJoin, coinJoin, collateralType, deltaWad, liquidationEngine, saviour) { | ||
// prettier-ignore | ||
@@ -223,3 +217,3 @@ // @ts-ignore | ||
saviour, | ||
]); | ||
], bignumber_1.BigNumber.from(ethValue)); | ||
}; | ||
@@ -368,7 +362,7 @@ GebProxyActions.prototype.openLockGNTAndGenerateDebt = function (manager, taxCollector, gntJoin, coinJoin, collateralType, collateralAmount, deltaWad) { | ||
}; | ||
GebProxyActions.prototype.safeLockETH = function (manager, ethJoin, safe, owner) { | ||
GebProxyActions.prototype.safeLockETH = function (ethValue, manager, ethJoin, safe, owner) { | ||
// prettier-ignore | ||
// @ts-ignore | ||
var abi = { "inputs": [{ "internalType": "address", "name": "manager", "type": "address" }, { "internalType": "address", "name": "ethJoin", "type": "address" }, { "internalType": "uint256", "name": "safe", "type": "uint256" }, { "internalType": "address", "name": "owner", "type": "address" }], "name": "safeLockETH", "outputs": [], "stateMutability": "payable", "type": "function" }; | ||
return this.ethSend(abi, [manager, ethJoin, safe, owner]); | ||
return this.ethSend(abi, [manager, ethJoin, safe, owner], bignumber_1.BigNumber.from(ethValue)); | ||
}; | ||
@@ -375,0 +369,0 @@ GebProxyActions.prototype.safeLockTokenCollateral = function (manager, collateralJoin, safe, amt, transferFrom, owner) { |
@@ -16,4 +16,4 @@ import { BaseContractAPI } from '@reflexer-finance/geb-provider'; | ||
transfer(dst: string, wad: BigNumberish): Promise<TransactionRequest>; | ||
deposit(): Promise<TransactionRequest>; | ||
deposit(ethValue: BigNumberish): Promise<TransactionRequest>; | ||
allowance(address1: string, address2: string): Promise<BigNumber>; | ||
} |
@@ -20,2 +20,3 @@ "use strict"; | ||
var geb_provider_1 = require("@reflexer-finance/geb-provider"); | ||
var bignumber_1 = require("@ethersproject/bignumber"); | ||
var Weth = /** @class */ (function (_super) { | ||
@@ -80,7 +81,7 @@ __extends(Weth, _super); | ||
}; | ||
Weth.prototype.deposit = function () { | ||
Weth.prototype.deposit = function (ethValue) { | ||
// prettier-ignore | ||
// @ts-ignore | ||
var abi = { "constant": false, "inputs": [], "name": "deposit", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function" }; | ||
return this.ethSend(abi, []); | ||
return this.ethSend(abi, [], bignumber_1.BigNumber.from(ethValue)); | ||
}; | ||
@@ -87,0 +88,0 @@ Weth.prototype.allowance = function (address1, address2) { |
@@ -27,2 +27,3 @@ import { AccountingEngine } from './generated/AccountingEngine'; | ||
import { GebProxyActions, GebProxyActionsGlobalSettlement } from './proxy'; | ||
export { KOVAN_ADDRESSES, MAINNET_ADDRESSES, ContractApis, AccountingEngine, BasicCollateralJoin, CoinJoin, CoinSavingsAccount, Coin, DebtAuctionHouse, DsProxy, EnglishCollateralAuctionHouse, EthJoin, FixedDiscountCollateralAuctionHouse, GebProxyRegistry, GebSafeManager, GetSafes, GlobalSettlement, LiquidationEngine, OracleRelayer, PostSettlementSurplusAuctionHouse, PreSettlementSurplusAuctionHouse, SafeEngine, SettlementSurplusAuctioneer, StabilityFeeTreasury, TaxCollector, Weth, GebProxyActions, GebProxyActionsGlobalSettlement, ContractAddresses, ContractList, ContractKey, }; | ||
import { ETH_A } from './const'; | ||
export { KOVAN_ADDRESSES, MAINNET_ADDRESSES, ContractApis, AccountingEngine, BasicCollateralJoin, CoinJoin, CoinSavingsAccount, Coin, DebtAuctionHouse, DsProxy, EnglishCollateralAuctionHouse, EthJoin, FixedDiscountCollateralAuctionHouse, GebProxyRegistry, GebSafeManager, GetSafes, GlobalSettlement, LiquidationEngine, OracleRelayer, PostSettlementSurplusAuctionHouse, PreSettlementSurplusAuctionHouse, SafeEngine, SettlementSurplusAuctioneer, StabilityFeeTreasury, TaxCollector, Weth, GebProxyActions, GebProxyActionsGlobalSettlement, ContractAddresses, ContractList, ContractKey, ETH_A, }; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.GebProxyActionsGlobalSettlement = exports.GebProxyActions = exports.Weth = exports.TaxCollector = exports.StabilityFeeTreasury = exports.SettlementSurplusAuctioneer = exports.SafeEngine = exports.PreSettlementSurplusAuctionHouse = exports.PostSettlementSurplusAuctionHouse = exports.OracleRelayer = exports.LiquidationEngine = exports.GlobalSettlement = exports.GetSafes = exports.GebSafeManager = exports.GebProxyRegistry = exports.FixedDiscountCollateralAuctionHouse = exports.EthJoin = exports.EnglishCollateralAuctionHouse = exports.DsProxy = exports.DebtAuctionHouse = exports.Coin = exports.CoinSavingsAccount = exports.CoinJoin = exports.BasicCollateralJoin = exports.AccountingEngine = exports.ContractApis = exports.MAINNET_ADDRESSES = exports.KOVAN_ADDRESSES = void 0; | ||
exports.ETH_A = exports.GebProxyActionsGlobalSettlement = exports.GebProxyActions = exports.Weth = exports.TaxCollector = exports.StabilityFeeTreasury = exports.SettlementSurplusAuctioneer = exports.SafeEngine = exports.PreSettlementSurplusAuctionHouse = exports.PostSettlementSurplusAuctionHouse = exports.OracleRelayer = exports.LiquidationEngine = exports.GlobalSettlement = exports.GetSafes = exports.GebSafeManager = exports.GebProxyRegistry = exports.FixedDiscountCollateralAuctionHouse = exports.EthJoin = exports.EnglishCollateralAuctionHouse = exports.DsProxy = exports.DebtAuctionHouse = exports.Coin = exports.CoinSavingsAccount = exports.CoinJoin = exports.BasicCollateralJoin = exports.AccountingEngine = exports.ContractApis = exports.MAINNET_ADDRESSES = exports.KOVAN_ADDRESSES = void 0; | ||
var AccountingEngine_1 = require("./generated/AccountingEngine"); | ||
@@ -58,1 +58,3 @@ Object.defineProperty(exports, "AccountingEngine", { enumerable: true, get: function () { return AccountingEngine_1.AccountingEngine; } }); | ||
Object.defineProperty(exports, "GebProxyActionsGlobalSettlement", { enumerable: true, get: function () { return proxy_1.GebProxyActionsGlobalSettlement; } }); | ||
var const_1 = require("./const"); | ||
Object.defineProperty(exports, "ETH_A", { enumerable: true, get: function () { return const_1.ETH_A; } }); |
@@ -5,2 +5,3 @@ import { DsProxy, ContractAddresses } from '.'; | ||
import { GebProxyActionsGlobalSettlement as GebProxyActionsGlobalSettlementGenerated } from './generated/GebProxyActionsGlobalSettlement'; | ||
import { BigNumber } from '@ethersproject/bignumber'; | ||
export declare class GebProxyActions extends GebProxyActionsGenerated { | ||
@@ -11,3 +12,3 @@ proxyAddress: string; | ||
constructor(proxyAddress: string, network: ContractAddresses, chainProvider: ChainProviderInterface); | ||
ethSend(abiFragment: AbiDefinition, params: Inputs): Promise<TransactionRequest>; | ||
ethSend(abiFragment: AbiDefinition, params: Inputs, ethValue?: BigNumber): Promise<TransactionRequest>; | ||
} | ||
@@ -19,3 +20,3 @@ export declare class GebProxyActionsGlobalSettlement extends GebProxyActionsGlobalSettlementGenerated { | ||
constructor(proxyAddress: string, network: ContractAddresses, chainProvider: ChainProviderInterface); | ||
ethSend(abiFragment: AbiDefinition, params: Inputs): Promise<TransactionRequest>; | ||
ethSend(abiFragment: AbiDefinition, params: Inputs, ethValue?: BigNumber): Promise<TransactionRequest>; | ||
} |
@@ -57,2 +57,3 @@ "use strict"; | ||
var utils_1 = require("./utils"); | ||
var bignumber_1 = require("@ethersproject/bignumber"); | ||
// Helper class that abstract away the proxy | ||
@@ -69,3 +70,3 @@ var GebProxyActions = /** @class */ (function (_super) { | ||
// Override ETH send to use proxy | ||
GebProxyActions.prototype.ethSend = function (abiFragment, params) { | ||
GebProxyActions.prototype.ethSend = function (abiFragment, params, ethValue) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
@@ -75,6 +76,9 @@ var data; | ||
switch (_a.label) { | ||
case 0: return [4 /*yield*/, this.chainProvider.ethSend(this.proxyActionAddress, abiFragment, params)]; | ||
case 0: return [4 /*yield*/, this.chainProvider.ethSend(this.proxyActionAddress, abiFragment, params, ethValue)]; | ||
case 1: | ||
data = (_a.sent()).data; | ||
return [2 /*return*/, this.proxy.execute(this.proxyActionAddress, data)]; | ||
if (!ethValue) { | ||
ethValue = bignumber_1.BigNumber.from('0'); | ||
} | ||
return [2 /*return*/, this.proxy.execute(ethValue, this.proxyActionAddress, data)]; | ||
} | ||
@@ -97,3 +101,3 @@ }); | ||
// Override ETH send to use proxy | ||
GebProxyActionsGlobalSettlement.prototype.ethSend = function (abiFragment, params) { | ||
GebProxyActionsGlobalSettlement.prototype.ethSend = function (abiFragment, params, ethValue) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
@@ -103,6 +107,6 @@ var data; | ||
switch (_a.label) { | ||
case 0: return [4 /*yield*/, this.chainProvider.ethSend(this.proxyActionAddress, abiFragment, params)]; | ||
case 0: return [4 /*yield*/, this.chainProvider.ethSend(this.proxyActionAddress, abiFragment, params, ethValue)]; | ||
case 1: | ||
data = (_a.sent()).data; | ||
return [2 /*return*/, this.proxy.execute(this.proxyActionAddress, data)]; | ||
return [2 /*return*/, this.proxy.execute(ethValue, this.proxyActionAddress, data)]; | ||
} | ||
@@ -109,0 +113,0 @@ }); |
{ | ||
"name": "@reflexer-finance/geb-contract-api", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "", | ||
@@ -14,9 +14,9 @@ "main": "./lib/index.js", | ||
"@ethersproject/bytes": "5.x", | ||
"@reflexer-finance/geb-provider": "^0.0.3" | ||
"@reflexer-finance/geb-provider": "^0.0.4" | ||
}, | ||
"devDependencies": { | ||
"@reflexer-finance/geb-typechain": "^0.0.2", | ||
"@reflexer-finance/geb-typechain": "^0.0.3", | ||
"typechain": "^2.0.0" | ||
}, | ||
"gitHead": "74f97909293764afff8285f34db1074dc3e144b7" | ||
"gitHead": "539871a04c8ff9b83093fc51364006ceef0d8fe3" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
365117
65
6187
0
+ Added@reflexer-finance/geb-provider@0.0.4(transitive)
- Removed@reflexer-finance/geb-provider@0.0.3(transitive)