Socket
Socket
Sign inDemoInstall

@reflexer-finance/geb-contract-api

Package Overview
Dependencies
Maintainers
4
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@reflexer-finance/geb-contract-api - npm Package Compare versions

Comparing version 0.0.15 to 0.0.16

lib/generated/TxManager.d.ts

11

lib/contract-apis.js

@@ -30,10 +30,11 @@ "use strict";

this.collateralAuctionHouseETH_A = new _1.FixedDiscountCollateralAuctionHouse(addressList.GEB_COLLATERAL_AUCTION_HOUSE_ETH_A, this.chainProvider);
this.protocolToken = new _1.DsToken(addressList.GEB_PROT, this.chainProvider);
this.medianizerEth = new _1.ChainlinkMedianEthusd(addressList.MEDIANIZER_ETH, this.chainProvider);
this.medianizerCoin = new _1.UniswapMedian(addressList.MEDIANIZER_RAI, this.chainProvider);
this.medianizerProt = new _1.UniswapMedian(addressList.MEDIANIZER_FLX, this.chainProvider);
this.medianizerCoin = new _1.UniswapMedian(addressList.MEDIANIZER_PRAI, this.chainProvider);
this.fsmEth = new _1.Osm(addressList.FEED_SECURITY_MODULE_ETH, this.chainProvider);
this.fsmProt = new _1.Osm(addressList.FEED_SECURITY_MODULE_FLX, this.chainProvider);
this.fsmCoin = new _1.Osm(addressList.FEED_SECURITY_MODULE_RAI, this.chainProvider);
this.fsmCoin = new _1.Osm(addressList.FEED_SECURITY_MODULE_PRAI, this.chainProvider);
this.weth = new _1.Weth(addressList.ETH, this.chainProvider);
// Contracts removed for the beta testnet
// this.protocolToken = new DsToken(addressList.GEB_PROT, this.chainProvider)
// this.medianizerProt = new UniswapMedian(addressList.MEDIANIZER_FLX, this.chainProvider)
// this.fsmProt = new Osm(addressList.FEED_SECURITY_MODULE_FLX, this.chainProvider)
}

@@ -40,0 +41,0 @@ return ContractApis;

@@ -7,11 +7,15 @@ import { BaseContractAPI } from '@reflexer-finance/geb-contract-base';

export declare class BasicCollateralJoin extends BaseContractAPI {
/**
* Add auth to an account
* @param account Account to add auth to
*/
addAuthorization(account: string): TransactionRequest;
allowance(address: string): Promise<BigNumber>;
allowance(address: string, multicall: true): MulticallRequest<BigNumber>;
allowed(): Promise<BigNumber>;
allowed(multicall: true): MulticallRequest<BigNumber>;
authorizedAccounts(address: string): Promise<BigNumber>;
authorizedAccounts(address: string, multicall: true): MulticallRequest<BigNumber>;
canJoin(amount: BigNumberish): Promise<boolean>;
canJoin(amount: BigNumberish, multicall: true): MulticallRequest<boolean>;
collateral(): Promise<string>;
collateral(multicall: true): MulticallRequest<string>;
collateralJoined(address: string): Promise<BigNumber>;
collateralJoined(address: string, multicall: true): MulticallRequest<BigNumber>;
collateralType(): Promise<string>;

@@ -23,27 +27,9 @@ collateralType(multicall: true): MulticallRequest<string>;

decimals(multicall: true): MulticallRequest<BigNumber>;
/**
* Disable this contract
*/
disableContract(): TransactionRequest;
/**
* This function destroys the collateral representation from inside the system and exits the collateral from this adapte. The adapter assumes that the collateral has 18 decimals
* Exit collateral from the system
* @param account Account to which we transfer the collateral
* @param wad Amount of collateral to transfer to 'account' (represented as a number with 18 decimals)*
*/
exit(account: string, wad: BigNumberish): TransactionRequest;
/**
* This function locks collateral in the adapter and creates a 'representation' of the locked collateral inside the system. This adapter assumes that the collateral has 18 decimals
* Join collateral in the system
* @param account Account from which we transferFrom collateral and add it in the system
* @param wad Amount of collateral to transfer in the system (represented as a number with 18 decimals)*
*/
join(account: string, wad: BigNumberish): TransactionRequest;
/**
* Remove auth from an account
* @param account Account to remove auth from
*/
exit(usr: string, wad: BigNumberish): TransactionRequest;
join(usr: string, wad: BigNumberish): TransactionRequest;
removeAuthorization(account: string): TransactionRequest;
safeEngine(): Promise<string>;
safeEngine(multicall: true): MulticallRequest<string>;
setAllowance(account: string, amount: BigNumberish): TransactionRequest;
}

