Skip to content

maddevsio/iOS-ETH-web3-boiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Web3Boiler iOS

Developed by Mad Devs License

Description

This project is an example of set frameworks implementations that may help you to interact with the Ethereum blockchain.

Requirements

  • iOS 14.0+
  • Xcode 13.0+

Getting started

  • Install Needle DI brew install needle source brew

Project structure

  • Package Manager is also Apple native SPM
  • Dependency Manager is Needle ~> 0.18.1, which made and used by Uber. It's better that Swinject because gives dependency missing errors on compile time and decreases our app speed by not overloading runtime.
  • Schemes handled by config files under /SupportingFiles/Configurations/ for Dev flavors

Dependencies

In app utils

  • Configs - Info.plist keys wrapper, Environment variables storage.
  • MainRouter - Route through main root screens.
  • SecureStorage - Wrapper for KeychainSwift. Store sensitive user information.
  • UserDefaultsStorage - Store local app state temporary data.
  • WindowProtocol - Wrapper for UIWindow. Handles switch current screen or display something over all app.

Services & accounts

Environmvet variables into the xcconfig file

  • WC_PROJECT_ID - WalletConnect project ID
  • WEB3_AUTH_ID - Web3Auth project ID
  • ALCHEMY_KEY - Alchemy key
  • PROJ_URL - Project URL for description

Features:

  • WalletConnect V1 pairing with Metamask
  • Web3Auth accounting with gmail
  • Get gasPrice
  • Get account balance
  • Make Transfer with Goerli ETH token
  • Make Transfer with Goerli USDC via smart contract
  • Make Approve with Goerli USDC via smart contract
  • Make Allowance with Goerli USDC via smart contract
  • Make Transfer from with Goerli USDC via smart contract

More info about types of transaction

  • 0.01 goerli eth = 10000000000000000 (wei)
  • 1 USDC = 1000000 (Mwei)

Check transactions:

  • Goerli Etherscan, set account address or hash of transaction
  • Into the alchemy profile.

Networks

  • Goerli
  • Ethereum
  • Polygon
  • Sepolia

Build project recomendations

  • DebuggingInteractor fill addresses
  • Setup personal developer account into the Signing & Capabilities
  • Install Metamask on your device and Sign in
  • Run project on personal device
  • If you want to use not a Goerli network, you should update the USDC contract address into the Constants

About

iOS boilerplate with Ethereum blockchain interaction

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages