mirror of
https://github.com/luxfi/safe-ios.git
synced 2026-10-30 15:19:20 +00:00
23 lines
451 B
Swift
23 lines
451 B
Swift
//
|
|
// Copyright © 2018 Gnosis Ltd. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
// see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
|
|
class ERC20Metadata: Contract {
|
|
|
|
func name() throws -> String? {
|
|
try decodeString(invoke("name()"))
|
|
}
|
|
|
|
func symbol() throws -> String? {
|
|
try decodeString(invoke("symbol()"))
|
|
}
|
|
|
|
func decimals() throws -> UInt256 {
|
|
try decodeUInt(invoke("decimals()"))
|
|
}
|
|
|
|
}
|