Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multicall CCIP-read gateway #22

Closed
wants to merge 35 commits into from
Closed

Multicall CCIP-read gateway #22

wants to merge 35 commits into from

Conversation

makoto
Copy link
Member

@makoto makoto commented Aug 1, 2022

Resolve #17

@makoto makoto marked this pull request as draft August 1, 2022 21:44
@makoto makoto requested a review from Arachnid August 15, 2022 19:59
@@ -0,0 +1,127 @@
import { formatsByCoinType } from '@ensdomains/address-encoder';
Copy link
Member

Choose a reason for hiding this comment

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

Can't all of this be replaced by a simple call to Ethers to resolve the name now?

yarn start --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 --data test.eth.json
```

`private-key` should be an Ethereum private key that will be used to sign messages. You should configure your resolver contract to expect messages to be signed using the corresponding address.
Copy link
Member

Choose a reason for hiding this comment

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

Why is the batch gateway signing messages?

Comment on lines +2 to +3
import { Command } from 'commander';
const program = new Command();
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
import { Command } from 'commander';
const program = new Command();
import { Command } from 'commander';
const program = new Command();

@@ -0,0 +1,76 @@
import { Database } from './server';
Copy link
Member

Choose a reason for hiding this comment

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

This file should be unnecessary for the batch gateway.

@@ -0,0 +1,25 @@
{
Copy link
Member

Choose a reason for hiding this comment

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

This file should be unnecessary for the batch gateway.

const callData = d.callData;
const gatewayUrl = url
.replace('{sender}', sender)
.replace('{data}', callData);
Copy link
Member

Choose a reason for hiding this comment

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

If {data} isn't present, this should send a POST request, per EIP 3668.

@@ -0,0 +1,18 @@
{
Copy link
Member

Choose a reason for hiding this comment

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

This shouldn't be necessary for the batch gateway.

@@ -0,0 +1 @@
export const ETH_COIN_TYPE = 60;
Copy link
Member

Choose a reason for hiding this comment

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

This shouldn't be necessary for the batch gateway.

}
}

const TEST_DB = {
Copy link
Member

Choose a reason for hiding this comment

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

None of this should be needed.

);
}

describe('End to end test', () => {
Copy link
Member

Choose a reason for hiding this comment

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

This looks like it's testing the resolver gateway?

@makoto
Copy link
Member Author

makoto commented Aug 29, 2022

Deprecated. The new PR is ensdomains/batch-gateway#1

@makoto makoto closed this Aug 29, 2022
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.

Write multicall CCIP-read gateway
2 participants