@@ -25,6 +25,2 @@ "use strict";

}
/**
* Add auth to an account
* @param account Account to add auth to
*/
BasicCollateralJoin.prototype.addAuthorization = function (account) {

@@ -36,2 +32,14 @@ // prettier-ignore

};
BasicCollateralJoin.prototype.allowance = function (address, multicall) {
// prettier-ignore
// @ts-ignore
var abi = { "inputs": [{ "internalType": "address", "name": "", "type": "address" }], "name": "allowance", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" };
return this.ethCallOrMulticall(abi, [address], multicall);
};
BasicCollateralJoin.prototype.allowed = function (multicall) {
// prettier-ignore
// @ts-ignore
var abi = { "inputs": [], "name": "allowed", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" };
return this.ethCallOrMulticall(abi, [], multicall);
};
BasicCollateralJoin.prototype.authorizedAccounts = function (address, multicall) {

@@ -43,2 +51,8 @@ // prettier-ignore

};
BasicCollateralJoin.prototype.canJoin = function (amount, multicall) {
// prettier-ignore
// @ts-ignore
var abi = { "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], "name": "canJoin", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" };
return this.ethCallOrMulticall(abi, [amount], multicall);
};
BasicCollateralJoin.prototype.collateral = function (multicall) {

@@ -50,2 +64,8 @@ // prettier-ignore

};
BasicCollateralJoin.prototype.collateralJoined = function (address, multicall) {
// prettier-ignore
// @ts-ignore
var abi = { "inputs": [{ "internalType": "address", "name": "", "type": "address" }], "name": "collateralJoined", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" };
return this.ethCallOrMulticall(abi, [address], multicall);
};
BasicCollateralJoin.prototype.collateralType = function (multicall) {

@@ -69,5 +89,2 @@ // prettier-ignore

};
/**
* Disable this contract
*/
BasicCollateralJoin.prototype.disableContract = function () {

@@ -79,30 +96,14 @@ // prettier-ignore

};
/**
* This function destroys the collateral representation from inside the system and exits the collateral from this adapte. The adapter assumes that the collateral has 18 decimals
* Exit collateral from the system
* @param account Account to which we transfer the collateral
* @param wad Amount of collateral to transfer to 'account' (represented as a number with 18 decimals)*
*/
BasicCollateralJoin.prototype.exit = function (account, wad) {
BasicCollateralJoin.prototype.exit = function (usr, wad) {
// prettier-ignore
// @ts-ignore
var abi = { "inputs": [{ "internalType": "address", "name": "account", "type": "address" }, { "internalType": "uint256", "name": "wad", "type": "uint256" }], "name": "exit", "outputs": [], "stateMutability": "nonpayable", "type": "function" };
return this.getTransactionRequest(abi, [account, wad]);
var abi = { "inputs": [{ "internalType": "address", "name": "usr", "type": "address" }, { "internalType": "uint256", "name": "wad", "type": "uint256" }], "name": "exit", "outputs": [], "stateMutability": "nonpayable", "type": "function" };
return this.getTransactionRequest(abi, [usr, wad]);
};
/**
* This function locks collateral in the adapter and creates a 'representation' of the locked collateral inside the system. This adapter assumes that the collateral has 18 decimals
* Join collateral in the system
* @param account Account from which we transferFrom collateral and add it in the system
* @param wad Amount of collateral to transfer in the system (represented as a number with 18 decimals)*
*/
BasicCollateralJoin.prototype.join = function (account, wad) {
BasicCollateralJoin.prototype.join = function (usr, wad) {
// prettier-ignore
// @ts-ignore
var abi = { "inputs": [{ "internalType": "address", "name": "account", "type": "address" }, { "internalType": "uint256", "name": "wad", "type": "uint256" }], "name": "join", "outputs": [], "stateMutability": "nonpayable", "type": "function" };
return this.getTransactionRequest(abi, [account, wad]);
var abi = { "inputs": [{ "internalType": "address", "name": "usr", "type": "address" }, { "internalType": "uint256", "name": "wad", "type": "uint256" }], "name": "join", "outputs": [], "stateMutability": "nonpayable", "type": "function" };
return this.getTransactionRequest(abi, [usr, wad]);
};
/**
* Remove auth from an account
* @param account Account to remove auth from
*/
BasicCollateralJoin.prototype.removeAuthorization = function (account) {

@@ -120,4 +121,10 @@ // prettier-ignore

};
BasicCollateralJoin.prototype.setAllowance = function (account, amount) {
// prettier-ignore
// @ts-ignore
var abi = { "inputs": [{ "internalType": "address", "name": "account", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }], "name": "setAllowance", "outputs": [], "stateMutability": "nonpayable", "type": "function" };
return this.getTransactionRequest(abi, [account, amount]);
};
return BasicCollateralJoin;
}(geb_contract_base_1.BaseContractAPI));
exports.BasicCollateralJoin = BasicCollateralJoin;

@@ -13,4 +13,4 @@ import { BaseContractAPI } from '@reflexer-finance/geb-contract-base';

baseUpdateCallerReward(multicall: true): MulticallRequest<BigNumber>;
converterComputeAmountOut(amountIn: BigNumberish): Promise<BigNumber>;
converterComputeAmountOut(amountIn: BigNumberish, multicall: true): MulticallRequest<BigNumber>;
converterComputeAmountOut(timeElapsed: BigNumberish, amountIn: BigNumberish): Promise<BigNumber>;
converterComputeAmountOut(timeElapsed: BigNumberish, amountIn: BigNumberish, multicall: true): MulticallRequest<BigNumber>;
converterFeed(): Promise<string>;

@@ -20,7 +20,7 @@ converterFeed(multicall: true): MulticallRequest<string>;

timestamp: BigNumber;
price: BigNumber;
timeAdjustedPrice: BigNumber;
}>;
converterFeedObservations(uinteger: BigNumberish, multicall: true): MulticallRequest<{
timestamp: BigNumber;
price: BigNumber;
timeAdjustedPrice: BigNumber;
}>;

@@ -35,2 +35,4 @@ converterFeedScalingFactor(): Promise<BigNumber>;

denominationToken(multicall: true): MulticallRequest<string>;
earliestObservationIndex(): Promise<BigNumber>;
earliestObservationIndex(multicall: true): MulticallRequest<BigNumber>;
getCallerReward(): Promise<BigNumber>;

@@ -51,4 +53,2 @@ getCallerReward(multicall: true): MulticallRequest<BigNumber>;

modifyParameters(parameter: BytesLike, data: string): TransactionRequest;
observationIndexOf(timestamp: BigNumberish): Promise<number>;
observationIndexOf(timestamp: BigNumberish, multicall: true): MulticallRequest<number>;
perSecondCallerRewardIncrease(): Promise<BigNumber>;

@@ -55,0 +55,0 @@ perSecondCallerRewardIncrease(multicall: true): MulticallRequest<BigNumber>;

@@ -43,7 +43,7 @@ "use strict";

};
UniswapMedian.prototype.converterComputeAmountOut = function (amountIn, multicall) {
UniswapMedian.prototype.converterComputeAmountOut = function (timeElapsed, amountIn, multicall) {
// prettier-ignore
// @ts-ignore
var abi = { "inputs": [{ "internalType": "uint256", "name": "amountIn", "type": "uint256" }], "name": "converterComputeAmountOut", "outputs": [{ "internalType": "uint256", "name": "amountOut", "type": "uint256" }], "stateMutability": "view", "type": "function" };
return this.ethCallOrMulticall(abi, [amountIn], multicall);
var abi = { "inputs": [{ "internalType": "uint256", "name": "timeElapsed", "type": "uint256" }, { "internalType": "uint256", "name": "amountIn", "type": "uint256" }], "name": "converterComputeAmountOut", "outputs": [{ "internalType": "uint256", "name": "amountOut", "type": "uint256" }], "stateMutability": "view", "type": "function" };
return this.ethCallOrMulticall(abi, [timeElapsed, amountIn], multicall);
};

@@ -59,3 +59,3 @@ UniswapMedian.prototype.converterFeed = function (multicall) {

// @ts-ignore
var abi = { "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "name": "converterFeedObservations", "outputs": [{ "internalType": "uint256", "name": "timestamp", "type": "uint256" }, { "internalType": "uint256", "name": "price", "type": "uint256" }], "stateMutability": "view", "type": "function" };
var abi = { "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "name": "converterFeedObservations", "outputs": [{ "internalType": "uint256", "name": "timestamp", "type": "uint256" }, { "internalType": "uint256", "name": "timeAdjustedPrice", "type": "uint256" }], "stateMutability": "view", "type": "function" };
return this.ethCallOrMulticall(abi, [uinteger], multicall);

@@ -87,2 +87,8 @@ };

};
UniswapMedian.prototype.earliestObservationIndex = function (multicall) {
// prettier-ignore
// @ts-ignore
var abi = { "inputs": [], "name": "earliestObservationIndex", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" };
return this.ethCallOrMulticall(abi, [], multicall);
};
UniswapMedian.prototype.getCallerReward = function (multicall) {

@@ -136,8 +142,2 @@ // prettier-ignore

};
UniswapMedian.prototype.observationIndexOf = function (timestamp, multicall) {
// prettier-ignore
// @ts-ignore
var abi = { "inputs": [{ "internalType": "uint256", "name": "timestamp", "type": "uint256" }], "name": "observationIndexOf", "outputs": [{ "internalType": "uint8", "name": "index", "type": "uint8" }], "stateMutability": "view", "type": "function" };
return this.ethCallOrMulticall(abi, [timestamp], multicall);
};
UniswapMedian.prototype.perSecondCallerRewardIncrease = function (multicall) {

@@ -144,0 +144,0 @@ // prettier-ignore

{
"name": "@reflexer-finance/geb-contract-api",
"version": "0.0.15",
"version": "0.0.16",
"description": "",

@@ -13,3 +13,3 @@ "main": "./lib/index.js",

"@ethersproject/bignumber": "5.x",
"@reflexer-finance/geb-contract-base": "^0.0.9"
"@reflexer-finance/geb-contract-base": "^0.0.10"
},

@@ -20,3 +20,3 @@ "devDependencies": {

},
"gitHead": "65c372a92b626fe3dae6d2068323acfa6a3bd08d"
"gitHead": "8be111108c91bf1207c978af4e21ae4710b62377"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc