@bancor/carbon-sdk
Advanced tools
Comparing version 0.0.72-DEV to 0.0.73-DEV
@@ -17,2 +17,10 @@ import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PayableOverrides, PopulatedTransaction, Signer, utils } from "ethers"; | ||
}; | ||
export type TradeActionStruct = { | ||
strategyId: PromiseOrValue<BigNumberish>; | ||
amount: PromiseOrValue<BigNumberish>; | ||
}; | ||
export type TradeActionStructOutput = [BigNumber, BigNumber] & { | ||
strategyId: BigNumber; | ||
amount: BigNumber; | ||
}; | ||
export type PairStruct = { | ||
@@ -49,10 +57,2 @@ id: PromiseOrValue<BigNumberish>; | ||
}; | ||
export type TradeActionStruct = { | ||
strategyId: PromiseOrValue<BigNumberish>; | ||
amount: PromiseOrValue<BigNumberish>; | ||
}; | ||
export type TradeActionStructOutput = [BigNumber, BigNumber] & { | ||
strategyId: BigNumber; | ||
amount: BigNumber; | ||
}; | ||
export interface CarbonControllerInterface extends utils.Interface { | ||
@@ -66,2 +66,4 @@ functions: { | ||
"accumulatedFees(address)": FunctionFragment; | ||
"calculateTradeSourceAmount(address,address,(uint256,uint128)[])": FunctionFragment; | ||
"calculateTradeTargetAmount(address,address,(uint256,uint128)[])": FunctionFragment; | ||
"controllerType()": FunctionFragment; | ||
@@ -94,4 +96,2 @@ "createPair(address,address)": FunctionFragment; | ||
"tradeByTargetAmount(address,address,(uint256,uint128)[],uint256,uint128)": FunctionFragment; | ||
"tradeSourceAmount(address,address,(uint256,uint128)[])": FunctionFragment; | ||
"tradeTargetAmount(address,address,(uint256,uint128)[])": FunctionFragment; | ||
"tradingFeePPM()": FunctionFragment; | ||
@@ -101,5 +101,5 @@ "unpause()": FunctionFragment; | ||
"version()": FunctionFragment; | ||
"withdrawFees(uint256,address,address)": FunctionFragment; | ||
"withdrawFees(address,uint256,address)": FunctionFragment; | ||
}; | ||
getFunction(nameOrSignatureOrTopic: "admin" | "implementation" | "upgradeTo" | "upgradeToAndCall" | "DEFAULT_ADMIN_ROLE" | "accumulatedFees" | "controllerType" | "createPair" | "createStrategy" | "deleteStrategy" | "getRoleAdmin" | "getRoleMember" | "getRoleMemberCount" | "grantRole" | "hasRole" | "initialize" | "pair" | "pairs" | "pause" | "paused" | "postUpgrade" | "renounceRole" | "revokeRole" | "roleAdmin" | "roleEmergencyStopper" | "roleFeesManager" | "setTradingFeePPM" | "strategiesByPair" | "strategiesByPairCount" | "strategy" | "supportsInterface" | "tradeBySourceAmount" | "tradeByTargetAmount" | "tradeSourceAmount" | "tradeTargetAmount" | "tradingFeePPM" | "unpause" | "updateStrategy" | "version" | "withdrawFees"): FunctionFragment; | ||
getFunction(nameOrSignatureOrTopic: "admin" | "implementation" | "upgradeTo" | "upgradeToAndCall" | "DEFAULT_ADMIN_ROLE" | "accumulatedFees" | "calculateTradeSourceAmount" | "calculateTradeTargetAmount" | "controllerType" | "createPair" | "createStrategy" | "deleteStrategy" | "getRoleAdmin" | "getRoleMember" | "getRoleMemberCount" | "grantRole" | "hasRole" | "initialize" | "pair" | "pairs" | "pause" | "paused" | "postUpgrade" | "renounceRole" | "revokeRole" | "roleAdmin" | "roleEmergencyStopper" | "roleFeesManager" | "setTradingFeePPM" | "strategiesByPair" | "strategiesByPairCount" | "strategy" | "supportsInterface" | "tradeBySourceAmount" | "tradeByTargetAmount" | "tradingFeePPM" | "unpause" | "updateStrategy" | "version" | "withdrawFees"): FunctionFragment; | ||
encodeFunctionData(functionFragment: "admin", values?: undefined): string; | ||
@@ -111,2 +111,12 @@ encodeFunctionData(functionFragment: "implementation", values?: undefined): string; | ||
encodeFunctionData(functionFragment: "accumulatedFees", values: [PromiseOrValue<string>]): string; | ||
encodeFunctionData(functionFragment: "calculateTradeSourceAmount", values: [ | ||
PromiseOrValue<string>, | ||
PromiseOrValue<string>, | ||
TradeActionStruct[] | ||
]): string; | ||
encodeFunctionData(functionFragment: "calculateTradeTargetAmount", values: [ | ||
PromiseOrValue<string>, | ||
PromiseOrValue<string>, | ||
TradeActionStruct[] | ||
]): string; | ||
encodeFunctionData(functionFragment: "controllerType", values?: undefined): string; | ||
@@ -163,12 +173,2 @@ encodeFunctionData(functionFragment: "createPair", values: [PromiseOrValue<string>, PromiseOrValue<string>]): string; | ||
]): string; | ||
encodeFunctionData(functionFragment: "tradeSourceAmount", values: [ | ||
PromiseOrValue<string>, | ||
PromiseOrValue<string>, | ||
TradeActionStruct[] | ||
]): string; | ||
encodeFunctionData(functionFragment: "tradeTargetAmount", values: [ | ||
PromiseOrValue<string>, | ||
PromiseOrValue<string>, | ||
TradeActionStruct[] | ||
]): string; | ||
encodeFunctionData(functionFragment: "tradingFeePPM", values?: undefined): string; | ||
@@ -189,4 +189,4 @@ encodeFunctionData(functionFragment: "unpause", values?: undefined): string; | ||
encodeFunctionData(functionFragment: "withdrawFees", values: [ | ||
PromiseOrValue<string>, | ||
PromiseOrValue<BigNumberish>, | ||
PromiseOrValue<string>, | ||
PromiseOrValue<string> | ||
@@ -200,2 +200,4 @@ ]): string; | ||
decodeFunctionResult(functionFragment: "accumulatedFees", data: BytesLike): Result; | ||
decodeFunctionResult(functionFragment: "calculateTradeSourceAmount", data: BytesLike): Result; | ||
decodeFunctionResult(functionFragment: "calculateTradeTargetAmount", data: BytesLike): Result; | ||
decodeFunctionResult(functionFragment: "controllerType", data: BytesLike): Result; | ||
@@ -228,4 +230,2 @@ decodeFunctionResult(functionFragment: "createPair", data: BytesLike): Result; | ||
decodeFunctionResult(functionFragment: "tradeByTargetAmount", data: BytesLike): Result; | ||
decodeFunctionResult(functionFragment: "tradeSourceAmount", data: BytesLike): Result; | ||
decodeFunctionResult(functionFragment: "tradeTargetAmount", data: BytesLike): Result; | ||
decodeFunctionResult(functionFragment: "tradingFeePPM", data: BytesLike): Result; | ||
@@ -472,2 +472,4 @@ decodeFunctionResult(functionFragment: "unpause", data: BytesLike): Result; | ||
accumulatedFees(token: PromiseOrValue<string>, overrides?: CallOverrides): Promise<[BigNumber]>; | ||
calculateTradeSourceAmount(sourceToken: PromiseOrValue<string>, targetToken: PromiseOrValue<string>, tradeActions: TradeActionStruct[], overrides?: CallOverrides): Promise<[BigNumber]>; | ||
calculateTradeTargetAmount(sourceToken: PromiseOrValue<string>, targetToken: PromiseOrValue<string>, tradeActions: TradeActionStruct[], overrides?: CallOverrides): Promise<[BigNumber]>; | ||
controllerType(overrides?: CallOverrides): Promise<[number]>; | ||
@@ -524,4 +526,2 @@ createPair(token0: PromiseOrValue<string>, token1: PromiseOrValue<string>, overrides?: Overrides & { | ||
}): Promise<ContractTransaction>; | ||
tradeSourceAmount(sourceToken: PromiseOrValue<string>, targetToken: PromiseOrValue<string>, tradeActions: TradeActionStruct[], overrides?: CallOverrides): Promise<[BigNumber]>; | ||
tradeTargetAmount(sourceToken: PromiseOrValue<string>, targetToken: PromiseOrValue<string>, tradeActions: TradeActionStruct[], overrides?: CallOverrides): Promise<[BigNumber]>; | ||
tradingFeePPM(overrides?: CallOverrides): Promise<[number]>; | ||
@@ -535,3 +535,3 @@ unpause(overrides?: Overrides & { | ||
version(overrides?: CallOverrides): Promise<[number]>; | ||
withdrawFees(amount: PromiseOrValue<BigNumberish>, token: PromiseOrValue<string>, recipient: PromiseOrValue<string>, overrides?: Overrides & { | ||
withdrawFees(token: PromiseOrValue<string>, amount: PromiseOrValue<BigNumberish>, recipient: PromiseOrValue<string>, overrides?: Overrides & { | ||
from?: PromiseOrValue<string>; | ||
@@ -554,2 +554,4 @@ }): Promise<ContractTransaction>; | ||
accumulatedFees(token: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>; | ||
calculateTradeSourceAmount(sourceToken: PromiseOrValue<string>, targetToken: PromiseOrValue<string>, tradeActions: TradeActionStruct[], overrides?: CallOverrides): Promise<BigNumber>; | ||
calculateTradeTargetAmount(sourceToken: PromiseOrValue<string>, targetToken: PromiseOrValue<string>, tradeActions: TradeActionStruct[], overrides?: CallOverrides): Promise<BigNumber>; | ||
controllerType(overrides?: CallOverrides): Promise<number>; | ||
@@ -606,4 +608,2 @@ createPair(token0: PromiseOrValue<string>, token1: PromiseOrValue<string>, overrides?: Overrides & { | ||
}): Promise<ContractTransaction>; | ||
tradeSourceAmount(sourceToken: PromiseOrValue<string>, targetToken: PromiseOrValue<string>, tradeActions: TradeActionStruct[], overrides?: CallOverrides): Promise<BigNumber>; | ||
tradeTargetAmount(sourceToken: PromiseOrValue<string>, targetToken: PromiseOrValue<string>, tradeActions: TradeActionStruct[], overrides?: CallOverrides): Promise<BigNumber>; | ||
tradingFeePPM(overrides?: CallOverrides): Promise<number>; | ||
@@ -617,3 +617,3 @@ unpause(overrides?: Overrides & { | ||
version(overrides?: CallOverrides): Promise<number>; | ||
withdrawFees(amount: PromiseOrValue<BigNumberish>, token: PromiseOrValue<string>, recipient: PromiseOrValue<string>, overrides?: Overrides & { | ||
withdrawFees(token: PromiseOrValue<string>, amount: PromiseOrValue<BigNumberish>, recipient: PromiseOrValue<string>, overrides?: Overrides & { | ||
from?: PromiseOrValue<string>; | ||
@@ -628,2 +628,4 @@ }): Promise<ContractTransaction>; | ||
accumulatedFees(token: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>; | ||
calculateTradeSourceAmount(sourceToken: PromiseOrValue<string>, targetToken: PromiseOrValue<string>, tradeActions: TradeActionStruct[], overrides?: CallOverrides): Promise<BigNumber>; | ||
calculateTradeTargetAmount(sourceToken: PromiseOrValue<string>, targetToken: PromiseOrValue<string>, tradeActions: TradeActionStruct[], overrides?: CallOverrides): Promise<BigNumber>; | ||
controllerType(overrides?: CallOverrides): Promise<number>; | ||
@@ -656,4 +658,2 @@ createPair(token0: PromiseOrValue<string>, token1: PromiseOrValue<string>, overrides?: CallOverrides): Promise<PairStructOutput>; | ||
tradeByTargetAmount(sourceToken: PromiseOrValue<string>, targetToken: PromiseOrValue<string>, tradeActions: TradeActionStruct[], deadline: PromiseOrValue<BigNumberish>, maxInput: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<BigNumber>; | ||
tradeSourceAmount(sourceToken: PromiseOrValue<string>, targetToken: PromiseOrValue<string>, tradeActions: TradeActionStruct[], overrides?: CallOverrides): Promise<BigNumber>; | ||
tradeTargetAmount(sourceToken: PromiseOrValue<string>, targetToken: PromiseOrValue<string>, tradeActions: TradeActionStruct[], overrides?: CallOverrides): Promise<BigNumber>; | ||
tradingFeePPM(overrides?: CallOverrides): Promise<number>; | ||
@@ -663,3 +663,3 @@ unpause(overrides?: CallOverrides): Promise<void>; | ||
version(overrides?: CallOverrides): Promise<number>; | ||
withdrawFees(amount: PromiseOrValue<BigNumberish>, token: PromiseOrValue<string>, recipient: PromiseOrValue<string>, overrides?: CallOverrides): Promise<void>; | ||
withdrawFees(token: PromiseOrValue<string>, amount: PromiseOrValue<BigNumberish>, recipient: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>; | ||
}; | ||
@@ -715,2 +715,4 @@ filters: { | ||
accumulatedFees(token: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>; | ||
calculateTradeSourceAmount(sourceToken: PromiseOrValue<string>, targetToken: PromiseOrValue<string>, tradeActions: TradeActionStruct[], overrides?: CallOverrides): Promise<BigNumber>; | ||
calculateTradeTargetAmount(sourceToken: PromiseOrValue<string>, targetToken: PromiseOrValue<string>, tradeActions: TradeActionStruct[], overrides?: CallOverrides): Promise<BigNumber>; | ||
controllerType(overrides?: CallOverrides): Promise<BigNumber>; | ||
@@ -767,4 +769,2 @@ createPair(token0: PromiseOrValue<string>, token1: PromiseOrValue<string>, overrides?: Overrides & { | ||
}): Promise<BigNumber>; | ||
tradeSourceAmount(sourceToken: PromiseOrValue<string>, targetToken: PromiseOrValue<string>, tradeActions: TradeActionStruct[], overrides?: CallOverrides): Promise<BigNumber>; | ||
tradeTargetAmount(sourceToken: PromiseOrValue<string>, targetToken: PromiseOrValue<string>, tradeActions: TradeActionStruct[], overrides?: CallOverrides): Promise<BigNumber>; | ||
tradingFeePPM(overrides?: CallOverrides): Promise<BigNumber>; | ||
@@ -778,3 +778,3 @@ unpause(overrides?: Overrides & { | ||
version(overrides?: CallOverrides): Promise<BigNumber>; | ||
withdrawFees(amount: PromiseOrValue<BigNumberish>, token: PromiseOrValue<string>, recipient: PromiseOrValue<string>, overrides?: Overrides & { | ||
withdrawFees(token: PromiseOrValue<string>, amount: PromiseOrValue<BigNumberish>, recipient: PromiseOrValue<string>, overrides?: Overrides & { | ||
from?: PromiseOrValue<string>; | ||
@@ -798,2 +798,4 @@ }): Promise<BigNumber>; | ||
accumulatedFees(token: PromiseOrValue<string>, overrides?: CallOverrides): Promise<PopulatedTransaction>; | ||
calculateTradeSourceAmount(sourceToken: PromiseOrValue<string>, targetToken: PromiseOrValue<string>, tradeActions: TradeActionStruct[], overrides?: CallOverrides): Promise<PopulatedTransaction>; | ||
calculateTradeTargetAmount(sourceToken: PromiseOrValue<string>, targetToken: PromiseOrValue<string>, tradeActions: TradeActionStruct[], overrides?: CallOverrides): Promise<PopulatedTransaction>; | ||
controllerType(overrides?: CallOverrides): Promise<PopulatedTransaction>; | ||
@@ -850,4 +852,2 @@ createPair(token0: PromiseOrValue<string>, token1: PromiseOrValue<string>, overrides?: Overrides & { | ||
}): Promise<PopulatedTransaction>; | ||
tradeSourceAmount(sourceToken: PromiseOrValue<string>, targetToken: PromiseOrValue<string>, tradeActions: TradeActionStruct[], overrides?: CallOverrides): Promise<PopulatedTransaction>; | ||
tradeTargetAmount(sourceToken: PromiseOrValue<string>, targetToken: PromiseOrValue<string>, tradeActions: TradeActionStruct[], overrides?: CallOverrides): Promise<PopulatedTransaction>; | ||
tradingFeePPM(overrides?: CallOverrides): Promise<PopulatedTransaction>; | ||
@@ -861,3 +861,3 @@ unpause(overrides?: Overrides & { | ||
version(overrides?: CallOverrides): Promise<PopulatedTransaction>; | ||
withdrawFees(amount: PromiseOrValue<BigNumberish>, token: PromiseOrValue<string>, recipient: PromiseOrValue<string>, overrides?: Overrides & { | ||
withdrawFees(token: PromiseOrValue<string>, amount: PromiseOrValue<BigNumberish>, recipient: PromiseOrValue<string>, overrides?: Overrides & { | ||
from?: PromiseOrValue<string>; | ||
@@ -864,0 +864,0 @@ }): Promise<PopulatedTransaction>; |
@@ -100,6 +100,2 @@ import { Signer } from "ethers"; | ||
readonly inputs: readonly []; | ||
readonly name: "AmountExceedsBalance"; | ||
readonly type: "error"; | ||
}, { | ||
readonly inputs: readonly []; | ||
readonly name: "DeadlineExpired"; | ||
@@ -189,6 +185,2 @@ readonly type: "error"; | ||
readonly inputs: readonly []; | ||
readonly name: "UnsetDelegator"; | ||
readonly type: "error"; | ||
}, { | ||
readonly inputs: readonly []; | ||
readonly name: "ZeroValue"; | ||
@@ -618,2 +610,64 @@ readonly type: "error"; | ||
}, { | ||
readonly inputs: readonly [{ | ||
readonly internalType: "Token"; | ||
readonly name: "sourceToken"; | ||
readonly type: "address"; | ||
}, { | ||
readonly internalType: "Token"; | ||
readonly name: "targetToken"; | ||
readonly type: "address"; | ||
}, { | ||
readonly components: readonly [{ | ||
readonly internalType: "uint256"; | ||
readonly name: "strategyId"; | ||
readonly type: "uint256"; | ||
}, { | ||
readonly internalType: "uint128"; | ||
readonly name: "amount"; | ||
readonly type: "uint128"; | ||
}]; | ||
readonly internalType: "struct TradeAction[]"; | ||
readonly name: "tradeActions"; | ||
readonly type: "tuple[]"; | ||
}]; | ||
readonly name: "calculateTradeSourceAmount"; | ||
readonly outputs: readonly [{ | ||
readonly internalType: "uint128"; | ||
readonly name: ""; | ||
readonly type: "uint128"; | ||
}]; | ||
readonly stateMutability: "view"; | ||
readonly type: "function"; | ||
}, { | ||
readonly inputs: readonly [{ | ||
readonly internalType: "Token"; | ||
readonly name: "sourceToken"; | ||
readonly type: "address"; | ||
}, { | ||
readonly internalType: "Token"; | ||
readonly name: "targetToken"; | ||
readonly type: "address"; | ||
}, { | ||
readonly components: readonly [{ | ||
readonly internalType: "uint256"; | ||
readonly name: "strategyId"; | ||
readonly type: "uint256"; | ||
}, { | ||
readonly internalType: "uint128"; | ||
readonly name: "amount"; | ||
readonly type: "uint128"; | ||
}]; | ||
readonly internalType: "struct TradeAction[]"; | ||
readonly name: "tradeActions"; | ||
readonly type: "tuple[]"; | ||
}]; | ||
readonly name: "calculateTradeTargetAmount"; | ||
readonly outputs: readonly [{ | ||
readonly internalType: "uint128"; | ||
readonly name: ""; | ||
readonly type: "uint128"; | ||
}]; | ||
readonly stateMutability: "view"; | ||
readonly type: "function"; | ||
}, { | ||
readonly inputs: readonly []; | ||
@@ -1138,64 +1192,2 @@ readonly name: "controllerType"; | ||
}, { | ||
readonly inputs: readonly [{ | ||
readonly internalType: "Token"; | ||
readonly name: "sourceToken"; | ||
readonly type: "address"; | ||
}, { | ||
readonly internalType: "Token"; | ||
readonly name: "targetToken"; | ||
readonly type: "address"; | ||
}, { | ||
readonly components: readonly [{ | ||
readonly internalType: "uint256"; | ||
readonly name: "strategyId"; | ||
readonly type: "uint256"; | ||
}, { | ||
readonly internalType: "uint128"; | ||
readonly name: "amount"; | ||
readonly type: "uint128"; | ||
}]; | ||
readonly internalType: "struct TradeAction[]"; | ||
readonly name: "tradeActions"; | ||
readonly type: "tuple[]"; | ||
}]; | ||
readonly name: "tradeSourceAmount"; | ||
readonly outputs: readonly [{ | ||
readonly internalType: "uint128"; | ||
readonly name: ""; | ||
readonly type: "uint128"; | ||
}]; | ||
readonly stateMutability: "view"; | ||
readonly type: "function"; | ||
}, { | ||
readonly inputs: readonly [{ | ||
readonly internalType: "Token"; | ||
readonly name: "sourceToken"; | ||
readonly type: "address"; | ||
}, { | ||
readonly internalType: "Token"; | ||
readonly name: "targetToken"; | ||
readonly type: "address"; | ||
}, { | ||
readonly components: readonly [{ | ||
readonly internalType: "uint256"; | ||
readonly name: "strategyId"; | ||
readonly type: "uint256"; | ||
}, { | ||
readonly internalType: "uint128"; | ||
readonly name: "amount"; | ||
readonly type: "uint128"; | ||
}]; | ||
readonly internalType: "struct TradeAction[]"; | ||
readonly name: "tradeActions"; | ||
readonly type: "tuple[]"; | ||
}]; | ||
readonly name: "tradeTargetAmount"; | ||
readonly outputs: readonly [{ | ||
readonly internalType: "uint128"; | ||
readonly name: ""; | ||
readonly type: "uint128"; | ||
}]; | ||
readonly stateMutability: "view"; | ||
readonly type: "function"; | ||
}, { | ||
readonly inputs: readonly []; | ||
@@ -1280,2 +1272,6 @@ readonly name: "tradingFeePPM"; | ||
readonly inputs: readonly [{ | ||
readonly internalType: "Token"; | ||
readonly name: "token"; | ||
readonly type: "address"; | ||
}, { | ||
readonly internalType: "uint256"; | ||
@@ -1285,6 +1281,2 @@ readonly name: "amount"; | ||
}, { | ||
readonly internalType: "Token"; | ||
readonly name: "token"; | ||
readonly type: "address"; | ||
}, { | ||
readonly internalType: "address"; | ||
@@ -1295,3 +1287,7 @@ readonly name: "recipient"; | ||
readonly name: "withdrawFees"; | ||
readonly outputs: readonly []; | ||
readonly outputs: readonly [{ | ||
readonly internalType: "uint256"; | ||
readonly name: ""; | ||
readonly type: "uint256"; | ||
}]; | ||
readonly stateMutability: "nonpayable"; | ||
@@ -1298,0 +1294,0 @@ readonly type: "function"; |
@@ -5,3 +5,3 @@ { | ||
"source": "src/index.ts", | ||
"version": "0.0.72-DEV", | ||
"version": "0.0.73-DEV", | ||
"description": "The SDK is a READ-ONLY tool, intended to facilitate working with Carbon contracts. It's a convenient wrapper around our matching algorithm, allowing programs and users get a ready to use transaction data that will allow them to manage strategies and fulfill trades", | ||
@@ -8,0 +8,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
1046601
23863