A prototype snap for injecting gas fee prices into a confirmation window that also serves as the basis for a 5-minute Snaps tutorial

Overview

@Montoya/gas-fee-snap

A simple Snap example based on @MetaMask/template-snap. Read below for a tutorial!

Prerequisites

Before you begin, make sure you have the following installed:

* Please note: MetaMask Flask is experimental preview software. Please do not use your existing secret recovery phrase or keys with Flask. It is recommended that you create a new SRP for testing with Flask.

The 5-Minute Snap Tutorial

In this tutorial, you will learn how to use the Snap template and CLI tools, how to add permissions to be requested at runtime, how to use the fetch API to request information from the Internet, and how to display custom information in a Snap Confirmation. The Snap you will implement is not meant to be an ideal way to show gas fee estimates but rather to demonstrate some features to get you started building with Snaps.

First, navigate to the @MetaMask/template-snap repository and click "Use this template."

Use this template

Give your new Snap a name, like gas-fee-snap. Clone the respository to your local machine. Open a command line tool and run ./scripts/cleanup.sh to remove some MetaMask-specific files that will not work outside of the MetaMask GitHub organization. Now you are ready to start modifying the files in your Snap.

Adding the Network Access Permission to your Snap

Open snap.manifest.json. This file has the main configuration details for your Snap. To enable your Snap to use the fetch API, you need to request the "network access" permission. You can do this by modifying initialPermissions to include this permission, like so:

"initialPermissions": {
  "snap_confirm": {}, 
  "endowment:network-access": {}
},

Fetching Gas Fee Estimates

Open src/index.js. This is the main code file for your Snap. To get a gas fee estimate, you will use the public API endpoint provided by etherchain.org. Add the following async function:

async function getFees() {
  let response = await fetch('https://www.etherchain.org/api/gasPriceOracle');
  return response.text();
} 

Then, modify the Snap RPC Message Handler that dislays the confirmation window. This handler uses a switch statement to handle various request methods, but in this case there is only one method: "hello." For this method, it returns a wallet request (a call to MetaMask) with the parameters to display a confirmation window and passes some static strings.

Before the return statement, add a constant to receive the result from the fetch request:

