Qswap
Idx 13·Since e209·6 ABI versions
NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAML
Procedures
11procIssueAsset#1
in 25Bout 8B
→input4 fields · 25B
| name | type | offset | bytes | layout |
|---|---|---|---|---|
| assetName | uint64 | 0 | 8 | |
| numberOfShares | sint64 | 8 | 8 | |
| unitOfMeasurement | uint64 | 16 | 8 | |
| numberOfDecimalPlaces | sint8 | 24 | 1 |
←output1 field · 8B
| name | type | offset | bytes | layout |
|---|---|---|---|---|
| issuedNumberOfShares | sint64 | 0 | 8 |
procCreatePool#3
in 40Bout 1B
→input2 fields · 40B
| name | type | offset | bytes | layout |
|---|---|---|---|---|
| assetIssuer | id | 0 | 32 | |
| assetName | uint64 | 32 | 8 |
←output1 field · 1B
| name | type | offset | bytes | layout |
|---|---|---|---|---|
| success | uint8 | 0 | 1 |
procAddLiquidity#4
in 64Bout 24B
→input5 fields · 64B
| name | type | offset | bytes | layout |
|---|---|---|---|---|
| assetIssuer | id | 0 | 32 | |
| assetName | uint64 | 32 | 8 | |
| assetAmountDesired | sint64 | 40 | 8 | |
| quAmountMin | sint64 | 48 | 8 | |
| assetAmountMin | sint64 | 56 | 8 |
←output3 fields · 24B
| name | type | offset | bytes | layout |
|---|---|---|---|---|
| userIncreaseLiquidity | sint64 | 0 | 8 | |
| quAmount | sint64 | 8 | 8 | |
| assetAmount | sint64 | 16 | 8 |
procRemoveLiquidity#5
in 64Bout 16B
→input5 fields · 64B
| name | type | offset | bytes | layout |
|---|---|---|---|---|
| assetIssuer | id | 0 | 32 | |
| assetName | uint64 | 32 | 8 | |
| burnLiquidity | sint64 | 40 | 8 | |
| quAmountMin | sint64 | 48 | 8 | |
| assetAmountMin | sint64 | 56 | 8 |
←output2 fields · 16B
| name | type | offset | bytes | layout |
|---|---|---|---|---|
| quAmount | sint64 | 0 | 8 | |
| assetAmount | sint64 | 8 | 8 |
procSwapExactQuForAsset#6
in 48Bout 8B
→input3 fields · 48B
| name | type | offset | bytes | layout |
|---|---|---|---|---|
| assetIssuer | id | 0 | 32 | |
| assetName | uint64 | 32 | 8 | |
| assetAmountOutMin | sint64 | 40 | 8 |
←output1 field · 8B
| name | type | offset | bytes | layout |
|---|---|---|---|---|
| assetAmountOut | sint64 | 0 | 8 |
procSwapQuForExactAsset#7
in 48Bout 8B
→input3 fields · 48B
| name | type | offset | bytes | layout |
|---|---|---|---|---|
| assetIssuer | id | 0 | 32 | |
| assetName | uint64 | 32 | 8 | |
| assetAmountOut | sint64 | 40 | 8 |
←output1 field · 8B
| name | type | offset | bytes | layout |
|---|---|---|---|---|
| quAmountIn | sint64 | 0 | 8 |
procSwapExactAssetForQu#8
in 56Bout 8B
→input4 fields · 56B
| name | type | offset | bytes | layout |
|---|---|---|---|---|
| assetIssuer | id | 0 | 32 | |
| assetName | uint64 | 32 | 8 | |
| assetAmountIn | sint64 | 40 | 8 | |
| quAmountOutMin | sint64 | 48 | 8 |
←output1 field · 8B
| name | type | offset | bytes | layout |
|---|---|---|---|---|
| quAmountOut | sint64 | 0 | 8 |
procSwapAssetForExactQu#9
in 56Bout 8B
→input4 fields · 56B
| name | type | offset | bytes | layout |
|---|---|---|---|---|
| assetIssuer | id | 0 | 32 | |
| assetName | uint64 | 32 | 8 | |
| assetAmountInMax | sint64 | 40 | 8 | |
| quAmountOut | sint64 | 48 | 8 |
←output1 field · 8B
| name | type | offset | bytes | layout |
|---|---|---|---|---|
| assetAmountIn | sint64 | 0 | 8 |
procSetInvestRewardsInfo#10
in 32Bout 1B
→input1 field · 32B
| name | type | offset | bytes | layout |
|---|---|---|---|---|
| newInvestRewardsId | id | 0 | 32 |
←output1 field · 1B
| name | type | offset | bytes | layout |
|---|---|---|---|---|
| success | uint8 | 0 | 1 |
Functions
8funcFees#1
in 0Bout 32B
←output8 fields · 32B
| name | type | offset | bytes | layout |
|---|---|---|---|---|
| assetIssuanceFee | uint32 | 0 | 4 | |
| poolCreationFee | uint32 | 4 | 4 | |
| transferFee | uint32 | 8 | 4 | |
| swapFee | uint32 | 12 | 4 | |
| shareholderFee | uint32 | 16 | 4 | |
| investRewardsFee | uint32 | 20 | 4 | |
| qxFee | uint32 | 24 | 4 | |
| burnFee | uint32 | 28 | 4 |
funcGetPoolBasicState#2
in 40Bout 32B
→input2 fields · 40B
| name | type | offset | bytes | layout |
|---|---|---|---|---|
| assetIssuer | id | 0 | 32 | |
| assetName | uint64 | 32 | 8 |
←output4 fields · 32B
| name | type | offset | bytes | layout |
|---|---|---|---|---|
| poolExists | sint64 | 0 | 8 | |
| reservedQuAmount | sint64 | 8 | 8 | |
| reservedAssetAmount | sint64 | 16 | 8 | |
| totalLiquidity | sint64 | 24 | 8 |
funcGetLiquidityOf#3
in 72Bout 8B
→input3 fields · 72B
| name | type | offset | bytes | layout |
|---|---|---|---|---|
| assetIssuer | id | 0 | 32 | |
| assetName | uint64 | 32 | 8 | |
| account | id | 40 | 32 |
←output1 field · 8B
| name | type | offset | bytes | layout |
|---|---|---|---|---|
| liquidity | sint64 | 0 | 8 |
funcQuoteExactQuInput#4
in 48Bout 8B
→input3 fields · 48B
| name | type | offset | bytes | layout |
|---|---|---|---|---|
| assetIssuer | id | 0 | 32 | |
| assetName | uint64 | 32 | 8 | |
| quAmountIn | sint64 | 40 | 8 |
←output1 field · 8B
| name | type | offset | bytes | layout |
|---|---|---|---|---|
| assetAmountOut | sint64 | 0 | 8 |
funcQuoteExactQuOutput#5
in 48Bout 8B
→input3 fields · 48B
| name | type | offset | bytes | layout |
|---|---|---|---|---|
| assetIssuer | id | 0 | 32 | |
| assetName | uint64 | 32 | 8 | |
| quAmountOut | sint64 | 40 | 8 |
←output1 field · 8B
| name | type | offset | bytes | layout |
|---|---|---|---|---|
| assetAmountIn | sint64 | 0 | 8 |
funcQuoteExactAssetInput#6
in 48Bout 8B
→input3 fields · 48B
| name | type | offset | bytes | layout |
|---|---|---|---|---|
| assetIssuer | id | 0 | 32 | |
| assetName | uint64 | 32 | 8 | |
| assetAmountIn | sint64 | 40 | 8 |
←output1 field · 8B
| name | type | offset | bytes | layout |
|---|---|---|---|---|
| quAmountOut | sint64 | 0 | 8 |
funcQuoteExactAssetOutput#7
in 48Bout 8B
→input3 fields · 48B
| name | type | offset | bytes | layout |
|---|---|---|---|---|
| assetIssuer | id | 0 | 32 | |
| assetName | uint64 | 32 | 8 | |
| assetAmountOut | sint64 | 40 | 8 |
←output1 field · 8B
| name | type | offset | bytes | layout |
|---|---|---|---|---|
| quAmountIn | sint64 | 0 | 8 |
funcInvestRewardsInfo#8
in 0Bout 36B
←output2 fields · 36B
| name | type | offset | bytes | layout |
|---|---|---|---|---|
| investRewardsFee | uint32 | 0 | 4 | |
| investRewardsId | id | 4 | 32 |
Structs
1structAsset
40B2 fields
fields
| name | type | offset | bytes | layout |
|---|---|---|---|---|
| issuer | id | 0 | 32 | |
| assetName | uint64 | 32 | 8 |
Raw JSON
{ "contractIndex": 13, "contractName": "Qswap", "contractAddress": "NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAML", "epoch": 209, "coreVersion": "v1.287.1", "structs": { "Asset": { "name": "Asset", "byteLength": 40, "fields": [ { "name": "issuer", "type": "id", "offset": 0, "byteLength": 32 }, { "name": "assetName", "type": "uint64", "offset": 32, "byteLength": 8 } ] } }, "procedures": [ { "kind": "procedure", "inputType": 1, "name": "IssueAsset", "inputFields": [ { "name": "assetName", "type": "uint64", "offset": 0, "byteLength": 8 }, { "name": "numberOfShares", "type": "sint64", "offset": 8, "byteLength": 8 }, { "name": "unitOfMeasurement", "type": "uint64", "offset": 16, "byteLength": 8 }, { "name": "numberOfDecimalPlaces", "type": "sint8", "offset": 24, "byteLength": 1 } ], "outputFields": [ { "name": "issuedNumberOfShares", "type": "sint64", "offset": 0, "byteLength": 8 } ], "inputSize": 25, "outputSize": 8 }, { "kind": "procedure", "inputType": 2, "name": "TransferShareOwnershipAndPossession", "inputFields": [ { "name": "assetIssuer", "type": "id", "offset": 0, "byteLength": 32 }, { "name": "assetName", "type": "uint64", "offset": 32, "byteLength": 8 }, { "name": "newOwnerAndPossessor", "type": "id", "offset": 40, "byteLength": 32 }, { "name": "amount", "type": "sint64", "offset": 72, "byteLength": 8 } ], "outputFields": [ { "name": "transferredAmount", "type": "sint64", "offset": 0, "byteLength": 8 } ], "inputSize": 80, "outputSize": 8 }, { "kind": "procedure", "inputType": 3, "name": "CreatePool", "inputFields": [ { "name": "assetIssuer", "type": "id", "offset": 0, "byteLength": 32 }, { "name": "assetName", "type": "uint64", "offset": 32, "byteLength": 8 } ], "outputFields": [ { "name": "success", "type": "uint8", "offset": 0, "byteLength": 1 } ], "inputSize": 40, "outputSize": 1 }, { "kind": "procedure", "inputType": 4, "name": "AddLiquidity", "inputFields": [ { "name": "assetIssuer", "type": "id", "offset": 0, "byteLength": 32 }, { "name": "assetName", "type": "uint64", "offset": 32, "byteLength": 8 }, { "name": "assetAmountDesired", "type": "sint64", "offset": 40, "byteLength": 8 }, { "name": "quAmountMin", "type": "sint64", "offset": 48, "byteLength": 8 }, { "name": "assetAmountMin", "type": "sint64", "offset": 56, "byteLength": 8 } ], "outputFields": [ { "name": "userIncreaseLiquidity", "type": "sint64", "offset": 0, "byteLength": 8 }, { "name": "quAmount", "type": "sint64", "offset": 8, "byteLength": 8 }, { "name": "assetAmount", "type": "sint64", "offset": 16, "byteLength": 8 } ], "inputSize": 64, "outputSize": 24 }, { "kind": "procedure", "inputType": 5, "name": "RemoveLiquidity", "inputFields": [ { "name": "assetIssuer", "type": "id", "offset": 0, "byteLength": 32 }, { "name": "assetName", "type": "uint64", "offset": 32, "byteLength": 8 }, { "name": "burnLiquidity", "type": "sint64", "offset": 40, "byteLength": 8 }, { "name": "quAmountMin", "type": "sint64", "offset": 48, "byteLength": 8 }, { "name": "assetAmountMin", "type": "sint64", "offset": 56, "byteLength": 8 } ], "outputFields": [ { "name": "quAmount", "type": "sint64", "offset": 0, "byteLength": 8 }, { "name": "assetAmount", "type": "sint64", "offset": 8, "byteLength": 8 } ], "inputSize": 64, "outputSize": 16 }, { "kind": "procedure", "inputType": 6, "name": "SwapExactQuForAsset", "inputFields": [ { "name": "assetIssuer", "type": "id", "offset": 0, "byteLength": 32 }, { "name": "assetName", "type": "uint64", "offset": 32, "byteLength": 8 }, { "name": "assetAmountOutMin", "type": "sint64", "offset": 40, "byteLength": 8 } ], "outputFields": [ { "name": "assetAmountOut", "type": "sint64", "offset": 0, "byteLength": 8 } ], "inputSize": 48, "outputSize": 8 }, { "kind": "procedure", "inputType": 7, "name": "SwapQuForExactAsset", "inputFields": [ { "name": "assetIssuer", "type": "id", "offset": 0, "byteLength": 32 }, { "name": "assetName", "type": "uint64", "offset": 32, "byteLength": 8 }, { "name": "assetAmountOut", "type": "sint64", "offset": 40, "byteLength": 8 } ], "outputFields": [ { "name": "quAmountIn", "type": "sint64", "offset": 0, "byteLength": 8 } ], "inputSize": 48, "outputSize": 8 }, { "kind": "procedure", "inputType": 8, "name": "SwapExactAssetForQu", "inputFields": [ { "name": "assetIssuer", "type": "id", "offset": 0, "byteLength": 32 }, { "name": "assetName", "type": "uint64", "offset": 32, "byteLength": 8 }, { "name": "assetAmountIn", "type": "sint64", "offset": 40, "byteLength": 8 }, { "name": "quAmountOutMin", "type": "sint64", "offset": 48, "byteLength": 8 } ], "outputFields": [ { "name": "quAmountOut", "type": "sint64", "offset": 0, "byteLength": 8 } ], "inputSize": 56, "outputSize": 8 }, { "kind": "procedure", "inputType": 9, "name": "SwapAssetForExactQu", "inputFields": [ { "name": "assetIssuer", "type": "id", "offset": 0, "byteLength": 32 }, { "name": "assetName", "type": "uint64", "offset": 32, "byteLength": 8 }, { "name": "assetAmountInMax", "type": "sint64", "offset": 40, "byteLength": 8 }, { "name": "quAmountOut", "type": "sint64", "offset": 48, "byteLength": 8 } ], "outputFields": [ { "name": "assetAmountIn", "type": "sint64", "offset": 0, "byteLength": 8 } ], "inputSize": 56, "outputSize": 8 }, { "kind": "procedure", "inputType": 10, "name": "SetInvestRewardsInfo", "inputFields": [ { "name": "newInvestRewardsId", "type": "id", "offset": 0, "byteLength": 32 } ], "outputFields": [ { "name": "success", "type": "uint8", "offset": 0, "byteLength": 1 } ], "inputSize": 32, "outputSize": 1 }, { "kind": "procedure", "inputType": 11, "name": "TransferShareManagementRights", "inputFields": [ { "name": "asset", "type": "struct", "offset": 0, "byteLength": 40, "structRef": "Asset" }, { "name": "numberOfShares", "type": "sint64", "offset": 40, "byteLength": 8 }, { "name": "newManagingContractIndex", "type": "uint32", "offset": 48, "byteLength": 4 } ], "outputFields": [ { "name": "transferredNumberOfShares", "type": "sint64", "offset": 0, "byteLength": 8 } ], "inputSize": 52, "outputSize": 8 } ], "functions": [ { "kind": "function", "inputType": 1, "name": "Fees", "inputFields": [], "outputFields": [ { "name": "assetIssuanceFee", "type": "uint32", "offset": 0, "byteLength": 4 }, { "name": "poolCreationFee", "type": "uint32", "offset": 4, "byteLength": 4 }, { "name": "transferFee", "type": "uint32", "offset": 8, "byteLength": 4 }, { "name": "swapFee", "type": "uint32", "offset": 12, "byteLength": 4 }, { "name": "shareholderFee", "type": "uint32", "offset": 16, "byteLength": 4 }, { "name": "investRewardsFee", "type": "uint32", "offset": 20, "byteLength": 4 }, { "name": "qxFee", "type": "uint32", "offset": 24, "byteLength": 4 }, { "name": "burnFee", "type": "uint32", "offset": 28, "byteLength": 4 } ], "inputSize": 0, "outputSize": 32 }, { "kind": "function", "inputType": 2, "name": "GetPoolBasicState", "inputFields": [ { "name": "assetIssuer", "type": "id", "offset": 0, "byteLength": 32 }, { "name": "assetName", "type": "uint64", "offset": 32, "byteLength": 8 } ], "outputFields": [ { "name": "poolExists", "type": "sint64", "offset": 0, "byteLength": 8 }, { "name": "reservedQuAmount", "type": "sint64", "offset": 8, "byteLength": 8 }, { "name": "reservedAssetAmount", "type": "sint64", "offset": 16, "byteLength": 8 }, { "name": "totalLiquidity", "type": "sint64", "offset": 24, "byteLength": 8 } ], "inputSize": 40, "outputSize": 32 }, { "kind": "function", "inputType": 3, "name": "GetLiquidityOf", "inputFields": [ { "name": "assetIssuer", "type": "id", "offset": 0, "byteLength": 32 }, { "name": "assetName", "type": "uint64", "offset": 32, "byteLength": 8 }, { "name": "account", "type": "id", "offset": 40, "byteLength": 32 } ], "outputFields": [ { "name": "liquidity", "type": "sint64", "offset": 0, "byteLength": 8 } ], "inputSize": 72, "outputSize": 8 }, { "kind": "function", "inputType": 4, "name": "QuoteExactQuInput", "inputFields": [ { "name": "assetIssuer", "type": "id", "offset": 0, "byteLength": 32 }, { "name": "assetName", "type": "uint64", "offset": 32, "byteLength": 8 }, { "name": "quAmountIn", "type": "sint64", "offset": 40, "byteLength": 8 } ], "outputFields": [ { "name": "assetAmountOut", "type": "sint64", "offset": 0, "byteLength": 8 } ], "inputSize": 48, "outputSize": 8 }, { "kind": "function", "inputType": 5, "name": "QuoteExactQuOutput", "inputFields": [ { "name": "assetIssuer", "type": "id", "offset": 0, "byteLength": 32 }, { "name": "assetName", "type": "uint64", "offset": 32, "byteLength": 8 }, { "name": "quAmountOut", "type": "sint64", "offset": 40, "byteLength": 8 } ], "outputFields": [ { "name": "assetAmountIn", "type": "sint64", "offset": 0, "byteLength": 8 } ], "inputSize": 48, "outputSize": 8 }, { "kind": "function", "inputType": 6, "name": "QuoteExactAssetInput", "inputFields": [ { "name": "assetIssuer", "type": "id", "offset": 0, "byteLength": 32 }, { "name": "assetName", "type": "uint64", "offset": 32, "byteLength": 8 }, { "name": "assetAmountIn", "type": "sint64", "offset": 40, "byteLength": 8 } ], "outputFields": [ { "name": "quAmountOut", "type": "sint64", "offset": 0, "byteLength": 8 } ], "inputSize": 48, "outputSize": 8 }, { "kind": "function", "inputType": 7, "name": "QuoteExactAssetOutput", "inputFields": [ { "name": "assetIssuer", "type": "id", "offset": 0, "byteLength": 32 }, { "name": "assetName", "type": "uint64", "offset": 32, "byteLength": 8 }, { "name": "assetAmountOut", "type": "sint64", "offset": 40, "byteLength": 8 } ], "outputFields": [ { "name": "quAmountIn", "type": "sint64", "offset": 0, "byteLength": 8 } ], "inputSize": 48, "outputSize": 8 }, { "kind": "function", "inputType": 8, "name": "InvestRewardsInfo", "inputFields": [], "outputFields": [ { "name": "investRewardsFee", "type": "uint32", "offset": 0, "byteLength": 4 }, { "name": "investRewardsId", "type": "id", "offset": 4, "byteLength": 32 } ], "inputSize": 0, "outputSize": 36 } ], "effectiveFromEpoch": 209, "effectiveToEpoch": null }