Documentation ¶
Index ¶
- Constants
- Variables
- func HexStringToBytes(hexString string) ([]byte, error)
- type Address
- type AssetData
- func (data AssetData) Address() *Address
- func (data AssetData) IsType(proxyId [4]byte) bool
- func (data AssetData) MarshalJSON() ([]byte, error)
- func (data AssetData) ProxyId() [4]byte
- func (data AssetData) SupportedType() bool
- func (data AssetData) TokenID() *Uint256
- func (data AssetData) Value() (driver.Value, error)
- type NetworkAddressMap
- type Order
- type Pool
- type Signature
- type Uint256
Constants ¶
View Source
const ( SigTypeIllegal = 0 SigTypeInvalid = 1 SigTypeEIP712 = 2 SigTypeEthSign = 3 SigTypeWallet = 4 SigTypeValidator = 5 SigTypePreSigned = 6 NSigTypes = 7 )
Variables ¶
View Source
var ERC20ProxyID = [4]byte{244, 114, 97, 176} // 0xf47261b0
View Source
var ERC721ProxyID = [4]byte{2, 87, 23, 146} // 0x02571792
Functions ¶
func HexStringToBytes ¶
Types ¶
type Address ¶
type Address [20]byte
func (*Address) MarshalJSON ¶
func (*Address) ToGethAddress ¶
func (*Address) UnmarshalJSON ¶
type AssetData ¶
type AssetData []byte
func (AssetData) MarshalJSON ¶
func (AssetData) SupportedType ¶
type NetworkAddressMap ¶
func (NetworkAddressMap) GormDataType ¶
func (nmap NetworkAddressMap) GormDataType(dialect gorm.Dialect) string
GormDataType tells gorm what data type to use for the column.
func (NetworkAddressMap) Scan ¶
func (nmap NetworkAddressMap) Scan(src interface{}) error
type Order ¶
type Order struct { Maker *Address `gorm:"index"` Taker *Address `gorm:"index"` MakerAssetAddress *Address `gorm:"index"` TakerAssetAddress *Address `gorm:"index"` MakerAssetData AssetData `gorm:"index"` TakerAssetData AssetData `gorm:"index"` FeeRecipient *Address `gorm:"index"` ExchangeAddress *Address `gorm:"index"` SenderAddress *Address `gorm:"index"` MakerAssetAmount *Uint256 TakerAssetAmount *Uint256 MakerFee *Uint256 TakerFee *Uint256 `gorm:"index"` ExpirationTimestampInSec *Uint256 `gorm:"index"` Salt *Uint256 Signature Signature //`gorm:"type:bytea"` TakerAssetAmountFilled *Uint256 Cancelled bool PoolID []byte `gorm:"index"` }
Order represents an 0x order object
func NewOrder ¶
func NewOrder(maker, taker, makerToken, takerToken, feeRecipient, exchangeAddress, senderAddress, makerTokenAmount, takerTokenAmount, makerFee, takerFee, expirationTimestampInSec, salt, sig, takerTokenAmountFilled, cancelled string) (*Order, error)
NewOrder takes string representations of values and converts them into an Order object
func OrderFromBytes ¶
func (*Order) Initialize ¶
func (order *Order) Initialize()
func (*Order) MarshalJSON ¶
func (*Order) UnmarshalJSON ¶
type Signature ¶
type Signature []byte
func (Signature) MarshalJSON ¶
func (Signature) UnmarshalJSON ¶
type Uint256 ¶
type Uint256 [32]byte
func IntStringToUint256 ¶
func (*Uint256) MarshalJSON ¶
func (*Uint256) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.