mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-13 21:52:36 +03:00
update version
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.19.48-dev.5-rc0",
|
||||
"version": "0.19.48-dev.6-rc-0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.19.48-dev.5-rc0",
|
||||
"version": "0.19.48-dev.6-rc-0",
|
||||
"hasInstallScript": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
|
||||
@@ -113,4 +113,4 @@
|
||||
"overrides": {
|
||||
"tsconfig-paths": "^4.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,8 +141,6 @@ export default async function generateSwapCalldata({
|
||||
return { swapDescription, calldata }
|
||||
}
|
||||
|
||||
|
||||
|
||||
export async function generateUni2Calls(
|
||||
exchangeAddress: string,
|
||||
path: SafeArray<SwapInfo>
|
||||
@@ -314,4 +312,4 @@ function addCallParams(
|
||||
async function generateCalls(calls: BytesLike[]) {
|
||||
const executorInterface = SwapExecutor__factory.createInterface()
|
||||
return "0x" + executorInterface.encodeFunctionData(EXECUTOR_SWAP_FUNCTION, [ethers.constants.AddressZero, calls]).slice(74)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -503,6 +503,12 @@ class AggregatorWS {
|
||||
minAmountIn: json.ma,
|
||||
path: json.ps,
|
||||
exchanges: json.e,
|
||||
exchangeContractPath: json.eps.map((path) => ({
|
||||
pool: path.p,
|
||||
assetIn: path.ai,
|
||||
assetOut: path.ao,
|
||||
factory: path.f,
|
||||
})),
|
||||
poolOptimal: json.po,
|
||||
...(json.oi) && {
|
||||
orderInfo: {
|
||||
|
||||
@@ -33,6 +33,12 @@ const swapInfoSchemaBase = baseMessageSchema.extend({
|
||||
}).optional(),
|
||||
as: alternativeSchema.array(),
|
||||
anm: z.record(z.string()).optional(), // address to ERC20 names
|
||||
eps: z.array(z.object({
|
||||
p: z.string(), // pool address
|
||||
ai: z.string().toUpperCase(), // asset in
|
||||
ao: z.string().toUpperCase(), // asset out
|
||||
f: z.string().toUpperCase(), // factory
|
||||
}))
|
||||
});
|
||||
|
||||
const swapInfoSchemaByAmountIn = swapInfoSchemaBase.extend({
|
||||
|
||||
@@ -165,6 +165,13 @@ export type SwapInfoAlternative = {
|
||||
availableAmountOut?: number | undefined
|
||||
}
|
||||
|
||||
type ExchangeContractPath = {
|
||||
pool: string
|
||||
assetIn: string
|
||||
assetOut: string
|
||||
factory: string
|
||||
}
|
||||
|
||||
export type SwapInfoBase = {
|
||||
swapRequestId: string
|
||||
assetIn: string
|
||||
@@ -175,6 +182,7 @@ export type SwapInfoBase = {
|
||||
minAmountOut: number
|
||||
|
||||
path: string[]
|
||||
exchangeContractPath: ExchangeContractPath[]
|
||||
exchanges?: string[] | undefined
|
||||
poolOptimal: boolean
|
||||
|
||||
|
||||
Reference in New Issue
Block a user