Documentation ¶
Overview ¶
Package fusion provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.16.2 DO NOT EDIT.
Package fusion provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.16.2 DO NOT EDIT.
Package fusion provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.16.2 DO NOT EDIT.
Index ¶
- Constants
- Variables
- func BigIntFromString(s string) (*big.Int, error)
- func CalcAuctionStartTime(startAuctionIn uint32, additionalWaitPeriod uint32) uint32
- func CreateMakerTraits(details Details, extraParams ExtraParams) (*orderbook.MakerTraits, error)
- func GetCurrentTime() int64
- type ActiveOrdersOutput
- type AdditionalParams
- type AuctionDetails
- type AuctionPointClass
- type AuctionPointClassFixed
- type AuctionWhitelistItem
- type BytesBuilder
- type BytesIter
- type Client
- func (api *Client) GetActiveOrders(ctx context.Context, params OrderApiControllerGetActiveOrdersParams) (*GetActiveOrdersOutput, error)
- func (api *Client) GetQuote(ctx context.Context, params QuoterControllerGetQuoteParamsFixed) (*GetQuoteOutputFixed, error)
- func (api *Client) GetQuoteWithCustomPreset(ctx context.Context, params QuoterControllerGetQuoteWithCustomPresetsParams, ...) (*GetQuoteOutputFixed, error)
- func (api *Client) GetSettlementContract(ctx context.Context) (*SettlementAddressOutput, error)
- func (api *Client) PlaceOrder(ctx context.Context, fusionQuote GetQuoteOutputFixed, orderParams OrderParams, ...) error
- func (api *Client) PlaceOrders(ctx context.Context, body []PlaceOrderBody) (*GetQuoteOutput, error)
- type Configuration
- type ConfigurationAPI
- type ConfigurationParams
- type ConfigurationWallet
- type CreateExtensionParams
- type CreateOrderDataParams
- type CustomPreset
- type CustomPresetInput
- type CustomPresetPoint
- type Details
- type Extension
- type ExtensionParams
- type ExtraData
- type ExtraParams
- type Fees
- type FusionOrderConstructor
- type FusionOrderV4
- type GasCostConfigClass
- type GasCostConfigClassFixed
- type GetActiveOrdersOutput
- type GetQuoteOutput
- type GetQuoteOutputFixed
- type GetQuoteOutputRecommendedPreset
- type IntegratorFee
- type Interaction
- type Meta
- type NetworkEnum
- type Order
- type OrderApiControllerGetActiveOrdersParams
- type OrderInput
- type OrderParams
- type PairCurrencyValue
- type PlaceOrderBody
- type PreparedOrder
- type Preset
- type PresetClass
- type QuotePresetsClass
- type QuoterControllerGetQuoteParams
- type QuoterControllerGetQuoteParamsFixed
- type QuoterControllerGetQuoteWithCustomPresetsJSONRequestBody
- type QuoterControllerGetQuoteWithCustomPresetsParams
- type RelayerControllerSubmitJSONRequestBody
- type RelayerControllerSubmitManyJSONBody
- type RelayerControllerSubmitManyJSONRequestBody
- type SettlementAddressOutput
- type SettlementPostInteractionData
- type SettlementSuffixData
- type SignedOrderInput
- type TakingFeeInfo
- type TokenPairValue
- type WhitelistItem
Constants ¶
const NativeToken = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
Variables ¶
var CalcAuctionStartTimeFunc func(uint32, uint32) uint32 = CalcAuctionStartTime
Functions ¶
func CalcAuctionStartTime ¶
func CreateMakerTraits ¶
func CreateMakerTraits(details Details, extraParams ExtraParams) (*orderbook.MakerTraits, error)
func GetCurrentTime ¶
func GetCurrentTime() int64
Types ¶
type ActiveOrdersOutput ¶
type ActiveOrdersOutput struct { // AuctionEndDate End date of the auction for this order. AuctionEndDate time.Time `json:"auctionEndDate"` // AuctionStartDate Start date of the auction for this order. AuctionStartDate time.Time `json:"auctionStartDate"` // Deadline Deadline by which the order must be filled. Deadline time.Time `json:"deadline"` // Extension An interaction call data. ABI encoded set of makerAssetSuffix, takerAssetSuffix, makingAmountGetter, takingAmountGetter, predicate, permit, preInteraction, postInteraction.If extension exists then lowest 160 bits of the order salt must be equal to the lowest 160 bits of the extension hash Extension string `json:"extension"` Order FusionOrderV4 `json:"order"` // OrderHash i.e 0x806039f5149065924ad52de616b50abff488c986716d052e9c160887bc09e559 OrderHash string `json:"orderHash"` // QuoteId Identifier of the quote associated with this order. QuoteId string `json:"quoteId"` // RemainingMakerAmount Remaining amount of the maker asset that can still be filled. RemainingMakerAmount string `json:"remainingMakerAmount"` // Signature i.e 0x38de7c8c406c8668eec947d59679028c068735e56c8a41bcc5b3dc2d2229dec258424e0f06b189d2b87f9f3d9cdd9edcb7b3be4108bd8605d052c20c84e65ad61c Signature string `json:"signature"` }
ActiveOrdersOutput defines model for ActiveOrdersOutput.
type AdditionalParams ¶
type AuctionDetails ¶
type AuctionDetails struct { StartTime uint32 `json:"startTime"` Duration uint32 `json:"duration"` InitialRateBump uint32 `json:"initialRateBump"` Points []AuctionPointClassFixed `json:"points"` GasCost GasCostConfigClassFixed `json:"gasCost"` }
func CreateAuctionDetails ¶
func CreateAuctionDetails(preset *PresetClass, additionalWaitPeriod float32) (*AuctionDetails, error)
func DecodeAuctionDetails ¶
func DecodeAuctionDetails(data string) (*AuctionDetails, error)
func NewAuctionDetails ¶
func NewAuctionDetails(startTime, duration, initialRateBump uint32, points []AuctionPointClassFixed, gasCost GasCostConfigClassFixed) (*AuctionDetails, error)
func (AuctionDetails) Encode ¶
func (ad AuctionDetails) Encode() string
type AuctionPointClass ¶
type AuctionPointClass struct { Coefficient float32 `json:"coefficient"` Delay float32 `json:"delay"` }
AuctionPointClass defines model for AuctionPointClass.
type AuctionPointClassFixed ¶
type AuctionWhitelistItem ¶
type BytesBuilder ¶
type BytesBuilder struct {
// contains filtered or unexported fields
}
func NewBytesBuilder ¶
func NewBytesBuilder() *BytesBuilder
func (*BytesBuilder) AddAddress ¶
func (b *BytesBuilder) AddAddress(address common.Address)
func (*BytesBuilder) AddBytes ¶
func (b *BytesBuilder) AddBytes(data string)
func (*BytesBuilder) AddUint16 ¶
func (b *BytesBuilder) AddUint16(val *big.Int)
func (*BytesBuilder) AddUint32 ¶
func (b *BytesBuilder) AddUint32(val *big.Int)
func (*BytesBuilder) AddUint8 ¶
func (b *BytesBuilder) AddUint8(val uint8)
func (*BytesBuilder) AsHex ¶
func (b *BytesBuilder) AsHex() string
type BytesIter ¶
type BytesIter struct {
// contains filtered or unexported fields
}
func NewBytesIter ¶
func (*BytesIter) NextUint16 ¶
func (*BytesIter) NextUint160 ¶
func (*BytesIter) NextUint32 ¶
type Client ¶
func NewClient ¶
func NewClient(cfg *Configuration) (*Client, error)
func (*Client) GetActiveOrders ¶
func (api *Client) GetActiveOrders(ctx context.Context, params OrderApiControllerGetActiveOrdersParams) (*GetActiveOrdersOutput, error)
func (*Client) GetQuote ¶
func (api *Client) GetQuote(ctx context.Context, params QuoterControllerGetQuoteParamsFixed) (*GetQuoteOutputFixed, error)
func (*Client) GetQuoteWithCustomPreset ¶
func (api *Client) GetQuoteWithCustomPreset(ctx context.Context, params QuoterControllerGetQuoteWithCustomPresetsParams, presetDetails QuoterControllerGetQuoteWithCustomPresetsJSONRequestBody) (*GetQuoteOutputFixed, error)
func (*Client) GetSettlementContract ¶
func (api *Client) GetSettlementContract(ctx context.Context) (*SettlementAddressOutput, error)
func (*Client) PlaceOrder ¶
func (api *Client) PlaceOrder(ctx context.Context, fusionQuote GetQuoteOutputFixed, orderParams OrderParams, wallet common.Wallet) error
PlaceOrder accepts a quote and submits it as a fusion order
func (*Client) PlaceOrders ¶
func (api *Client) PlaceOrders(ctx context.Context, body []PlaceOrderBody) (*GetQuoteOutput, error)
type Configuration ¶
type Configuration struct { WalletConfiguration *ConfigurationWallet APIConfiguration *ConfigurationAPI }
func NewConfiguration ¶
func NewConfiguration(params ConfigurationParams) (*Configuration, error)
type ConfigurationAPI ¶
type ConfigurationParams ¶
type ConfigurationWallet ¶
func NewConfigurationWallet ¶
func NewConfigurationWallet(privateKey string, chainId uint64) (*ConfigurationWallet, error)
type CreateExtensionParams ¶
type CreateExtensionParams struct {
// contains filtered or unexported fields
}
type CreateOrderDataParams ¶
type CreateOrderDataParams struct {
// contains filtered or unexported fields
}
type CustomPreset ¶
type CustomPreset struct { AuctionDuration int `json:"auctionDuration"` AuctionStartAmount string `json:"auctionStartAmount"` AuctionEndAmount string `json:"auctionEndAmount"` Points []CustomPresetPoint `json:"points,omitempty"` }
type CustomPresetInput ¶
type CustomPresetInput struct { AuctionDuration float32 `json:"auctionDuration"` AuctionEndAmount int64 `json:"auctionEndAmount"` AuctionStartAmount int64 `json:"auctionStartAmount"` Points []string `json:"points,omitempty"` }
CustomPresetInput defines model for CustomPresetInput.
type CustomPresetPoint ¶
type Details ¶
type Details struct { Auction *AuctionDetails `json:"auction"` Fees Fees `json:"fees"` Whitelist []AuctionWhitelistItem ResolvingStartTime *big.Int }
type Extension ¶
type Extension struct { MakerAssetSuffix string TakerAssetSuffix string MakingAmountData string TakingAmountData string Predicate string MakerPermit string PreInteraction string PostInteraction string CustomData string }
Extension represents the extension data for the Fusion order and should be only created using the NewExtension function
func CreateExtension ¶
func CreateExtension(params CreateExtensionParams) (*Extension, error)
func NewExtension ¶
func NewExtension(params ExtensionParams) (*Extension, error)
func (*Extension) ConvertToOrderbookExtension ¶
type ExtensionParams ¶
type ExtraParams ¶
type Fees ¶
type Fees struct { IntFee IntegratorFee BankFee *big.Int }
type FusionOrderConstructor ¶
type FusionOrderConstructor struct { SettlementExtension common.Address OrderInfo FusionOrderV4 }
type FusionOrderV4 ¶
type FusionOrderV4 struct { // Maker Address of the account creating the order (maker). Maker string `json:"maker"` // MakerAsset Identifier of the asset being offered by the maker. MakerAsset string `json:"makerAsset"` // MakerTraits Includes some flags like, allow multiple fills, is partial fill allowed or not, price improvement, nonce, deadline etc. MakerTraits string `json:"makerTraits"` // MakingAmount Amount of the makerAsset being offered by the maker. MakingAmount string `json:"makingAmount"` // Receiver Address of the account receiving the assets (receiver), if different from maker. Receiver string `json:"receiver"` // Salt Some unique value. It is necessary to be able to create limit orders with the same parameters (so that they have a different hash), Lowest 160 bits of the order salt must be equal to the lowest 160 bits of the extension hash Salt string `json:"salt"` // TakerAsset Identifier of the asset being requested by the maker in exchange. TakerAsset string `json:"takerAsset"` // TakingAmount Amount of the takerAsset being requested by the maker. TakingAmount string `json:"takingAmount"` }
FusionOrderV4 defines model for FusionOrderV4.
type GasCostConfigClass ¶
type GasCostConfigClass struct { GasBumpEstimate float32 `json:"gasBumpEstimate"` GasPriceEstimate string `json:"gasPriceEstimate"` }
GasCostConfigClass defines model for GasCostConfigClass.
type GasCostConfigClassFixed ¶
type GetActiveOrdersOutput ¶
type GetActiveOrdersOutput struct { Items []ActiveOrdersOutput `json:"items"` Meta Meta `json:"meta"` }
GetActiveOrdersOutput defines model for GetActiveOrdersOutput.
type GetQuoteOutput ¶
type GetQuoteOutput struct { // FeeToken Destination token address FeeToken string `json:"feeToken"` FromTokenAmount string `json:"fromTokenAmount"` Presets QuotePresetsClass `json:"presets"` Prices TokenPairValue `json:"prices"` // QuoteId Current generated quote id, should be passed with order QuoteId map[string]interface{} `json:"quoteId"` // RecommendedPreset suggested to use this preset RecommendedPreset GetQuoteOutputRecommendedPreset `json:"recommended_preset"` // SettlementAddress settlement contract address SettlementAddress string `json:"settlementAddress"` // Suggested is it suggested to use Fusion Suggested bool `json:"suggested"` ToTokenAmount string `json:"toTokenAmount"` Volume TokenPairValue `json:"volume"` // Whitelist current executors whitelist addresses Whitelist []string `json:"whitelist"` }
GetQuoteOutput defines model for GetQuoteOutput.
type GetQuoteOutputFixed ¶
type GetQuoteOutputFixed struct { // FeeToken Destination token address FeeToken string `json:"feeToken"` FromTokenAmount string `json:"fromTokenAmount"` Presets QuotePresetsClass `json:"presets"` Prices TokenPairValue `json:"prices"` // QuoteId Current generated quote id, should be passed with order QuoteId string `json:"quoteId"` // TODO This field is marked as "object" instead of "string" in the swagger file. This is an easy fix from the Fusion team // RecommendedPreset suggested to use this preset RecommendedPreset GetQuoteOutputRecommendedPreset `json:"recommended_preset"` // SettlementAddress settlement contract address SettlementAddress string `json:"settlementAddress"` // Suggested is it suggested to use Fusion Suggested bool `json:"suggested"` ToTokenAmount string `json:"toTokenAmount"` Volume TokenPairValue `json:"volume"` // Whitelist current executors whitelist addresses Whitelist []string `json:"whitelist"` }
type GetQuoteOutputRecommendedPreset ¶
type GetQuoteOutputRecommendedPreset string
GetQuoteOutputRecommendedPreset suggested to use this preset
const ( Custom GetQuoteOutputRecommendedPreset = "custom" Fast GetQuoteOutputRecommendedPreset = "fast" Medium GetQuoteOutputRecommendedPreset = "medium" Slow GetQuoteOutputRecommendedPreset = "slow" )
Defines values for GetQuoteOutputRecommendedPreset.
type Interaction ¶
func DecodeInteraction ¶
func DecodeInteraction(bytes string) (*Interaction, error)
func NewInteraction ¶
func NewInteraction(target common.Address, data string) *Interaction
func (*Interaction) Encode ¶
func (i *Interaction) Encode() string
type Meta ¶
type Meta struct { CurrentPage float32 `json:"currentPage"` ItemsPerPage float32 `json:"itemsPerPage"` TotalItems float32 `json:"totalItems"` TotalPages float32 `json:"totalPages"` }
Meta defines model for Meta.
type NetworkEnum ¶
type NetworkEnum int
const ( ETHEREUM NetworkEnum = 1 POLYGON NetworkEnum = 137 BINANCE NetworkEnum = 56 ARBITRUM NetworkEnum = 42161 AVALANCHE NetworkEnum = 43114 OPTIMISM NetworkEnum = 10 FANTOM NetworkEnum = 250 GNOSIS NetworkEnum = 100 COINBASE NetworkEnum = 8453 )
type Order ¶
type Order struct { FusionExtension *Extension Inner orderbook.OrderData SettlementExtension common.Address OrderInfo FusionOrderV4 AuctionDetails *AuctionDetails PostInteractionData *SettlementPostInteractionData Extra ExtraData }
func CreateOrder ¶
func CreateOrder(params CreateOrderDataParams) (*Order, error)
type OrderApiControllerGetActiveOrdersParams ¶
type OrderApiControllerGetActiveOrdersParams struct { // Page Pagination step, default: 1 (page = offset / limit) Page float32 `url:"page,omitempty" json:"page,omitempty"` // Limit Number of active orders to receive (default: 100, max: 500) Limit float32 `url:"limit,omitempty" json:"limit,omitempty"` }
OrderApiControllerGetActiveOrdersParams defines parameters for OrderApiControllerGetActiveOrders.
func (*OrderApiControllerGetActiveOrdersParams) Validate ¶
func (params *OrderApiControllerGetActiveOrdersParams) Validate() error
type OrderInput ¶
type OrderInput struct { // Maker An address of the maker (wallet or contract address) Maker string `json:"maker"` // MakerAsset Address of the maker asset MakerAsset string `json:"makerAsset"` // MakerTraits Includes some flags like, allow multiple fills, is partial fill allowed or not, price improvement, nonce, deadline etc MakerTraits string `json:"makerTraits,omitempty"` // MakingAmount Order maker's token amount MakingAmount string `json:"makingAmount"` // Receiver An address of the wallet or contract who will receive filled amount Receiver string `json:"receiver,omitempty"` Salt string `json:"salt"` // TakerAsset Address of the taker asset TakerAsset string `json:"takerAsset"` // TakingAmount Order taker's token amount TakingAmount string `json:"takingAmount"` }
OrderInput defines model for OrderInput.
type OrderParams ¶
type OrderParams struct { FromTokenAddress string `json:"fromTokenAddress"` ToTokenAddress string `json:"toTokenAddress"` Amount string `json:"amount"` WalletAddress string `json:"walletAddress"` Permit string `json:"permit,omitempty"` // without the first 20 bytes of token address Receiver string `json:"receiver,omitempty"` // Should be set to the full zero address if this order should be filled by anyone Preset GetQuoteOutputRecommendedPreset `json:"preset,omitempty"` Nonce *big.Int `json:"nonce,omitempty"` Fee TakingFeeInfo `json:"fee,omitempty"` Source string `json:"source,omitempty"` IsPermit2 bool `json:"isPermit2,omitempty"` CustomPreset *CustomPreset `json:"customPreset,omitempty"` AllowPartialFills bool `json:"allowPartialFills,omitempty"` AllowMultipleFills bool `json:"allowMultipleFills,omitempty"` DelayAuctionStartTimeBy float32 OrderExpirationDelay uint32 // TODO this field is inaccessible in the typescript SDK }
func (*OrderParams) Validate ¶
func (body *OrderParams) Validate() error
type PairCurrencyValue ¶
type PairCurrencyValue struct { FromToken string `json:"fromToken"` ToToken string `json:"toToken"` }
PairCurrencyValue defines model for PairCurrencyValue.
type PlaceOrderBody ¶
type PlaceOrderBody struct { Maker string MakerAsset string MakerTraits string MakingAmount string Receiver string TakerAsset string TakingAmount string }
func (*PlaceOrderBody) Validate ¶
func (body *PlaceOrderBody) Validate() error
type PreparedOrder ¶
type PreparedOrder struct { Order Order `json:"order"` Hash string `json:"hash"` QuoteId string `json:"quoteId"` }
func CreateFusionOrderData ¶
func CreateFusionOrderData(quote GetQuoteOutputFixed, orderParams OrderParams, wallet common.Wallet, chainId uint64) (*PreparedOrder, *orderbook.Order, error)
type Preset ¶
type Preset struct { AuctionDuration *big.Int `json:"auctionDuration"` StartAuctionIn *big.Int `json:"startAuctionIn"` BankFee *big.Int `json:"bankFee"` InitialRateBump *big.Int `json:"initialRateBump"` AuctionStartAmount *big.Int `json:"auctionStartAmount"` AuctionEndAmount *big.Int `json:"auctionEndAmount"` TokenFee *big.Int `json:"tokenFee"` Points []AuctionPointClass `json:"points"` GasCostInfo GasCostConfigClass `json:"gasCostInfo"` ExclusiveResolver *common.Address `json:"exclusiveResolver,omitempty"` AllowPartialFills bool `json:"allowPartialFills"` AllowMultipleFills bool `json:"allowMultipleFills"` }
type PresetClass ¶
type PresetClass struct { AllowMultipleFills bool `json:"allowMultipleFills"` AllowPartialFills bool `json:"allowPartialFills"` AuctionDuration float32 `json:"auctionDuration"` AuctionEndAmount string `json:"auctionEndAmount"` AuctionStartAmount string `json:"auctionStartAmount"` BankFee string `json:"bankFee"` EstP float32 `json:"estP"` ExclusiveResolver map[string]interface{} `json:"exclusiveResolver"` GasCost GasCostConfigClass `json:"gasCost"` InitialRateBump float32 `json:"initialRateBump"` Points []AuctionPointClass `json:"points"` StartAuctionIn float32 `json:"startAuctionIn"` TokenFee string `json:"tokenFee"` }
PresetClass defines model for PresetClass.
type QuotePresetsClass ¶
type QuotePresetsClass struct { Custom *PresetClass `json:"custom,omitempty"` Fast PresetClass `json:"fast"` Medium PresetClass `json:"medium"` Slow PresetClass `json:"slow"` }
QuotePresetsClass defines model for QuotePresetsClass.
type QuoterControllerGetQuoteParams ¶
type QuoterControllerGetQuoteParams struct { // FromTokenAddress Address of "FROM" token FromTokenAddress string `url:"fromTokenAddress" json:"fromTokenAddress"` // ToTokenAddress Address of "TO" token ToTokenAddress string `url:"toTokenAddress" json:"toTokenAddress"` // Amount Amount to take from "FROM" token to get "TO" token Amount float32 `url:"amount" json:"amount"` // WalletAddress An address of the wallet or contract who will create Fusion order WalletAddress string `url:"walletAddress" json:"walletAddress"` // EnableEstimate if enabled then get estimation from 1inch swap builder and generates quoteId, by default is false EnableEstimate bool `url:"enableEstimate" json:"enableEstimate"` // Fee fee in bps format, 1% is equal to 100bps Fee float32 `url:"fee,omitempty" json:"fee,omitempty"` // IsPermit2 permit2 allowance transfer encoded call IsPermit2 string `url:"isPermit2,omitempty" json:"isPermit2,omitempty"` IsLedgerLive bool `url:"isLedgerLive" json:"isLedgerLive"` // Permit permit, user approval sign Permit string `url:"permit,omitempty" json:"permit,omitempty"` }
QuoterControllerGetQuoteParams defines parameters for QuoterControllerGetQuote.
type QuoterControllerGetQuoteParamsFixed ¶
type QuoterControllerGetQuoteParamsFixed struct { // FromTokenAddress Address of "FROM" token FromTokenAddress string `url:"fromTokenAddress" json:"fromTokenAddress"` // ToTokenAddress Address of "TO" token ToTokenAddress string `url:"toTokenAddress" json:"toTokenAddress"` // Amount to take from "FROM" token to get "TO" token Amount string `url:"amount" json:"amount"` // WalletAddress An address of the wallet or contract who will create Fusion order WalletAddress string `url:"walletAddress" json:"walletAddress"` // EnableEstimate if enabled then get estimation from 1inch swap builder and generates quoteId, by default is false EnableEstimate bool `url:"enableEstimate" json:"enableEstimate"` // Fee in bps format, 1% is equal to 100bps Fee float32 `url:"fee,omitempty" json:"fee,omitempty"` // IsPermit2 permit2 allowance transfer encoded call IsPermit2 string `url:"isPermit2,omitempty" json:"isPermit2,omitempty"` IsLedgerLive bool `url:"isLedgerLive" json:"isLedgerLive"` // Permit permit, user approval sign Permit string `url:"permit,omitempty" json:"permit,omitempty"` }
func (*QuoterControllerGetQuoteParamsFixed) Validate ¶
func (params *QuoterControllerGetQuoteParamsFixed) Validate() error
type QuoterControllerGetQuoteWithCustomPresetsJSONRequestBody ¶
type QuoterControllerGetQuoteWithCustomPresetsJSONRequestBody = CustomPresetInput
QuoterControllerGetQuoteWithCustomPresetsJSONRequestBody defines body for QuoterControllerGetQuoteWithCustomPresets for application/json ContentType.
type QuoterControllerGetQuoteWithCustomPresetsParams ¶
type QuoterControllerGetQuoteWithCustomPresetsParams struct { // FromTokenAddress Address of "FROM" token FromTokenAddress string `url:"fromTokenAddress" json:"fromTokenAddress"` // ToTokenAddress Address of "TO" token ToTokenAddress string `url:"toTokenAddress" json:"toTokenAddress"` // Amount Amount to take from "FROM" token to get "TO" token Amount float32 `url:"amount" json:"amount"` // WalletAddress An address of the wallet or contract who will create Fusion order WalletAddress string `url:"walletAddress" json:"walletAddress"` // EnableEstimate if enabled then get estimation from 1inch swap builder and generates quoteId, by default is false EnableEstimate bool `url:"enableEstimate" json:"enableEstimate"` // Fee fee in bps format, 1% is equal to 100bps Fee float32 `url:"fee,omitempty" json:"fee,omitempty"` // IsPermit2 permit2 allowance transfer encoded call IsPermit2 string `url:"isPermit2,omitempty" json:"isPermit2,omitempty"` // Permit permit, user approval sign Permit string `url:"permit,omitempty" json:"permit,omitempty"` }
QuoterControllerGetQuoteWithCustomPresetsParams defines parameters for QuoterControllerGetQuoteWithCustomPresets.
func (*QuoterControllerGetQuoteWithCustomPresetsParams) Validate ¶
func (params *QuoterControllerGetQuoteWithCustomPresetsParams) Validate() error
type RelayerControllerSubmitJSONRequestBody ¶
type RelayerControllerSubmitJSONRequestBody = SignedOrderInput
RelayerControllerSubmitJSONRequestBody defines body for RelayerControllerSubmit for application/json ContentType.
type RelayerControllerSubmitManyJSONBody ¶
type RelayerControllerSubmitManyJSONBody = []SignedOrderInput
RelayerControllerSubmitManyJSONBody defines parameters for RelayerControllerSubmitMany.
type RelayerControllerSubmitManyJSONRequestBody ¶
type RelayerControllerSubmitManyJSONRequestBody = RelayerControllerSubmitManyJSONBody
RelayerControllerSubmitManyJSONRequestBody defines body for RelayerControllerSubmitMany for application/json ContentType.
type SettlementAddressOutput ¶
type SettlementAddressOutput struct { // Address actual settlement contract address Address string `json:"address"` }
SettlementAddressOutput defines model for SettlementAddressOutput.
type SettlementPostInteractionData ¶
type SettlementPostInteractionData struct { Whitelist []WhitelistItem IntegratorFee *IntegratorFee BankFee *big.Int ResolvingStartTime *big.Int CustomReceiver common.Address }
func CreateSettlementPostInteractionData ¶
func CreateSettlementPostInteractionData(details Details, orderInfo FusionOrderV4) (*SettlementPostInteractionData, error)
func Decode ¶
func Decode(data string) (SettlementPostInteractionData, error)
func NewSettlementPostInteractionData ¶
func NewSettlementPostInteractionData(data SettlementSuffixData) (*SettlementPostInteractionData, error)
func (SettlementPostInteractionData) CanExecuteAt ¶
func (SettlementPostInteractionData) Encode ¶
func (spid SettlementPostInteractionData) Encode() string
func (SettlementPostInteractionData) IsExclusiveResolver ¶
func (spid SettlementPostInteractionData) IsExclusiveResolver(wallet common.Address) bool
type SettlementSuffixData ¶
type SettlementSuffixData struct { Whitelist []AuctionWhitelistItem IntegratorFee *IntegratorFee BankFee *big.Int ResolvingStartTime *big.Int CustomReceiver common.Address }
type SignedOrderInput ¶
type SignedOrderInput struct { // Extension An interaction call data. ABI encoded set of makerAssetSuffix, takerAssetSuffix, makingAmountGetter, takingAmountGetter, predicate, permit, preInteraction, postInteraction.Lowest 160 bits of the order salt must be equal to the lowest 160 bits of the extension hash Extension string `json:"extension,omitempty"` Order OrderInput `json:"order"` // QuoteId Quote id of the quote with presets QuoteId string `json:"quoteId"` // Signature Signature of the gasless order typed data (using signTypedData_v4) Signature string `json:"signature"` }
SignedOrderInput defines model for SignedOrderInput.
type TakingFeeInfo ¶
type TokenPairValue ¶
type TokenPairValue struct {
Usd PairCurrencyValue `json:"usd"`
}
TokenPairValue defines model for TokenPairValue.