Git Product home page Git Product logo

Comments (3)

dcroote avatar dcroote commented on July 22, 2024

Here as well?

const beaconsToSign = beacons.filter((beacon) => beacon.airnodeAddress === airnodeAddress);

Though I'm actually having a hard time understanding how both addresses can be anything but Checksum addresses in the code you linked to:

const airnodeWallet = getAirnodeWalletFromPrivateKey();
const airnodeAddress = airnodeWallet.address;
if (!beaconsWithIds.some((beacon) => beacon.airnodeAddress === airnodeAddress)) {

Here, airnodeAddress is the Checksum address since that is what ethers within getAirnodeWalletFromPrivateKey() returns. As for beacon.airnodeAddress, it seems this too has to be the Checksum address, since otherwise ethers verifyMessage would fail because the signature, generated with ethers signMessage (right?), returns the Checksum address.

const addressFromSignature = ethers.utils.verifyMessage(message, signature!);
// Signature doesn't match
if (airnodeAddress !== addressFromSignature) {
throw new Error('Invalid beacon signature');
}

from airnode.

Siegrift avatar Siegrift commented on July 22, 2024

I actually wasn't sure just by looking at the code, so I assumed this is possible. If you've verified this is not an issue we can close this one.

from airnode.

Siegrift avatar Siegrift commented on July 22, 2024

I believe this works as expected.

from airnode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.