constants

package
v7.1.0-beta+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const GanacheEndpoint = "http://localhost:8545"

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

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 MaxOrderSizeInBytes = 8192

MaxOrderSizeInBytes is the maximum number of bytes allowed for encoded orders. It is more than 10x the size of a typical ERC20 order to account for multiAsset orders.

View Source
const TestChainID = 1337

TestChainID is the test (Ganache) chainId used for testing

Variables

View Source
var (
	// GanacheAccount0 is the first account exposed on the Ganache test Ethereum node
	GanacheAccount0 = common.HexToAddress("0x5409ed021d9299bf6814279a6a1411a7e866a631")

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

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

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

	// GanacheAccount4 is the fifth account exposed on the Ganache test Ethereum node
	GanacheAccount4 = common.HexToAddress("0x78dc5d2d739606d31509c31d654056a45185ecb6")
)
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 ErrMaxMessageSize = fmt.Errorf("message exceeds maximum size of %d bytes", MaxOrderSizeInBytes)

ErrMaxMessageSize is the error emitted when a message exceeds it's max size

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("0xc4df27466183c0fe2a5924d6ea56e334deff146a")

GanacheDummyERC1155MintableAddress is the dummy ERC1155 token address in the Ganache snapshot

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

GanacheDummyERC721TokenAddress is the dummy ERC721 token address in the Ganache snapshot

View Source
var NullAddress = common.HexToAddress("0x0000000000000000000000000000000000000000")

NullAddress is an Ethereum address with all zeroes.

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