Currently we create one instance of CodeFetcher in the price estimator factory and another one for the OrderValidator in the orderbook. There is no reason these need to be separate instances so by sharing 1 instance in both contexts we could reduce the number of RPC calls we issue for fetching code at a given address.
Background
Currently we create one instance of
CodeFetcher
in the price estimator factory and another one for theOrderValidator
in the orderbook. There is no reason these need to be separate instances so by sharing 1 instance in both contexts we could reduce the number of RPC calls we issue for fetching code at a given address.