@@ -63,19 +63,15 @@ protocol IERC1400: IERC20 {
6363// variables are lazyly evaluated or global token information (name, ticker, total supply)
6464// can be imperatively read and saved
6565// FIXME: Rewrite this to CodableTransaction
66- public class ERC1400 : IERC1400 , ERCBaseProperties {
67- public var basePropertiesProvder : ERCBasePropertiesProvider
66+ public class ERC1400 : IERC1400 , ERC20BaseProperties {
67+ public private ( set ) var basePropertiesProvider : ERC20BasePropertiesProvider
6868 public var transaction : CodableTransaction
6969 public var web3 : Web3
7070 public var provider : Web3Provider
7171 public var address : EthereumAddress
7272 public var abi : String
7373
74- public lazy var contract : Web3 . Contract = {
75- let contract = self . web3. contract ( self . abi, at: self . address, abiVersion: 2 )
76- precondition ( contract != nil )
77- return contract!
78- } ( )
74+ public let contract : Web3 . Contract
7975
8076 public init ( web3: Web3 , provider: Web3Provider , address: EthereumAddress , abi: String = Web3 . Utils. erc1400ABI, transaction: CodableTransaction = . emptyTransaction) {
8177 self . web3 = web3
@@ -85,8 +81,8 @@ public class ERC1400: IERC1400, ERCBaseProperties {
8581 self . transaction. to = address
8682 self . abi = abi
8783 // Forced because this should fail if contract is wrongly configured
88- let contract = web3. contract ( Web3 . Utils . erc20ABI , at: address) !
89- self . basePropertiesProvder = ERCBasePropertiesProvider ( contract: contract)
84+ contract = web3. contract ( abi , at: address) !
85+ basePropertiesProvider = ERC20BasePropertiesProvider ( contract: contract)
9086 }
9187
9288 public func getBalance( account: EthereumAddress ) async throws -> BigUInt {
0 commit comments