Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

refactor: rewrite into a TypeScript monorepo, partial #657

Merged
merged 694 commits into from
Nov 16, 2020
Merged

refactor: rewrite into a TypeScript monorepo, partial #657

merged 694 commits into from
Nov 16, 2020

Conversation

davidmurdoch
Copy link
Member

@davidmurdoch davidmurdoch commented Oct 31, 2020

This PR omits the Ethereum forking feature, debug_traceTransaction, and Tezos support.

This PR is a breaking change.

KNOWN ISSUES:

While pending transaction support now works, the "pending" block tag doesn't work yet.

FEATURES:

FIXES:

BREAKING CHANGE:

  • Runtime Error: errors are now "Runtime error:`
  • Ganache's provider and server internals are no longer exposed via its properties.
  • web3_clientVersion now returns Ganache/v{number/number/number}
  • remove support for Node v8.x
  • change signer account is locked error to authentication needed: password or unlock
  • change Exceeds block gas limit error to exceeds block gas limit
  • vmErrorsOnRPCResponse option defaults to false
  • chainId option defaults to 1337
  • server.listen isn't pre-bound to the server instance (server.listen.bind(server))
  • provider.send isn't pre-bound to the provider instance (provider.listen.bind(provider))
  • rename provider.remveAllListeners to provider.clearListeners
  • remove options.keepAliveTimeout
  • remove support for BN in provider RPC methods
  • skipping nonces no longer results in an error ("too high" nonces aren't a thing anymore)
  • provider.close is now provider.disconnect and returns promise (no callback argument)
  • return Cannot wrap a "[a-zA-Z]+" as a json-rpc type on evm_revert error instead of invalid type or false for invalid snapshot ids
  • require transaction data to be valid json-rpc hex-encoded DATA (must start with 0x)
  • blocks are now filled based on actual transaction gas usage, not by the transactions stated gas/gasLimit
  • invalid transaction v values are no longer allowed
  • change invalid block number error to cannot convert string value "" into type Quantity; strings must be hex-encoded and prefixed with "0x".
  • change Method {method} not supported error to The method {method} does not exist/is not available
  • return error "header not found" for requests to non-existent blocks
  • provider.connection.close is no longer a thing on the web3 provider (NEEDS MORE INFO!)
  • previous versions utf-8 instead of binary over websockets when the request was binary encoded, the encoding is now echoed by default. new flag/option to revert bahavior: wsBinary
  • change error when subscription requested over http from -32000 to -32004
  • require transaction value string to be valid JSON-RPC encoded QUANTITY ("1000" is no longer valid!)
  • replace provider.options with provider.getOptions()
  • Ganache no longer returns both an error and result via the provider when using old provider.send via callback.
  • (legacyInstamine mode only): error messages are returned on the result's data field now. Previously they were contained within a combination of the 'results: {[hash: string]: unknown}' and 'hashes: string[]' properties. Also, only evm_mine and miner_start return an array for the 'data' field, as these are the only places where multiple transactions may be executed (this isn't entirely true when a nonce is skipped and then the skipped nonce is executed, but this behavior wasn't supported in v2 anyway!).
  • a result is no longer present when an error is returned. fixes move reporting of tx hash on error to error field to prevent poorly-written clients which assume that the existence of the "result" field implies no errors from breaking. #558 (for ganache v3 release only).
  • default coinbase (eth_coinbase RPC call) is now the 0x0 address (fixes block.coinbase does only return 0x #201)
  • transaction ordering from multiple accounts is now ordered by gasPrice
  • old databases from v2 are not compatible with v3
  • options now always treat strings that represent numbers as hex strings, not numbers
  • default gasLimit is now 12M
  • sender doesn't have enough funds to send tx errors are now prefixed with VM Exception while processing transaction'`
  • logs subscription events are emitted before newHeads events

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant