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

Reverse ENS resolution support in debugger and decoder #5895

Merged
merged 37 commits into from
May 8, 2023
Merged
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
3ba1ff2
Add interpretations field to codec values
haltman-at Nov 3, 2022
28af916
Add EnsRequest type
haltman-at Nov 3, 2022
a692891
Add ensjs dependency to decoder and debugger
haltman-at Nov 3, 2022
254b2a8
Properly account for interpretations in abification
haltman-at Nov 3, 2022
f7d4208
Add ensName interpretation to relevant types
haltman-at Nov 4, 2022
6aeb84d
Add reverse ENS request handling in decoder
haltman-at Nov 17, 2022
b262851
Have codec make ENS requests when decoding addresses (etc)
haltman-at Nov 18, 2022
d8ff881
Add reverse ENS resolution to debugger web3 submodule
haltman-at Nov 22, 2022
4278804
Add ENS setup in debugger
haltman-at Nov 22, 2022
4dfaa8f
Add handling of ens requests to debugger
haltman-at Nov 22, 2022
5459db2
Hook up ENS reverse resolution in debugger CLI
haltman-at Nov 22, 2022
32e2f25
Account for ensName in inspection
haltman-at Nov 30, 2022
4bd6031
Rename encoder methods for consistency
haltman-at Nov 30, 2022
5bfb89d
Add forward check in decoder
haltman-at Nov 30, 2022
8f4eda0
Add forward check in ens saga in debugger
haltman-at Nov 30, 2022
985835a
Document interpretations field
haltman-at Dec 1, 2022
3b9e7f3
Add noHideAddress option to ResultInspector
haltman-at Dec 2, 2022
466fd63
Fix saga/action mixup
haltman-at Dec 3, 2022
c66d54f
Enable noHideAddress in debugger CLI
haltman-at Dec 3, 2022
5b64f7f
Fix errors in debugger ENS setup
haltman-at Dec 6, 2022
0a19080
Fix incorrect reverse resolution syntax
haltman-at Dec 6, 2022
4f626ee
Fix incorrect conversion
haltman-at Dec 8, 2022
f8f7e33
Remove unnecessary error handling
haltman-at Dec 8, 2022
98a4633
Add test of ENS reverse resolution in decoder
haltman-at Dec 14, 2022
c07a28f
Add test of ENS resolution in debugger
haltman-at Dec 14, 2022
1ad6769
Add ready action to prevent init from returning early
haltman-at Dec 14, 2022
89326f3
Fix incorrect ENSJS syntax
haltman-at Feb 7, 2023
0a9f052
Fix some problems with the tests
haltman-at Feb 10, 2023
3aeac91
Merge branch 'develop' into sne
haltman-at Apr 14, 2023
59690e0
Update link in comment
haltman-at Apr 14, 2023
dfaa8cc
Add comment explaining noHideAddress
haltman-at Apr 14, 2023
c0bc0da
Rename EnsRequest and its discriminator
haltman-at Apr 14, 2023
91a997e
Rename ensRegistryAddress to ens.registryAddress
haltman-at Apr 14, 2023
edebe04
Update test for new interface
haltman-at Apr 14, 2023
6be18a4
Update debugger CLI for new interface
haltman-at Apr 14, 2023
b644172
Merge branch 'develop' into sne
haltman-at Apr 28, 2023
fd97757
Make use of new ensRegistry getter
haltman-at Apr 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix incorrect conversion
  • Loading branch information
haltman-at committed Feb 17, 2023
commit 4f626eec48a8d6ecba5e4fddd41a607c952bb14c
8 changes: 7 additions & 1 deletion packages/debugger/lib/ens/sagas/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,26 @@ import { Conversion } from "@truffle/codec";

//note: name may be null
export function* reverseResolve(address) {
debug("reverse resolving %s", address);
const cache = yield select(ens.current.cache);
if (address in cache) {
debug("got cached %o", cache[address]);
return cache[address];
} else {
let name = yield* web3.reverseEnsResolve(address); //may be null
debug("got name %o", name);
//now: do a forward resolve as a check
if (name !== null) {
debug("forward resolving %s", name);
const checkAddress = yield* resolve(name);
debug("got check address %o", checkAddress);
if (checkAddress !== address) {
//if forward resolution doesn't match, this name is no good!
name = null;
}
}
yield put(actions.record(address, name));
debug("returning %o", name);
return name;
}
}
Expand All @@ -43,7 +49,7 @@ export function* reverseResolveAsBytes(address) {
return null;
}
try {
return Conversion.stringToBytes(address);
return Conversion.stringToBytes(name);
} catch {
return null;
}
Expand Down