Skip to content

ENS initializer is inaccessible due to internal protection level #171

@barrasso

Description

@barrasso

I am unable to use ENS.swift due to access control issues.

Sample code to reproduce error:

let web3 = web3(provider: InfuraProvider(Networks.Mainnet)!)
let ens = ENS(web3: web3)!

Error:

'ENS?' initializer is inaccessible due to 'internal' protection level

I attempted to fix this by adding a public access modifier to the ENS init?(web3: web3) method. Then I was able to initialize ENS, but still ran into access control errors.

Sample code to reproduce error:

let web3 = web3(provider: InfuraProvider(Networks.Mainnet)!)
let ens = ENS(web3: web3)
let domain = "somename.eth"
let address = try ens?.registry.getResolver(forDomain: domain).resolverContractAddress

Error:

'registry' is inaccessible due to 'internal' protection level

  • Swift 5
  • Xcode Version 10.2 (10E125)
  • On the 2.2.0 branch
pod 'web3swift', :git => 'https://github.com/matter-labs/web3swift.git', :branch => '2.2.0'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions