constants

package
v0.0.0-...-613d1fa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MaxOrderSizeInBytes is the maximum number of bytes allowed for encoded
	// orders. It allows for MultiAssetProxy orders with roughly 45 total ERC20
	// assets or roughly 36 total ERC721 assets (combined between both maker and
	// taker; depends on the other fields of the order).
	MaxOrderSizeInBytes = 16000

	// MaxMessageSizeInBytes is the maximum size for messages sent through
	// GossipSub. It is the max order size plus some overhead for the message
	// format.
	MaxMessageSizeInBytes = MaxOrderSizeInBytes + messageOverhead
)
View Source
const GanacheEndpoint = "http://localhost:9545"

GanacheEndpoint specifies the Ganache test Ethereum node JSON RPC endpoint used in tests

View Source
const GethFilterUnknownBlock = "unknown block"
View Source
const MaxBlocksStoredInNonArchiveNode = 128

MaxBlocksStoredInNonArchiveNode is the max number of historical blocks for which a regular Ethereum node stores archive-level state. One cannot make `eth_call` requests specifying blocks earlier than 128 blocks ago on non-archive nodes.

View Source
const ParityFilterUnknownBlock = "One of the blocks specified in filter (fromBlock, toBlock or blockHash) cannot be found"
View Source
const TestChainID = 1337

TestChainID is the test (Ganache) chainId used for testing

Variables

View Source
var (
	// NullAddress is an Ethereum address with all zeroes.
	NullAddress = common.HexToAddress("0x0000000000000000000000000000000000000000")
	// NullBytes is an empty byte array
	NullBytes = common.FromHex("0x")
)
View Source
var (
	// GanacheAccount0 is the first account exposed on the Ganache test Ethereum node
	GanacheAccount0 = common.HexToAddress("0x468929A0DAC6D5A1c7BA1ab09c0862195D63b18c")

	// GanacheAccount1 is the second account exposed on the Ganache test Ethereum node
	GanacheAccount1 = common.HexToAddress("0xBC0782fCCdf14293e6CB20FB28ba4943fBa0F92c")

	// GanacheAccount2 is the third account exposed on the Ganache test Ethereum node
	GanacheAccount2 = common.HexToAddress("0xd200C901b33B04a879F17F8D17426B64eAc28d3F")

	// GanacheAccount3 is the fourth account exposed on the Ganache test Ethereum node
	GanacheAccount3 = common.HexToAddress("0x36c9465a37251EBAC3Cd8D6b1B35759FcF6b27D0")

	// GanacheAccount4 is the fifth account exposed on the Ganache test Ethereum node
	GanacheAccount4 = common.HexToAddress("0x8f3c223Ab9C5366fbd7128b706158c4c27BFD591")
)
View Source
var (
	// ErrMaxMessageSize is returned or emitted when a GossipSub message exceeds
	// the max size.
	ErrMaxMessageSize = fmt.Errorf("message exceeds maximum size of %d bytes", MaxMessageSizeInBytes)
	// ErrMaxOrderSize is returned or emitted when a signed order encoded as JSON
	// exceeds the max size.
	ErrMaxOrderSize = fmt.Errorf("order exceeds maximum size of %d bytes", MaxOrderSizeInBytes)
)
View Source
var (
	//#HASTOBECHANGED
	ZRXAssetData  = common.Hex2Bytes("f47261b0000000000000000000000000871dd7c2b4b25e1aa18728e9d5f2af4c4e431f5c")
	WETHAssetData = common.Hex2Bytes("f47261b00000000000000000000000000b1ba0af832d7c05fd64161e0db78e85978e8082")
)
View Source
var ErrInternal = errors.New("internal error")

ErrInternal is used whenever we don't wish to expose internal errors to a client

View Source
var GanacheAccountToPrivateKey = map[common.Address][]byte{
	GanacheAccount0: ganacheAccount0PrivateKey,
	GanacheAccount1: ganacheAccount1PrivateKey,
	GanacheAccount2: ganacheAccount2PrivateKey,
	GanacheAccount3: ganacheAccount3PrivateKey,
	GanacheAccount4: ganacheAccount4PrivateKey,
}

GanacheAccountToPrivateKey maps Ganache test Ethereum node accounts to their private key

View Source
var GanacheDummyERC1155MintableAddress = common.HexToAddress("0x038f9b392fb9a9676dbaddf78ea5fdbf6c7d9710")

GanacheDummyERC1155MintableAddress is the dummy ERC1155 token address in the Ganache snapshot #HASTOBECHANGED

View Source
var GanacheDummyERC721TokenAddress = common.HexToAddress("0x07f96aa816c1f244cbc6ef114bb2b023ba54a2eb")

GanacheDummyERC721TokenAddress is the dummy ERC721 token address in the Ganache snapshot #HASTOBECHANGED

View Source
var TestMaxContentLength = 1024 * 512

TestMaxContentLength is the max Ethereum RPC Content-Length used in tests

View Source
var UnlimitedExpirationTime *big.Int

UnlimitedExpirationTime is the maximum value for uint256 (2^256-1), which means there is effectively no limit on the maximum expiration time for orders.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL