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

ENS initializer is inaccessible due to internal protection level #171

Closed
barrasso opened this issue Apr 26, 2019 · 4 comments
Closed

ENS initializer is inaccessible due to internal protection level #171

barrasso opened this issue Apr 26, 2019 · 4 comments

Comments

@barrasso
Copy link
Contributor

barrasso commented Apr 26, 2019

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'
@BaldyAsh
Copy link
Collaborator

@barrasso hi. Please, use master branch. Think I've fixed it

@barrasso
Copy link
Contributor Author

@BaldyAsh Just switched back to master 2.1.6

I'm getting an unresolved error: Use of unresolved identifier 'ENS';

I see the code is added to the repo on Github, but the ENS.swift files aren't included in my Pod project within Xcode.

@BaldyAsh
Copy link
Collaborator

@barrasso yes, strange problem. Folder exists and I added its paths to podspec, but it's missing in pod. I will publish new version with utils files in different folder tomorrow

@barrasso
Copy link
Contributor Author

barrasso commented Apr 30, 2019

Works with new update :) #179

Using:

pod 'web3.swift.pod', '~> 2.2.0'

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

No branches or pull requests

2 participants