Skip to content

Commit

Permalink
name changed to CallByNameProxy
Browse files Browse the repository at this point in the history
  • Loading branch information
TateB committed Oct 26, 2023
1 parent b59ff2b commit 740dc6c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {BytesUtils} from "../wrapper/BytesUtils.sol";

error AddressNotFound();

contract ContractResolverProxy is ERC165 {
contract CallByNameProxy is ERC165 {
using BytesUtils for bytes;

UniversalResolverNoMulticall public immutable ur;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,18 @@ const hexEncodeName = (name: string) =>

const labelhash = (label: string) => solidityKeccak256(['string'], [label])

contract('ContractResolverProxy', (accounts) => {
contract('CallByNameProxy', (accounts) => {
let ensRegistry: Contract
let universalResolver: Contract
let contractResolverProxy: Contract
let callByNameProxy: Contract
let ownedResolver: Contract

beforeEach(async () => {
const ENSRegistry = await ethers.getContractFactory('ENSRegistry')
const UniversalResolver = await ethers.getContractFactory(
'UniversalResolverNoMulticall',
)
const ContractResolverProxy = await ethers.getContractFactory(
'ContractResolverProxy',
)
const CallByNameProxy = await ethers.getContractFactory('CallByNameProxy')
const OwnedResolver = await ethers.getContractFactory('OwnedResolver')

ensRegistry = await ENSRegistry.deploy()
Expand All @@ -33,10 +31,8 @@ contract('ContractResolverProxy', (accounts) => {
universalResolver = await UniversalResolver.deploy(ensRegistry.address)
await universalResolver.deployed()

contractResolverProxy = await ContractResolverProxy.deploy(
universalResolver.address,
)
await contractResolverProxy.deployed()
callByNameProxy = await CallByNameProxy.deploy(universalResolver.address)
await callByNameProxy.deployed()

ownedResolver = await OwnedResolver.deploy()
await ownedResolver.deployed()
Expand Down Expand Up @@ -79,7 +75,7 @@ contract('ContractResolverProxy', (accounts) => {
const data = ensRegistry.interface.encodeFunctionData('owner', [
namehash('registry.ens.eth'),
])
const result = await contractResolverProxy.resolve(
const result = await callByNameProxy.resolve(
hexEncodeName('registry.ens.eth'),
data,
)
Expand Down

0 comments on commit 740dc6c

Please sign in to comment.