Documentation
¶
Overview ¶
Package testutils serves feeder test data through Juno's own JSON-RPC stack.
Index ¶
- Constants
- Variables
- func Listen(t testing.TB, handler http.Handler) *url.URL
- func NewChain(t testing.TB) *blockchain.Blockchain
- func NewChainFor(t testing.TB, network *networks.Network, height uint64, ...) *blockchain.Blockchain
- func NewGenesisChain(t testing.TB, network *networks.Network, classHashes ...string) *blockchain.Blockchain
- func Serve(t testing.TB, chain *blockchain.Blockchain) http.Handler
- func ServeV0_9(t testing.TB, chain *blockchain.Blockchain) http.Handler
Constants ¶
const ( ChainHeight = 5 MissingBlockNumber = 100 DeprecatedClassHash = "0xd0e183745e9dae3e4e78a8ffedcce0903fc4900beace4e0abf192d4c202da3" SierraClassHash = "0x3cc90db763e736ca9b6c581ea4008408842b1a125947ab087438676a7e40b7b" )
Variables ¶
var GenesisClassHashes = []string{ DeprecatedClassHash, "0x5c478ee27f2112411f86f207605b2e2c58cdb647bac0df27f660ef2252359c6", }
Functions ¶
func NewChain ¶
func NewChain(t testing.TB) *blockchain.Blockchain
No test data chain declares a Sierra class from genesis, so it is stored with block 0's deprecated ones.
func NewChainFor ¶
func NewChainFor( t testing.TB, network *networks.Network, height uint64, genesisClassHashes ...string, ) *blockchain.Blockchain
func NewGenesisChain ¶
func NewGenesisChain( t testing.TB, network *networks.Network, classHashes ...string, ) *blockchain.Blockchain
NewGenesisChain declares the classes in a genesis of its own, since no test data chain declares a Sierra class in a block.
func Serve ¶
func Serve(t testing.TB, chain *blockchain.Blockchain) http.Handler
func ServeV0_9 ¶
func ServeV0_9(t testing.TB, chain *blockchain.Blockchain) http.Handler
Types ¶
This section is empty.