Skip to content

Commit

Permalink
added docs
Browse files Browse the repository at this point in the history
  • Loading branch information
decanus committed Feb 16, 2024
1 parent 5f3c6c2 commit 4fde2ec
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@
This repository contains Go bindings for the [0xSquid](https://www.squidrouter.com/) API.

Currently supported versions of the API:
- [v1](https://squidrouter.readme.io/reference/getting-started-with-your-api-1)
- [v1](https://squidrouter.readme.io/reference/getting-started-with-your-api-1)

**This repository is not feature complete, it only currently contains code we use.**

18 changes: 13 additions & 5 deletions v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,20 @@ const (
)

type CustomContractCall struct {
CallType CallType
Target string
Value string
CallData string
// CallType squid call type
CallType CallType
// Target is the address of the contract to be called
Target string
// Value is the amount of native coin, in most scenarios should be "0"
Value string
// CallData is the contract call encoded call data
CallData string
// EstimatedGas is the amount of gas of the call
EstimatedGas string
Payload struct {
TokenAddress string
// TokenAddress is the address of the ERC20 token
TokenAddress string
// InputPosition is the position of the amount argument in the contract call to set the balance dynamically
InputPosition string
}
}
Expand Down Expand Up @@ -94,6 +101,7 @@ func (p RouteRequestParameters) ToQuery() url.Values {
}

type TransactionRequest struct {
RouteType string `json:"routeType"`
TargetAddress string `json:"targetAddress"`
Data string `json:"data"`
Value string `json:"value"`
Expand Down

0 comments on commit 4fde2ec

Please sign in to comment.