Skip to content

replace ethereum plugin with ethereum wrapper#1446

Merged
dOrgJelli merged 64 commits into
origin-devfrom
ethereum-plugin-to-wrapper
Feb 16, 2023
Merged

replace ethereum plugin with ethereum wrapper#1446
dOrgJelli merged 64 commits into
origin-devfrom
ethereum-plugin-to-wrapper

Conversation

@krisbitney
Copy link
Copy Markdown
Contributor

@krisbitney krisbitney commented Dec 15, 2022

This PR removes the ethereum plugin and replaces it with the ethereum wrapper.

Notes on deployment

The ethereum wrapper is in a new repo: https://github.com/polywrap/ethereum. If you want to be added as a codeowner, just create a PR adding your name or let me know and I'll add you.

The plugin code has been moved to https://github.com/polywrap/ethereum/tree/main/plugin-js. Once this PR is merged, we can do a final NPM release indicating the plugin is deprecated.

The ethereum provider plugin that supports the wrapper is currently published to npm as ethereum-provider-js.
The ethereum wrapper is currently published to ENS at ens/wraps.eth:ethereum@1.0.0.

Differences between the ethereum wrapper and ethereum plugin

The ethereum wrapper has nearly the same interface and behavior as the ethereum plugin, with a few differences.

First, the ethereum wrapper adds support for EIP 1559 transactions using maxFeePerGas and maxPriorityFeePerGas. It retains support for legacy transactions with gasPrice.

Second, the ethereum wrapper does not yet support timeouts. The method waitForEvent is not implemented. The method awaitTransaction is implemented, but it only waits for one confirmation and does so without a timeout.

Third, tuple formatting is more restrictive for human-readable ABIs. Whereas the etherum plugin supported tuples written like "tuple(string foo, uint256 bar, uint8 baz)", the ethereum wrapper requires the same tuple to be written "(string,uint256,uint8)". The word "tuple", the parameter names, and the spaces between the commons are all absent in the latter expression.

…-to-wrapper

# Conflicts:
#	packages/js/client-config-builder/src/bundles/getDefaultConfig.ts
#	packages/js/plugins/ethereum/src/__tests__/helpers/getDefaultConfig.ts
#	packages/js/plugins/ethereum/src/index.ts
…-to-wrapper

# Conflicts:
#	packages/js/plugins/ethereum/src/__tests__/e2e.spec.ts
#	packages/js/plugins/ethereum/src/__tests__/integration/src/index.ts
#	packages/js/plugins/ethereum/src/__tests__/integration/src/schema.graphql
#	packages/js/plugins/ethereum/src/index.ts
#	packages/js/plugins/ethereum/src/schema.graphql
…-to-wrapper

# Conflicts:
#	packages/cli/package.json
#	packages/js/client-config-builder/package.json
#	packages/js/client/package.json
#	packages/js/plugins/ethereum/package.json
#	packages/js/plugins/ethereum/src/__tests__/integration/package.json
#	packages/js/plugins/uri-resolvers/ens-resolver/package.json
#	packages/js/react/package.json
#	packages/js/react/src/__tests__/app/SimpleStorage.tsx
#	packages/js/react/src/__tests__/config.ts
#	packages/js/react/src/__tests__/integration.spec.tsx
#	packages/js/react/src/__tests__/usePolywrapClient.spec.tsx
#	packages/js/react/src/__tests__/usePolywrapInvoke.spec.tsx
#	packages/js/react/src/__tests__/usePolywrapQuery.spec.tsx
…-to-wrapper

# Conflicts:
#	packages/js/client-config-builder/src/bundles/getDefaultConfig.ts
#	packages/js/plugins/ethereum/package.json
#	packages/js/plugins/ethereum/polywrap.yaml
#	packages/js/plugins/ethereum/src/__tests__/e2e.spec.ts
…-to-wrapper

# Conflicts:
#	packages/js/plugins/ethereum/src/__tests__/e2e.spec.ts
Comment thread packages/js/client-config-builder/src/bundles/getDefaultConfig.ts Outdated
Comment thread packages/js/plugins/uri-resolvers/ipfs-resolver/src/index.ts Outdated
Comment thread packages/cli/package.json Outdated
@cbrzn cbrzn mentioned this pull request Feb 8, 2023
…-to-wrapper

# Conflicts:
#	packages/cli/src/lib/defaults/deploy-modules/ens-recursive-name-register/index.ts
#	packages/cli/src/lib/defaults/deploy-modules/ens/index.ts
#	packages/cli/src/lib/test-env/client-config.ts
#	packages/js/client-config-builder/src/bundles/getDefaultConfig.ts
#	packages/js/client/src/__tests__/core/sanity.spec.ts
#	packages/js/client/src/__tests__/core/uri-resolution/histories/can resolve a URI resolver extension wrapper.json
#	packages/js/client/src/__tests__/core/uri-resolution/histories/can resolve previously cached URI after redirecting by a URI resolver extension - 1.json
#	packages/js/client/src/__tests__/core/uri-resolution/histories/can resolve previously cached URI after redirecting by a URI resolver extension - 2.json
#	packages/js/client/src/__tests__/core/uri-resolution/histories/custom wrapper resolver does not cause infinite recursion when resolved at runtime.json
#	packages/js/client/src/__tests__/core/uri-resolution/histories/restarts URI resolution after URI resolver extension redirect.json
#	packages/js/client/src/__tests__/core/uri-resolution/histories/sanity.json
#	packages/js/client/src/__tests__/helpers/getClientWithEnsAndIpfs.ts
#	packages/js/plugins/ethereum/src/__tests__/e2e.spec.ts
#	packages/js/plugins/ethereum/src/__tests__/helpers/getDefaultConfig.ts
#	packages/js/plugins/uri-resolvers/ens-resolver/package.json
#	packages/js/plugins/uri-resolvers/ens-resolver/src/__tests__/e2e.spec.ts
#	packages/js/plugins/uri-resolvers/ens-resolver/src/__tests__/helpers/getClient.ts
#	packages/js/plugins/uri-resolvers/ipfs-resolver/src/__tests__/e2e.spec.ts
#	packages/js/plugins/uri-resolvers/ipfs-resolver/src/index.ts
#	packages/js/plugins/uri-resolvers/ipfs-resolver/src/schema.graphql
#	packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/wrap/types.ts
#	packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/wrap/types.ts
#	packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/wrap/types.ts
#	packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/wrap/types.ts
#	yarn.lock
…ereum URI in wrapper-envs.yaml for option parser unit test in CLI
…-to-wrapper

# Conflicts:
#	packages/cli/package.json
#	packages/js/client-config-builder/package.json
#	packages/js/client/package.json
#	packages/js/plugins/ethereum/package.json
#	packages/js/plugins/ethereum/src/__tests__/integration/package.json
#	packages/js/plugins/uri-resolvers/ens-resolver/package.json
Copy link
Copy Markdown
Contributor

@dOrgJelli dOrgJelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small step for the toolchain repo 🌔, one giant leap for wrapper kind 🌟

@dOrgJelli dOrgJelli merged commit ceb8b40 into origin-dev Feb 16, 2023
@dOrgJelli dOrgJelli deleted the ethereum-plugin-to-wrapper branch April 10, 2023 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants