mirror of
https://github.com/luxfi/safe-ios.git
synced 2026-10-30 15:19:20 +00:00
- New way to use rpc methods for easier batching and completion blocks - Using classes instead of structs in places where reuse of member variables is needed - New API would work with the domain types and not with JSON types, thus making program complexity lower.
18 lines
442 B
Swift
18 lines
442 B
Swift
//
|
|
// Created by Dmitry Bespalov on 06.02.22.
|
|
//
|
|
|
|
import Foundation
|
|
import Solidity
|
|
|
|
extension Sol.Address: NodeDataCodable {
|
|
public init(decoding data: Data) throws {
|
|
try self.init(data: data)
|
|
}
|
|
|
|
public func encodeNodeData() throws -> Data {
|
|
// we need to return 20-byte value. Address is ABI-encoded as UInt160, so we need to get the suffix.
|
|
let result = encode().suffix(20)
|
|
return result
|
|
}
|
|
} |