case 'hello':
   const fees = await getFees(); 
   return wallet.request({

Then modify the textAreaContent parameter to display this result:

description:
   'This custom confirmation is just for display purposes.',
textAreaContent:
   'Current fee estimates: '+fees

Building and testing your Snap

Open package.json and bump the version (if 0.7.0, bump it to 0.7.1).

From the command line, run the following commands to build and test your Snap:

yarn install

yarn build

yarn run serve

After the last command, you should get a message like the following:

yarn run v1.22.15
$ mm-snap serve

Starting server...
Server listening on: http://localhost:8080

Now, open Google Chrome and navigate to localhost:8080. You will see a page like the following:

Test Dapp

This is a boilerplate test Dapp for installing and testing your Snap. Click "Connect" to connect Flask to the Dapp. After connecting, you will be prompted to install the Snap with two permissions, "Display a confirmation" and "Access the Internet." Click "Approve & Install", then click the "Send Hello" button. You should see a confirmation window like the following:

Test Confirmation

Congratulations! You just integrated a public API into MetaMask and displayed real-time gas fee estimates.

Next Steps

With a little bit of cleanup, you can format the gas fee estimates in the confirmation window:

const fees = JSON.parse(await getFees());
const baseFee = parseFloat(fees.currentBaseFee); 
const safeLow = Math.ceil(baseFee + parseFloat(fees.safeLow)); 
const standard = Math.ceil(baseFee + parseFloat(fees.standard)); 
const fastest = Math.ceil(baseFee + parseFloat(fees.fastest)); 
return wallet.request({
   method: 'snap_confirm',
   params: [
      {
      prompt: `Gas Fees`,
      description:
         'Current Gas Fees from etherchain.org:',
      textAreaContent:
         'Low: '+safeLow+"\n"+
         'Average: '+standard+"\n"+
         'High: '+fastest
      },
   ],
});

You can update the fields in snap.manifest.json to match your custom Snap:

  • proposedName: I used Gas Fee Snap but you can use whatever you prefer
  • description: up to you
  • repository: the url should match your GitHub repo where you cloned the template
  • source: the shasum is set automatically when you build from the command line. the location should be based on where it is published on NPM if you decide to publish.

Likewise, you should update the name, version, description, and repository sections of package.json even if you do not plan to publish your Snap to NPM. Note: the version field in snap.manifest.json inherits the version field from package.json.

Lastly, you can update the content of index.html, such as changing the name of the method for showing gas fee estimates, but make sure to change the method name in src/index.js as well to match. In this repository, the method name has been changed to fees and the content of index.html has been changed so that the button to invoke it is appropriately labeled "Get Fees."

Once you have made all these changes you can publish your Snap to NPM and make the Dapp public so that others can install your custom Snap in MetaMask Flask!

Helpful Resources

Building a Snap? Want to learn more? Join the discussion board and let us know!

Comments
  • Bump @metamask/snaps-cli from 0.22.0 to 0.26.2

    Bump @metamask/snaps-cli from 0.22.0 to 0.26.2

    Bumps @metamask/snaps-cli from 0.22.0 to 0.26.2.

    Release notes

    Sourced from @​metamask/snaps-cli's releases.

    0.26.2

    examples

    Changed

    • No changes this release.

    @​metamask/multichain-provider

    Changed

    • No changes this release.

    @​metamask/rpc-methods

    Changed

    • No changes this release.

    @​metamask/snaps-browserify-plugin

    Changed

    • No changes this release.

    @​metamask/snaps-cli

    Changed

    • No changes this release.

    @​metamask/snaps-controllers

    Changed

    • No changes this release.

    @​metamask/snaps-execution-environments

    Fixed

    • Fix usage of wrong ethereum global for ethereum endowment (#1064)

    @​metamask/snaps-rollup-plugin

    Changed

    • No changes this release.

    @​metamask/snaps-types

    Changed

    • No changes this release.

    @​metamask/snaps-ui

    Changed

    • No changes this release.

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump @metamask/snaps-cli from 0.22.0 to 0.26.1

    Bump @metamask/snaps-cli from 0.22.0 to 0.26.1

    Bumps @metamask/snaps-cli from 0.22.0 to 0.26.1.

    Release notes

    Sourced from @​metamask/snaps-cli's releases.

    0.26.1

    examples

    Changed

    • No changes this release.

    @​metamask/multichain-provider

    Changed

    • No changes this release.

    @​metamask/rpc-methods

    Changed

    • No changes this release.

    @​metamask/snaps-browserify-plugin

    Changed

    • No changes this release.

    @​metamask/snaps-cli

    Changed

    • No changes this release.

    @​metamask/snaps-controllers

    Fixed

    • Fix some paths being wrongly normalized (#1053)
    • Fix some issues with fetching snaps (#1050)

    @​metamask/snaps-execution-environments

    Changed

    • No changes this release.

    @​metamask/snaps-rollup-plugin

    Changed

    • No changes this release.

    @​metamask/snaps-types

    Changed

    • No changes this release.

    @​metamask/snaps-ui

    Changed

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump @metamask/snaps-cli from 0.22.0 to 0.26.0

    Bump @metamask/snaps-cli from 0.22.0 to 0.26.0

    Bumps @metamask/snaps-cli from 0.22.0 to 0.26.0.

    Release notes

    Sourced from @​metamask/snaps-cli's releases.

    0.26.0

    examples

    Changed

    • No changes this release.

    @​metamask/multichain-provider

    Changed

    • No changes this release.

    @​metamask/rpc-methods

    Changed

    • No changes this release.

    @​metamask/snaps-browserify-plugin

    Changed

    • No changes this release.

    @​metamask/snaps-cli

    Fixed

    • Fix post processing issue with object.eval (#1040)

    @​metamask/snaps-controllers

    Changed

    • BREAKING: Snap installation refactor (#1023)
      • wallet_requestSnaps will now throw an error and roll back any changes made if installation of any snap fails

    Fixed

    • Fix an issue processing non-snap permissions (#1044)

    @​metamask/snaps-execution-environments

    Changed

    • No changes this release.

    @​metamask/snaps-rollup-plugin

    Changed

    • No changes this release.

    @​metamask/snaps-types

    Changed

    • No changes this release.

    ... (truncated)

    Commits
    • 7f5cfd4 0.26.0 (#1048)
    • ac80ba6 BREAKING: SnapController.installSnaps refactor & rollback functionality add...
    • 6811cec Bump qs from 6.5.2 to 6.5.3 (#1046)
    • 18bb7f2 Bump @​metamask/permission-controller from 1.0.1 to 1.0.2 (#1045)
    • b95e6af Fix non-snap permission processing (#1044)
    • eea652c Add virtual files and refactor snap fetching (#1019)
    • 0e51213 Fix post processing issue with object.eval (#1040)
    • 4f3deda Bump controllers packages (#1039)
    • fe7e5a7 Bump @​metamask/subject-metadata-controller from 1.0.0 to 1.0.1 (#1037)
    • 3a30b2b Bump @​metamask/base-controller from 1.1.0 to 1.1.1 (#1038)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump @metamask/snaps-cli from 0.22.0 to 0.25.0

    Bump @metamask/snaps-cli from 0.22.0 to 0.25.0

    Bumps @metamask/snaps-cli from 0.22.0 to 0.25.0.

    Release notes

    Sourced from @​metamask/snaps-cli's releases.

    0.25.0

    examples

    Changed

    • No changes this release.

    @​metamask/multichain-provider

    Changed

    • No changes this release.

    @​metamask/rpc-methods

    Added

    • Add placeholder parameter for prompt dialog (#1007)

    @​metamask/snaps-browserify-plugin

    Changed

    • No changes this release.

    @​metamask/snaps-cli

    Changed

    • No changes this release.

    @​metamask/snaps-controllers

    Added

    • BREAKING: Add JSON-RPC handler permission (#905)
      • Snaps are now required to request endowment:rpc to receive RPC requests.
    • Add transaction origin caveat export (#1010)

    @​metamask/snaps-execution-environments

    Changed

    • No changes this release.

    @​metamask/snaps-rollup-plugin

    Changed

    • No changes this release.

    @​metamask/snaps-types

    Changed

    • No changes this release.

    @​metamask/snaps-ui

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump @metamask/snaps-cli from 0.22.0 to 0.24.1

    Bump @metamask/snaps-cli from 0.22.0 to 0.24.1

    Bumps @metamask/snaps-cli from 0.22.0 to 0.24.1.

    Release notes

    Sourced from @​metamask/snaps-cli's releases.

    0.24.1

    examples

    Changed

    • No changes this release.

    @​metamask/multichain-provider

    Changed

    • No changes this release.

    @​metamask/rpc-methods

    Fixed

    • Fix snap_getBip32PublicKey manifest validation (#970)

    @​metamask/snaps-browserify-plugin

    Changed

    • No changes this release.

    @​metamask/snaps-cli

    Changed

    • No changes this release.

    @​metamask/snaps-controllers

    Changed

    • No changes this release.

    @​metamask/snaps-execution-environments

    Changed

    • No changes this release.

    @​metamask/snaps-rollup-plugin

    Changed

    • No changes this release.

    @​metamask/snaps-types

    Changed

    • No changes this release.

    @​metamask/snaps-utils

    Fixed

    • Fix snap_getBip32PublicKey manifest validation (#970)

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump @metamask/auto-changelog from 2.6.1 to 3.0.0

    Bump @metamask/auto-changelog from 2.6.1 to 3.0.0

    Bumps @metamask/auto-changelog from 2.6.1 to 3.0.0.

    Release notes

    Sourced from @​metamask/auto-changelog's releases.

    3.0.0

    Added

    • Support alternate tag prefixes (#120)

    Changed

    • BREAKING: Update minimum Node.js version to v14 (#117)
    • Get package version from manifest (#121)
    Changelog

    Sourced from @​metamask/auto-changelog's changelog.

    [3.0.0]

    Added

    • Support alternate tag prefixes (#120)

    Changed

    • BREAKING: Update minimum Node.js version to v14 (#117)
    • Get package version from manifest (#121)
    Commits
    Maintainer changes

    This version was pushed to npm by metamaskbot, a new releaser for @​metamask/auto-changelog since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump @metamask/snaps-cli from 0.22.0 to 0.23.0

    Bump @metamask/snaps-cli from 0.22.0 to 0.23.0

    Bumps @metamask/snaps-cli from 0.22.0 to 0.23.0.

    Release notes

    Sourced from @​metamask/snaps-cli's releases.

    0.23.0

    @​metamask/snaps-cli

    Changed

    • BREAKING: Refactor mm-snap init command (#866)
      • mm-snap init only takes one optional argument now, a directory for the snap to be initialized in.
      • It uses a new snap monorepo template.
    • Replace auto type guard with struct (#911)
    • Replace JSON schema validation with structs (#862)

    @​metamask/snap-controllers

    Added

    Changed

    • BREAKING: Make SnapController.add() private (#883)
    • BREAKING: Stop including snap state in SnapController state (#876)
    • BREAKING: Stop including source code in SnapController state (#861)
    • Improve keyring endowment error messaging (#884)
    • Replace JSON schema validation with structs (#862)

    examples

    Changed

    • No changes this release.

    @​metamask/execution-environments

    Added

    • Add snap cronjobs (#651)

    Changed

    • BREAKING: Replace Buffer with Typed Arrays (#878)
    • Improve execution environment type validation (#844)

    @​metamask/snaps-browserify-plugin

    Changed

    • No changes this release.

    @​metamask/rollup-plugin-snaps

    Changed

    • No changes this release.

    @​metamask/snaps-webpack-plugin

    Fixed

    • Fix Webpack plugin issue with existing files (#858)

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump @metamask/providers from 9.0.0 to 10.2.0

    Bump @metamask/providers from 9.0.0 to 10.2.0

    Bumps @metamask/providers from 9.0.0 to 10.2.0.

    Release notes

    Sourced from @​metamask/providers's releases.

    10.2.0

    Changed

    • update json-rpc-middleware-stream (#230)

    10.1.0

    Changed

    • Update json-rpc-middleware-stream (#228)

    10.0.0

    Changed

    • Retry sending messages to extension when METAMASK_EXTENSION_STREAM_CONNECT is received (#223)
    • BREAKING: Update minimum Node.js version to v14 (#225)

    9.1.0

    Added

    • Add deprecation warning for encryption methods (#218)
    Changelog

    Sourced from @​metamask/providers's changelog.

    [10.2.0]

    Changed

    • update json-rpc-middleware-stream (#230)

    [10.1.0]

    Changed

    • Update json-rpc-middleware-stream (#228)

    [10.0.0]

    Changed

    • Retry sending messages to extension when METAMASK_EXTENSION_STREAM_CONNECT is received (#223)
    • BREAKING: Update minimum Node.js version to v14 (#225)

    [9.1.0]

    Added

    • Add deprecation warning for encryption methods (#218)
    Commits
    Maintainer changes

    This version was pushed to npm by gudahtt, a new releaser for @​metamask/providers since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump @metamask/providers from 9.0.0 to 10.1.0

    Bump @metamask/providers from 9.0.0 to 10.1.0

    Bumps @metamask/providers from 9.0.0 to 10.1.0.

    Release notes

    Sourced from @​metamask/providers's releases.

    10.1.0

    Changed

    • Update json-rpc-middleware-stream (#228)

    10.0.0

    Changed

    • Retry sending messages to extension when METAMASK_EXTENSION_STREAM_CONNECT is received (#223)
    • BREAKING: Update minimum Node.js version to v14 (#225)

    9.1.0

    Added

    • Add deprecation warning for encryption methods (#218)
    Changelog

    Sourced from @​metamask/providers's changelog.

    [10.1.0]

    Changed

    • Update json-rpc-middleware-stream (#228)

    [10.0.0]

    Changed

    • Retry sending messages to extension when METAMASK_EXTENSION_STREAM_CONNECT is received (#223)
    • BREAKING: Update minimum Node.js version to v14 (#225)

    [9.1.0]

    Added

    • Add deprecation warning for encryption methods (#218)
    Commits
    Maintainer changes

    This version was pushed to npm by gudahtt, a new releaser for @​metamask/providers since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump @metamask/snap-types from 0.22.0 to 0.22.3

    Bump @metamask/snap-types from 0.22.0 to 0.22.3

    Bumps @metamask/snap-types from 0.22.0 to 0.22.3.

    Release notes

    Sourced from @​metamask/snap-types's releases.

    0.22.3

    @​metamask/snaps-cli

    Changed

    • No changes this release.

    @​metamask/snap-controllers

    Changed

    • No changes this release.

    examples

    Added

    • Add transaction insights example snap (#838)

    @​metamask/execution-environments

    Fixed

    • Fix missing properties on WebSocket MessageEvent (#845)

    @​metamask/snaps-browserify-plugin

    Changed

    • No changes this release.

    @​metamask/rollup-plugin-snaps

    Changed

    • No changes this release.

    @​metamask/snaps-webpack-plugin

    Changed

    • No changes this release.

    @​metamask/multichain-provider

    Fixed

    • Stop assuming wrapped responses from MetaMask provider (#854)

    @​metamask/rpc-methods

    Changed

    • No changes this release.

    @​metamask/snap-types

    Changed

    • No changes this release.

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump @metamask/snaps-cli from 0.22.0 to 0.22.3

    Bump @metamask/snaps-cli from 0.22.0 to 0.22.3

    Bumps @metamask/snaps-cli from 0.22.0 to 0.22.3.

    Release notes

    Sourced from @​metamask/snaps-cli's releases.

    0.22.3

    @​metamask/snaps-cli

    Changed

    • No changes this release.

    @​metamask/snap-controllers

    Changed

    • No changes this release.

    examples

    Added

    • Add transaction insights example snap (#838)

    @​metamask/execution-environments

    Fixed

    • Fix missing properties on WebSocket MessageEvent (#845)

    @​metamask/snaps-browserify-plugin

    Changed

    • No changes this release.

    @​metamask/rollup-plugin-snaps

    Changed

    • No changes this release.

    @​metamask/snaps-webpack-plugin

    Changed

    • No changes this release.

    @​metamask/multichain-provider

    Fixed

    • Stop assuming wrapped responses from MetaMask provider (#854)

    @​metamask/rpc-methods

    Changed

    • No changes this release.

    @​metamask/snap-types

    Changed

    • No changes this release.

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump @metamask/snaps-cli from 0.22.0 to 0.27.1

    Bump @metamask/snaps-cli from 0.22.0 to 0.27.1

    Bumps @metamask/snaps-cli from 0.22.0 to 0.27.1.

    Release notes

    Sourced from @​metamask/snaps-cli's releases.

    0.27.1

    examples

    Changed

    • No changes this release.

    @​metamask/multichain-provider

    Changed

    • No changes this release.

    @​metamask/rpc-methods

    Fixed

    • Fix snap_manageState with empty state (#1083)
    • Fix snap_manageState method hooks (#1080)

    @​metamask/snaps-browserify-plugin

    Changed

    • No changes this release.

    @​metamask/snaps-cli

    Changed

    • No changes this release.

    @​metamask/snaps-controllers

    Changed

    • No changes this release.

    @​metamask/snaps-execution-environments

    Changed

    • No changes this release.

    @​metamask/snaps-rollup-plugin

    Changed

    • No changes this release.

    @​metamask/snaps-types

    Changed

    • No changes this release.

    @​metamask/snaps-ui

    Changed

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump @metamask/providers from 9.0.0 to 10.2.1

    Bump @metamask/providers from 9.0.0 to 10.2.1

    Bumps @metamask/providers from 9.0.0 to 10.2.1.

    Release notes

    Sourced from @​metamask/providers's releases.

    10.2.1

    Changed

    • Update json-rpc-middleware-stream (#234)

    10.2.0

    Changed

    • update json-rpc-middleware-stream (#230)

    10.1.0

    Changed

    • Update json-rpc-middleware-stream (#228)

    10.0.0

    Changed

    • Retry sending messages to extension when METAMASK_EXTENSION_STREAM_CONNECT is received (#223)
    • BREAKING: Update minimum Node.js version to v14 (#225)

    9.1.0

    Added

    • Add deprecation warning for encryption methods (#218)
    Changelog

    Sourced from @​metamask/providers's changelog.

    [10.2.1]

    Changed

    • Update json-rpc-middleware-stream (#234)

    [10.2.0]

    Changed

    • Update json-rpc-middleware-stream (#230)

    [10.1.0]

    Changed

    • Update json-rpc-middleware-stream (#228)

    [10.0.0]

    Changed

    • Retry sending messages to extension when METAMASK_EXTENSION_STREAM_CONNECT is received (#223)
    • BREAKING: Update minimum Node.js version to v14 (#225)

    [9.1.0]

    Added

    • Add deprecation warning for encryption methods (#218)
    Commits
    Maintainer changes

    This version was pushed to npm by gudahtt, a new releaser for @​metamask/providers since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump @metamask/auto-changelog from 2.6.1 to 3.1.0

    Bump @metamask/auto-changelog from 2.6.1 to 3.1.0

    Bumps @metamask/auto-changelog from 2.6.1 to 3.1.0.

    Release notes

    Sourced from @​metamask/auto-changelog's releases.

    3.1.0

    Added

    • Allow prerelease versions in release headers (#130)

    3.0.0

    Added

    • Support alternate tag prefixes (#120)

    Changed

    • BREAKING: Update minimum Node.js version to v14 (#117)
    • Get package version from manifest (#121)
    Changelog

    Sourced from @​metamask/auto-changelog's changelog.

    [3.1.0]

    Added

    • Allow prerelease versions in release headers (#130)

    [3.0.0]

    Added

    • Support alternate tag prefixes (#120)

    Changed

    • BREAKING: Update minimum Node.js version to v14 (#117)
    • Get package version from manifest (#121)
    Commits
    Maintainer changes

    This version was pushed to npm by metamaskbot, a new releaser for @​metamask/auto-changelog since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump @metamask/snap-types from 0.22.0 to 0.23.0

    Bump @metamask/snap-types from 0.22.0 to 0.23.0

    Bumps @metamask/snap-types from 0.22.0 to 0.23.0.

    Release notes

    Sourced from @​metamask/snap-types's releases.

    0.23.0

    @​metamask/snaps-cli

    Changed

    • BREAKING: Refactor mm-snap init command (#866)
      • mm-snap init only takes one optional argument now, a directory for the snap to be initialized in.
      • It uses a new snap monorepo template.
    • Replace auto type guard with struct (#911)
    • Replace JSON schema validation with structs (#862)

    @​metamask/snap-controllers

    Added

    Changed

    • BREAKING: Make SnapController.add() private (#883)
    • BREAKING: Stop including snap state in SnapController state (#876)
    • BREAKING: Stop including source code in SnapController state (#861)
    • Improve keyring endowment error messaging (#884)
    • Replace JSON schema validation with structs (#862)

    examples

    Changed

    • No changes this release.

    @​metamask/execution-environments

    Added

    • Add snap cronjobs (#651)

    Changed

    • BREAKING: Replace Buffer with Typed Arrays (#878)
    • Improve execution environment type validation (#844)

    @​metamask/snaps-browserify-plugin

    Changed

    • No changes this release.

    @​metamask/rollup-plugin-snaps

    Changed

    • No changes this release.

    @​metamask/snaps-webpack-plugin

    Fixed

    • Fix Webpack plugin issue with existing files (#858)

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump @metamask/utils from 3.1.0 to 3.3.1

    Bump @metamask/utils from 3.1.0 to 3.3.1

    Bumps @metamask/utils from 3.1.0 to 3.3.1.

    Release notes

    Sourced from @​metamask/utils's releases.

    3.3.1

    Fixed

    • JSON-RPC parameters are now properly cast to Json upon validation (#51)

    3.3.0

    Added

    • Add more assertion utils (#49)
    • Add JSON-RPC error validation functions (#46)
    • Add convenience function for creating a DataView (#45)

    Fixed

    • Update JSON validation logic (#47)
      • Validation would previously allow for undefined values, which is not a standard JSON type

    3.2.0

    Added

    • Add PendingJsonRpcResponse type (#43)
    • Add utils for converting between numbers and hex (#41)
    • Add coercion utils (#38)
    Changelog

    Sourced from @​metamask/utils's changelog.

    [3.3.1]

    Fixed

    • JSON-RPC parameters are now properly cast to Json upon validation (#51)

    [3.3.0]

    Added

    • Add more assertion utils (#49)
    • Add JSON-RPC error validation functions (#46)
    • Add convenience function for creating a DataView (#45)

    Fixed

    • Update JSON validation logic (#47)
      • Validation would previously allow for undefined values, which is not a standard JSON type

    [3.2.0]

    Added

    • Add PendingJsonRpcResponse type (#43)
    • Add utils for converting between numbers and hex (#41)
    • Add coercion utils (#38)
    Commits
    Maintainer changes

    This version was pushed to npm by ritave, a new releaser for @​metamask/utils since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
Owner
Christian Montoya
Senior Product Manager @ MetaMask Snaps
Christian Montoya
A sequence of smart contracts to practice gas optimization. These are used as practice assignments for RareSkills.io and the Udemy Gas Optimization Course

RareSkills Gas Puzzles Puzzles that are ready for you Distribute (hard) Array Sum (easy) Escrow EscrowV2 Mint Presale Require (easy) Staking Contribut

RareSkills 240 Dec 31, 2022
Sachit Yadav 6 Nov 3, 2022
A lightweight (~850 B) library for easy mac/window shortcut notation. kbd-txt convert shortcut text depending on the type of OS (window/linux/mac).

kbd-txt A lightweight (~850 B) library for easy mac/window shortcut notation. kbd-txt convert shortcut text depending on the type of OS (window/linux/

Minung Han 6 Jan 1, 2023
Modren is a modern store for Linux. It includes support for snaps, flatpaks from Flathub, APT packages and DEBs.

v1.0.0 Made with ❤️ for ?? Modren is a modern store for Linux. It includes support for snaps, flatpaks from Flathub, APT packages and DEBs. Download ·

Rudra Saraswat 82 Nov 18, 2022
Click confirmation for the masses <3

jQuery Confirm Action Getting Started <script type="text/javascript" src="./jquery.confirm-action.js"></script> $('.my-button').confirmAction({ ti

SD Elements 6 Sep 25, 2020
A Node.js library to calculate Uniswap V3 ratios (prices) from token pairs.

UniV3Prices A Node.js library to calculate Uniswap V3 ratios (prices) and liquidity (reserves). Features This library will allow you to: Calculate pri

Thanos Polychronakis 121 Dec 29, 2022
The idea is build an app that make me consult uber ride prices through my mi band or a smart watch.

CanIGetHome? - Get uber prices The main idea is the possibility to me to get the estimate uber rides prices through my mi band 6. Get my current local

Emerson 174 Nov 23, 2022
In this project, you will learn how to pull datas from supabase to google sheets in a matter of minute

Supabase-Googlesheet In this repo, you will see how to pull datas from your supabase project using Supabase API to a Google Sheet. No matter how many

Jady Nekena 6 Jul 28, 2022
A continuously updated collection of Tesla superchargers + prices

tesla-superchargers This is a daily updating repo containing a list of all Tesla Superchargers and the current prices for both members (Tesla owners a

Niek van der Maas 15 Dec 21, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Stop re-writing thirdweb snippets. Use thirdsnips to make it all snap!

?? thirdsnips Stop re-writing thirdweb snippets. Use thirdsnips to make it all snap! Thirdsnips is a tool which enhances the developer experience whil

Avneesh Agarwal 24 Dec 14, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
A-Frame components for smooth locomotion and snap turning

A-Frame locomotion A collection of A-Frame components, systems and primitives that enable all sorts of locomotion in VR. It't built to be modular, fle

Noeri Huisman 18 Sep 1, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Quickly integrate face, hand, and/or pose tracking to your frontend projects in a snap ✨👌

⚠️ IMPORTANT UPDATE: July 13th, 2022 Hi, this is Oz Ramos and I wanted to quickly explain what happened to this project and what I plan to do moving f

Oz 43 Jan 3, 2023
BMI Calculator can give us the bmi result of our bmi on the basis of our corresponding height and weight.

BMI means body mass index. Body Mass Index (BMI) is a person's weight in kilograms divided by the square of height in meters.

Bipronath Saha 1 Jan 20, 2022
Voorbeeldimplementatie van software die werkt op basis van NEN 2660-2:2022

demo-beheerpakket-linked-data Voorbeeldimplementatie van software die werkt op basis van NEN 2660-2:2022 IMBOR resources For querying IMBOR we use the

CROW 3 Aug 21, 2022
MERN stack application which serves as an online map journal where users can mark and rate the places they've been to.

PlaceRate PlaceRate is a MERN stack application which serves as an online map journal where users can mark and rate the places they've been to. You ca

Yuvraj Virdi 0 May 17, 2022
Simple format that serves it's one and only purpose and that's creating simple task list everywhere where you can write plain text

SWTF (Simple Worklog Task Format) Simple format that serves it's one and only purpose and that's creating simple task list everywhere where you can wr

null 4 Apr 4, 2022