Skip to content

Commit

Permalink
WingRiders V2
Browse files Browse the repository at this point in the history
  • Loading branch information
Sluder committed Nov 25, 2024
1 parent b5361c6 commit 64876c7
Show file tree
Hide file tree
Showing 9 changed files with 495 additions and 6 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<img src="https://raw.githubusercontent.com/IndigoProtocol/dexter/master/src/dex/logo/minswapv2.png" width="30" />
<img src="https://raw.githubusercontent.com/IndigoProtocol/dexter/master/src/dex/logo/muesliswap.png" width="30" />
<img src="https://raw.githubusercontent.com/IndigoProtocol/dexter/master/src/dex/logo/wingriders.png" width="30" />
<img src="https://raw.githubusercontent.com/IndigoProtocol/dexter/master/src/dex/logo/wingridersv2.png" width="30" />
<img src="https://raw.githubusercontent.com/IndigoProtocol/dexter/master/src/dex/logo/vyfinance.png" width="30" />
<img src="https://raw.githubusercontent.com/IndigoProtocol/dexter/master/src/dex/logo/teddyswap.png" width="30" />
<img src="https://raw.githubusercontent.com/IndigoProtocol/dexter/master/src/dex/logo/spectrum.png" width="30" />
Expand Down
9 changes: 9 additions & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export enum DatumParameterKey {
ReserveA = 'ReserveA',
ReserveB = 'ReserveB',
CancelDatum = 'CancelDatum',
AScale = 'AScale',
BScale = 'BScale',

/**
* Swap/wallet info.
Expand Down Expand Up @@ -45,6 +47,11 @@ export enum DatumParameterKey {
FeesFinalized = 'FeesFinalized',
MarketOpen = 'MarketOpen',
ProtocolFee = 'ProtocolFee',
SwapFee = 'SwapFee',
ProjectFeeInBasis = 'ProjectFeeInBasis',
ReserveFeeInBasis = 'ReserveFeeInBasis',
FeeBasis = 'FeeBasis',
AgentFee = 'AgentFee',

/**
* LP info.
Expand All @@ -69,6 +76,8 @@ export enum DatumParameterKey {
RequestScriptHash = 'RequestScriptHash',
StakeAdminPolicy = 'StakeAdminPolicy',
LqBound = 'LqBound',

Unknown = 'Unknown',
}

export enum TransactionStatus {
Expand Down
110 changes: 110 additions & 0 deletions src/dex/definitions/wingriders-v2/order.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
import { DatumParameterKey } from '@app/constants';

export default {
constructor: 0,
fields: [
{
int: DatumParameterKey.DepositFee
},
{
constructor: 0,
fields: [
{
constructor: 0,
fields: [
{
bytes: DatumParameterKey.ReceiverPubKeyHash
}
]
},
{
constructor: 0,
fields: [
{
constructor: 0,
fields: [
{
constructor: 0,
fields: [
{
bytes: DatumParameterKey.ReceiverStakingKeyHash
}
]
}
]
}
]
}
]
},
{
constructor: 0,
fields: [
{
constructor: 0,
fields: [
{
bytes: DatumParameterKey.ReceiverPubKeyHash
}
]
},
{
constructor: 0,
fields: [
{
constructor: 0,
fields: [
{
constructor: 0,
fields: [
{
bytes: DatumParameterKey.ReceiverStakingKeyHash
}
]
}
]
}
]
}
]
},
[],
{
constructor: 0,
fields: []
},
{
int: DatumParameterKey.Expiration
},
{
bytes: DatumParameterKey.PoolAssetAPolicyId
},
{
bytes: DatumParameterKey.PoolAssetAAssetName
},
{
bytes: DatumParameterKey.PoolAssetBPolicyId
},
{
bytes: DatumParameterKey.PoolAssetBAssetName
},
{
constructor: 0,
fields: [
{
constructor: DatumParameterKey.Action,
fields: []
},
{
int: DatumParameterKey.MinReceive
}
]
},
{
int: DatumParameterKey.AScale
},
{
int: DatumParameterKey.BScale
}
]
};
71 changes: 71 additions & 0 deletions src/dex/definitions/wingriders-v2/pool.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import { DatumParameterKey } from '@app/constants';
import { DatumParameters, DefinitionField } from '@app/types';

export default {
constructor: 0,
fields: [
{
bytes: DatumParameterKey.RequestScriptHash
},
{
bytes: DatumParameterKey.PoolAssetAPolicyId,
},
{
bytes: DatumParameterKey.PoolAssetAAssetName,
},
{
bytes: DatumParameterKey.PoolAssetBPolicyId,
},
{
bytes: DatumParameterKey.PoolAssetBAssetName,
},
{
int: DatumParameterKey.SwapFee
},
{
int: DatumParameterKey.ProtocolFee
},
{
int: DatumParameterKey.ProjectFeeInBasis
},
{
int: DatumParameterKey.ReserveFeeInBasis
},
{
int: DatumParameterKey.FeeBasis
},
{
int: DatumParameterKey.AgentFee
},
{
int: DatumParameterKey.LastInteraction
},
{
int: DatumParameterKey.PoolAssetATreasury
},
{
int: DatumParameterKey.PoolAssetBTreasury
},
{
int: DatumParameterKey.Unknown
},
{
int: DatumParameterKey.Unknown
},
{
int: DatumParameterKey.Unknown
},
{
int: DatumParameterKey.Unknown
},
(field: DefinitionField, parameters: DatumParameters, shouldExtract: boolean = true) => {
return parameters;
},
(field: DefinitionField, parameters: DatumParameters, shouldExtract: boolean = true) => {
return parameters;
},
(field: DefinitionField, parameters: DatumParameters, shouldExtract: boolean = true) => {
return parameters;
},
]
};
Binary file added src/dex/logo/wingridersv2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 64876c7

Please sign in to comment.