From 82d383eaaff76a28831343a6d356529a300a91d3 Mon Sep 17 00:00:00 2001 From: DavidYu <654070281@qq.com> Date: Tue, 21 Feb 2023 10:31:11 +0800 Subject: [PATCH 1/2] update protobuf --- .../ABSDKWalletKit/protobuf/rpc.pb.swift | 528 ++++++++--- .../ABSDKWalletKit/protobuf/rpc.proto | 4 + .../ABSDKWalletKit/protobuf/service.graphqls | 13 +- .../ABSDKWalletKit/protobuf/state.pb.swift | 258 +++-- .../ABSDKWalletKit/protobuf/state.proto | 10 +- .../protobuf/trace-type.pb.swift | 166 +++- .../ABSDKWalletKit/protobuf/trace-type.proto | 8 + .../ABSDKWalletKit/protobuf/tx.pb.swift | 886 +++++++++++++----- .../ABSDKWalletKit/protobuf/tx.proto | 32 +- .../ABSDKWalletKit/protobuf/type.pb.swift | 164 +++- .../ABSDKWalletKit/protobuf/vendor.pb.swift | 80 +- 11 files changed, 1543 insertions(+), 606 deletions(-) diff --git a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/rpc.pb.swift b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/rpc.pb.swift index d2c63575..ab9499d1 100644 --- a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/rpc.pb.swift +++ b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/rpc.pb.swift @@ -704,11 +704,21 @@ public struct Ocap_RequestListTopAccounts { public var tokenAddress: String = String() + public var timeFilter: Ocap_TimeFilter { + get {return _timeFilter ?? Ocap_TimeFilter()} + set {_timeFilter = newValue} + } + /// Returns true if `timeFilter` has been explicitly set. + public var hasTimeFilter: Bool {return self._timeFilter != nil} + /// Clears the value of `timeFilter`. Subsequent reads from it will return its default value. + public mutating func clearTimeFilter() {self._timeFilter = nil} + public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} fileprivate var _paging: Ocap_Page? = nil + fileprivate var _timeFilter: Ocap_TimeFilter? = nil } public struct Ocap_ResponseListTopAccounts { @@ -912,11 +922,21 @@ public struct Ocap_RequestListTokens { public var issuerAddress: String = String() + public var timeFilter: Ocap_TimeFilter { + get {return _timeFilter ?? Ocap_TimeFilter()} + set {_timeFilter = newValue} + } + /// Returns true if `timeFilter` has been explicitly set. + public var hasTimeFilter: Bool {return self._timeFilter != nil} + /// Clears the value of `timeFilter`. Subsequent reads from it will return its default value. + public mutating func clearTimeFilter() {self._timeFilter = nil} + public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} fileprivate var _paging: Ocap_Page? = nil + fileprivate var _timeFilter: Ocap_TimeFilter? = nil } public struct Ocap_ResponseListTokens { @@ -986,11 +1006,21 @@ public struct Ocap_RequestListFactories { public var addressList: [String] = [] + public var timeFilter: Ocap_TimeFilter { + get {return _timeFilter ?? Ocap_TimeFilter()} + set {_timeFilter = newValue} + } + /// Returns true if `timeFilter` has been explicitly set. + public var hasTimeFilter: Bool {return self._timeFilter != nil} + /// Clears the value of `timeFilter`. Subsequent reads from it will return its default value. + public mutating func clearTimeFilter() {self._timeFilter = nil} + public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} fileprivate var _paging: Ocap_Page? = nil + fileprivate var _timeFilter: Ocap_TimeFilter? = nil } public struct Ocap_ResponseListFactories { @@ -1191,11 +1221,21 @@ public struct Ocap_RequestListRollups { /// same as erc20_token_address public var foreignTokenAddress: String = String() + public var timeFilter: Ocap_TimeFilter { + get {return _timeFilter ?? Ocap_TimeFilter()} + set {_timeFilter = newValue} + } + /// Returns true if `timeFilter` has been explicitly set. + public var hasTimeFilter: Bool {return self._timeFilter != nil} + /// Clears the value of `timeFilter`. Subsequent reads from it will return its default value. + public mutating func clearTimeFilter() {self._timeFilter = nil} + public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} fileprivate var _paging: Ocap_Page? = nil + fileprivate var _timeFilter: Ocap_TimeFilter? = nil } public struct Ocap_ResponseListRollups { @@ -1646,12 +1686,16 @@ extension Ocap_RequestSendTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImple } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.tx.isEmpty { try visitor.visitSingularStringField(value: self.tx, fieldNumber: 1) } - if let v = self._wallet { + try { if let v = self._wallet { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() if !self.token.isEmpty { try visitor.visitSingularStringField(value: self.token, fieldNumber: 3) } @@ -1762,12 +1806,16 @@ extension Ocap_ResponseGetTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImple } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.code != .ok { try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) } - if let v = self._info { + try { if let v = self._info { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -1832,12 +1880,16 @@ extension Ocap_ResponseGetBlock: SwiftProtobuf.Message, SwiftProtobuf._MessageIm } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.code != .ok { try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) } - if let v = self._block { + try { if let v = self._block { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -1872,12 +1924,16 @@ extension Ocap_RequestGetBlocks: SwiftProtobuf.Message, SwiftProtobuf._MessageIm } public func traverse(visitor: inout V) throws { - if let v = self._paging { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._paging { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } - if let v = self._heightFilter { + } }() + try { if let v = self._heightFilter { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() if self.emptyExcluded != false { try visitor.visitSingularBoolField(value: self.emptyExcluded, fieldNumber: 3) } @@ -1916,12 +1972,16 @@ extension Ocap_ResponseGetBlocks: SwiftProtobuf.Message, SwiftProtobuf._MessageI } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.code != .ok { try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) } - if let v = self._page { + try { if let v = self._page { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() if !self.blocks.isEmpty { try visitor.visitRepeatedMessageField(value: self.blocks, fieldNumber: 3) } @@ -1958,12 +2018,16 @@ extension Ocap_ResponseGetAccountState: SwiftProtobuf.Message, SwiftProtobuf._Me } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.code != .ok { try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) } - if let v = self._state { + try { if let v = self._state { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -1996,12 +2060,16 @@ extension Ocap_ResponseGetAssetState: SwiftProtobuf.Message, SwiftProtobuf._Mess } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.code != .ok { try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) } - if let v = self._state { + try { if let v = self._state { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -2034,12 +2102,16 @@ extension Ocap_ResponseGetForgeState: SwiftProtobuf.Message, SwiftProtobuf._Mess } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.code != .ok { try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) } - if let v = self._state { + try { if let v = self._state { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -2072,12 +2144,16 @@ extension Ocap_ResponseGetDelegateState: SwiftProtobuf.Message, SwiftProtobuf._M } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.code != .ok { try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) } - if let v = self._state { + try { if let v = self._state { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -2135,12 +2211,16 @@ extension Ocap_ResponseGetChainInfo: SwiftProtobuf.Message, SwiftProtobuf._Messa public func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if _storage._code != .ok { try visitor.visitSingularEnumField(value: _storage._code, fieldNumber: 1) } - if let v = _storage._info { + try { if let v = _storage._info { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() } try unknownFields.traverse(visitor: &visitor) } @@ -2182,12 +2262,16 @@ extension Ocap_ResponseGetNodeInfo: SwiftProtobuf.Message, SwiftProtobuf._Messag } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.code != .ok { try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) } - if let v = self._info { + try { if let v = self._info { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -2222,15 +2306,19 @@ extension Ocap_ResponseGetUnconfirmedTxs: SwiftProtobuf.Message, SwiftProtobuf._ } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.code != .ok { try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) } - if let v = self._page { + try { if let v = self._page { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } - if let v = self._unconfirmedTxs { + } }() + try { if let v = self._unconfirmedTxs { try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -2264,12 +2352,16 @@ extension Ocap_ResponseGetNetInfo: SwiftProtobuf.Message, SwiftProtobuf._Message } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.code != .ok { try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) } - if let v = self._netInfo { + try { if let v = self._netInfo { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -2302,12 +2394,16 @@ extension Ocap_ResponseGetValidatorsInfo: SwiftProtobuf.Message, SwiftProtobuf._ } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.code != .ok { try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) } - if let v = self._validatorsInfo { + try { if let v = self._validatorsInfo { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -2475,42 +2571,46 @@ extension Ocap_RequestListTransactions: SwiftProtobuf.Message, SwiftProtobuf._Me public func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - if let v = _storage._paging { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = _storage._paging { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } - if let v = _storage._timeFilter { + } }() + try { if let v = _storage._timeFilter { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } - if let v = _storage._addressFilter { + } }() + try { if let v = _storage._addressFilter { try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } - if let v = _storage._typeFilter { + } }() + try { if let v = _storage._typeFilter { try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - } - if let v = _storage._validityFilter { + } }() + try { if let v = _storage._validityFilter { try visitor.visitSingularMessageField(value: v, fieldNumber: 5) - } - if let v = _storage._factoryFilter { + } }() + try { if let v = _storage._factoryFilter { try visitor.visitSingularMessageField(value: v, fieldNumber: 6) - } - if let v = _storage._tokenFilter { + } }() + try { if let v = _storage._tokenFilter { try visitor.visitSingularMessageField(value: v, fieldNumber: 7) - } - if let v = _storage._assetFilter { + } }() + try { if let v = _storage._assetFilter { try visitor.visitSingularMessageField(value: v, fieldNumber: 8) - } - if let v = _storage._accountFilter { + } }() + try { if let v = _storage._accountFilter { try visitor.visitSingularMessageField(value: v, fieldNumber: 9) - } - if let v = _storage._txFilter { + } }() + try { if let v = _storage._txFilter { try visitor.visitSingularMessageField(value: v, fieldNumber: 10) - } - if let v = _storage._rollupFilter { + } }() + try { if let v = _storage._rollupFilter { try visitor.visitSingularMessageField(value: v, fieldNumber: 11) - } - if let v = _storage._stakeFilter { + } }() + try { if let v = _storage._stakeFilter { try visitor.visitSingularMessageField(value: v, fieldNumber: 12) - } + } }() } try unknownFields.traverse(visitor: &visitor) } @@ -2564,12 +2664,16 @@ extension Ocap_ResponseListTransactions: SwiftProtobuf.Message, SwiftProtobuf._M } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.code != .ok { try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) } - if let v = self._page { + try { if let v = self._page { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() if !self.transactions.isEmpty { try visitor.visitRepeatedMessageField(value: self.transactions, fieldNumber: 3) } @@ -2610,18 +2714,22 @@ extension Ocap_RequestListAssets: SwiftProtobuf.Message, SwiftProtobuf._MessageI } public func traverse(visitor: inout V) throws { - if let v = self._paging { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._paging { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } + } }() if !self.ownerAddress.isEmpty { try visitor.visitSingularStringField(value: self.ownerAddress, fieldNumber: 2) } if !self.factoryAddress.isEmpty { try visitor.visitSingularStringField(value: self.factoryAddress, fieldNumber: 3) } - if let v = self._timeFilter { + try { if let v = self._timeFilter { try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -2658,12 +2766,16 @@ extension Ocap_ResponseListAssets: SwiftProtobuf.Message, SwiftProtobuf._Message } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.code != .ok { try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) } - if let v = self._page { + try { if let v = self._page { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() if !self.assets.isEmpty { try visitor.visitRepeatedMessageField(value: self.assets, fieldNumber: 3) } @@ -2684,6 +2796,7 @@ extension Ocap_RequestListTopAccounts: SwiftProtobuf.Message, SwiftProtobuf._Mes public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "paging"), 2: .same(proto: "tokenAddress"), + 3: .standard(proto: "time_filter"), ] public mutating func decodeMessage(decoder: inout D) throws { @@ -2694,24 +2807,33 @@ extension Ocap_RequestListTopAccounts: SwiftProtobuf.Message, SwiftProtobuf._Mes switch fieldNumber { case 1: try { try decoder.decodeSingularMessageField(value: &self._paging) }() case 2: try { try decoder.decodeSingularStringField(value: &self.tokenAddress) }() + case 3: try { try decoder.decodeSingularMessageField(value: &self._timeFilter) }() default: break } } } public func traverse(visitor: inout V) throws { - if let v = self._paging { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._paging { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } + } }() if !self.tokenAddress.isEmpty { try visitor.visitSingularStringField(value: self.tokenAddress, fieldNumber: 2) } + try { if let v = self._timeFilter { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } }() try unknownFields.traverse(visitor: &visitor) } public static func ==(lhs: Ocap_RequestListTopAccounts, rhs: Ocap_RequestListTopAccounts) -> Bool { if lhs._paging != rhs._paging {return false} if lhs.tokenAddress != rhs.tokenAddress {return false} + if lhs._timeFilter != rhs._timeFilter {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } @@ -2740,12 +2862,16 @@ extension Ocap_ResponseListTopAccounts: SwiftProtobuf.Message, SwiftProtobuf._Me } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.code != .ok { try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) } - if let v = self._page { + try { if let v = self._page { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() if !self.accounts.isEmpty { try visitor.visitRepeatedMessageField(value: self.accounts, fieldNumber: 3) } @@ -2782,9 +2908,13 @@ extension Ocap_RequestListAssetTransactions: SwiftProtobuf.Message, SwiftProtobu } public func traverse(visitor: inout V) throws { - if let v = self._paging { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._paging { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } + } }() if !self.address.isEmpty { try visitor.visitSingularStringField(value: self.address, fieldNumber: 2) } @@ -2822,12 +2952,16 @@ extension Ocap_ResponseListAssetTransactions: SwiftProtobuf.Message, SwiftProtob } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.code != .ok { try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) } - if let v = self._page { + try { if let v = self._page { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() if !self.transactions.isEmpty { try visitor.visitRepeatedMessageField(value: self.transactions, fieldNumber: 3) } @@ -2872,24 +3006,28 @@ extension Ocap_RequestListBlocks: SwiftProtobuf.Message, SwiftProtobuf._MessageI } public func traverse(visitor: inout V) throws { - if let v = self._paging { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._paging { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } + } }() if !self.proposer.isEmpty { try visitor.visitSingularStringField(value: self.proposer, fieldNumber: 2) } - if let v = self._timeFilter { + try { if let v = self._timeFilter { try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } - if let v = self._heightFilter { + } }() + try { if let v = self._heightFilter { try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - } - if let v = self._numTxsFilter { + } }() + try { if let v = self._numTxsFilter { try visitor.visitSingularMessageField(value: v, fieldNumber: 5) - } - if let v = self._numInvalidTxsFilter { + } }() + try { if let v = self._numInvalidTxsFilter { try visitor.visitSingularMessageField(value: v, fieldNumber: 6) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -2928,12 +3066,16 @@ extension Ocap_ResponseListBlocks: SwiftProtobuf.Message, SwiftProtobuf._Message } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.code != .ok { try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) } - if let v = self._page { + try { if let v = self._page { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() if !self.blocks.isEmpty { try visitor.visitRepeatedMessageField(value: self.blocks, fieldNumber: 3) } @@ -2970,12 +3112,16 @@ extension Ocap_ResponseGetTokenState: SwiftProtobuf.Message, SwiftProtobuf._Mess } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.code != .ok { try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) } - if let v = self._state { + try { if let v = self._state { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -2992,6 +3138,7 @@ extension Ocap_RequestListTokens: SwiftProtobuf.Message, SwiftProtobuf._MessageI public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "paging"), 2: .standard(proto: "issuer_address"), + 3: .standard(proto: "time_filter"), ] public mutating func decodeMessage(decoder: inout D) throws { @@ -3002,24 +3149,33 @@ extension Ocap_RequestListTokens: SwiftProtobuf.Message, SwiftProtobuf._MessageI switch fieldNumber { case 1: try { try decoder.decodeSingularMessageField(value: &self._paging) }() case 2: try { try decoder.decodeSingularStringField(value: &self.issuerAddress) }() + case 3: try { try decoder.decodeSingularMessageField(value: &self._timeFilter) }() default: break } } } public func traverse(visitor: inout V) throws { - if let v = self._paging { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._paging { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } + } }() if !self.issuerAddress.isEmpty { try visitor.visitSingularStringField(value: self.issuerAddress, fieldNumber: 2) } + try { if let v = self._timeFilter { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } }() try unknownFields.traverse(visitor: &visitor) } public static func ==(lhs: Ocap_RequestListTokens, rhs: Ocap_RequestListTokens) -> Bool { if lhs._paging != rhs._paging {return false} if lhs.issuerAddress != rhs.issuerAddress {return false} + if lhs._timeFilter != rhs._timeFilter {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } @@ -3048,12 +3204,16 @@ extension Ocap_ResponseListTokens: SwiftProtobuf.Message, SwiftProtobuf._Message } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.code != .ok { try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) } - if let v = self._page { + try { if let v = self._page { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() if !self.tokens.isEmpty { try visitor.visitRepeatedMessageField(value: self.tokens, fieldNumber: 3) } @@ -3090,12 +3250,16 @@ extension Ocap_ResponseGetFactoryState: SwiftProtobuf.Message, SwiftProtobuf._Me } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.code != .ok { try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) } - if let v = self._state { + try { if let v = self._state { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -3113,6 +3277,7 @@ extension Ocap_RequestListFactories: SwiftProtobuf.Message, SwiftProtobuf._Messa 1: .same(proto: "paging"), 2: .standard(proto: "owner_address"), 3: .standard(proto: "address_list"), + 4: .standard(proto: "time_filter"), ] public mutating func decodeMessage(decoder: inout D) throws { @@ -3124,21 +3289,29 @@ extension Ocap_RequestListFactories: SwiftProtobuf.Message, SwiftProtobuf._Messa case 1: try { try decoder.decodeSingularMessageField(value: &self._paging) }() case 2: try { try decoder.decodeSingularStringField(value: &self.ownerAddress) }() case 3: try { try decoder.decodeRepeatedStringField(value: &self.addressList) }() + case 4: try { try decoder.decodeSingularMessageField(value: &self._timeFilter) }() default: break } } } public func traverse(visitor: inout V) throws { - if let v = self._paging { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._paging { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } + } }() if !self.ownerAddress.isEmpty { try visitor.visitSingularStringField(value: self.ownerAddress, fieldNumber: 2) } if !self.addressList.isEmpty { try visitor.visitRepeatedStringField(value: self.addressList, fieldNumber: 3) } + try { if let v = self._timeFilter { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } }() try unknownFields.traverse(visitor: &visitor) } @@ -3146,6 +3319,7 @@ extension Ocap_RequestListFactories: SwiftProtobuf.Message, SwiftProtobuf._Messa if lhs._paging != rhs._paging {return false} if lhs.ownerAddress != rhs.ownerAddress {return false} if lhs.addressList != rhs.addressList {return false} + if lhs._timeFilter != rhs._timeFilter {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } @@ -3174,12 +3348,16 @@ extension Ocap_ResponseListFactories: SwiftProtobuf.Message, SwiftProtobuf._Mess } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.code != .ok { try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) } - if let v = self._page { + try { if let v = self._page { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() if !self.factories.isEmpty { try visitor.visitRepeatedMessageField(value: self.factories, fieldNumber: 3) } @@ -3292,12 +3470,16 @@ extension Ocap_ResponseGetStakeState: SwiftProtobuf.Message, SwiftProtobuf._Mess } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.code != .ok { try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) } - if let v = self._state { + try { if let v = self._state { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -3334,18 +3516,22 @@ extension Ocap_RequestListStakes: SwiftProtobuf.Message, SwiftProtobuf._MessageI } public func traverse(visitor: inout V) throws { - if let v = self._paging { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._paging { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } - if let v = self._addressFilter { + } }() + try { if let v = self._addressFilter { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } - if let v = self._timeFilter { + } }() + try { if let v = self._timeFilter { try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } - if let v = self._assetFilter { + } }() + try { if let v = self._assetFilter { try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -3382,12 +3568,16 @@ extension Ocap_ResponseListStakes: SwiftProtobuf.Message, SwiftProtobuf._Message } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.code != .ok { try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) } - if let v = self._page { + try { if let v = self._page { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() if !self.stakes.isEmpty { try visitor.visitRepeatedMessageField(value: self.stakes, fieldNumber: 3) } @@ -3424,12 +3614,16 @@ extension Ocap_ResponseGetRollupState: SwiftProtobuf.Message, SwiftProtobuf._Mes } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.code != .ok { try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) } - if let v = self._state { + try { if let v = self._state { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -3447,6 +3641,7 @@ extension Ocap_RequestListRollups: SwiftProtobuf.Message, SwiftProtobuf._Message 1: .same(proto: "paging"), 2: .standard(proto: "token_address"), 3: .standard(proto: "foreign_token_address"), + 4: .standard(proto: "time_filter"), ] public mutating func decodeMessage(decoder: inout D) throws { @@ -3458,21 +3653,29 @@ extension Ocap_RequestListRollups: SwiftProtobuf.Message, SwiftProtobuf._Message case 1: try { try decoder.decodeSingularMessageField(value: &self._paging) }() case 2: try { try decoder.decodeSingularStringField(value: &self.tokenAddress) }() case 3: try { try decoder.decodeSingularStringField(value: &self.foreignTokenAddress) }() + case 4: try { try decoder.decodeSingularMessageField(value: &self._timeFilter) }() default: break } } } public func traverse(visitor: inout V) throws { - if let v = self._paging { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._paging { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } + } }() if !self.tokenAddress.isEmpty { try visitor.visitSingularStringField(value: self.tokenAddress, fieldNumber: 2) } if !self.foreignTokenAddress.isEmpty { try visitor.visitSingularStringField(value: self.foreignTokenAddress, fieldNumber: 3) } + try { if let v = self._timeFilter { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } }() try unknownFields.traverse(visitor: &visitor) } @@ -3480,6 +3683,7 @@ extension Ocap_RequestListRollups: SwiftProtobuf.Message, SwiftProtobuf._Message if lhs._paging != rhs._paging {return false} if lhs.tokenAddress != rhs.tokenAddress {return false} if lhs.foreignTokenAddress != rhs.foreignTokenAddress {return false} + if lhs._timeFilter != rhs._timeFilter {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } @@ -3508,12 +3712,16 @@ extension Ocap_ResponseListRollups: SwiftProtobuf.Message, SwiftProtobuf._Messag } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.code != .ok { try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) } - if let v = self._page { + try { if let v = self._page { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() if !self.rollups.isEmpty { try visitor.visitRepeatedMessageField(value: self.rollups, fieldNumber: 3) } @@ -3594,12 +3802,16 @@ extension Ocap_ResponseGetRollupBlock: SwiftProtobuf.Message, SwiftProtobuf._Mes } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.code != .ok { try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) } - if let v = self._block { + try { if let v = self._block { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -3642,9 +3854,13 @@ extension Ocap_RequestListRollupBlocks: SwiftProtobuf.Message, SwiftProtobuf._Me } public func traverse(visitor: inout V) throws { - if let v = self._paging { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._paging { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } + } }() if !self.rollupAddress.isEmpty { try visitor.visitSingularStringField(value: self.rollupAddress, fieldNumber: 2) } @@ -3654,15 +3870,15 @@ extension Ocap_RequestListRollupBlocks: SwiftProtobuf.Message, SwiftProtobuf._Me if !self.proposer.isEmpty { try visitor.visitSingularStringField(value: self.proposer, fieldNumber: 4) } - if let v = self._validatorFilter { + try { if let v = self._validatorFilter { try visitor.visitSingularMessageField(value: v, fieldNumber: 5) - } - if let v = self._txFilter { + } }() + try { if let v = self._txFilter { try visitor.visitSingularMessageField(value: v, fieldNumber: 6) - } - if let v = self._timeFilter { + } }() + try { if let v = self._timeFilter { try visitor.visitSingularMessageField(value: v, fieldNumber: 7) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -3702,12 +3918,16 @@ extension Ocap_ResponseListRollupBlocks: SwiftProtobuf.Message, SwiftProtobuf._M } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.code != .ok { try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) } - if let v = self._page { + try { if let v = self._page { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() if !self.blocks.isEmpty { try visitor.visitRepeatedMessageField(value: self.blocks, fieldNumber: 3) } @@ -3744,9 +3964,13 @@ extension Ocap_RequestListRollupValidators: SwiftProtobuf.Message, SwiftProtobuf } public func traverse(visitor: inout V) throws { - if let v = self._paging { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._paging { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } + } }() if !self.rollupAddress.isEmpty { try visitor.visitSingularStringField(value: self.rollupAddress, fieldNumber: 2) } @@ -3784,12 +4008,16 @@ extension Ocap_ResponseListRollupValidators: SwiftProtobuf.Message, SwiftProtobu } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.code != .ok { try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) } - if let v = self._page { + try { if let v = self._page { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() if !self.validators.isEmpty { try visitor.visitRepeatedMessageField(value: self.validators, fieldNumber: 3) } @@ -3826,9 +4054,13 @@ extension Ocap_RequestSearch: SwiftProtobuf.Message, SwiftProtobuf._MessageImple } public func traverse(visitor: inout V) throws { - if let v = self._paging { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._paging { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } + } }() if !self.keyword.isEmpty { try visitor.visitSingularStringField(value: self.keyword, fieldNumber: 2) } @@ -3866,12 +4098,16 @@ extension Ocap_ResponseSearch: SwiftProtobuf.Message, SwiftProtobuf._MessageImpl } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.code != .ok { try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) } - if let v = self._page { + try { if let v = self._page { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() if !self.results.isEmpty { try visitor.visitRepeatedMessageField(value: self.results, fieldNumber: 3) } @@ -3940,12 +4176,16 @@ extension Ocap_ResponseGetEvidenceState: SwiftProtobuf.Message, SwiftProtobuf._M } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.code != .ok { try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) } - if let v = self._state { + try { if let v = self._state { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -3978,12 +4218,16 @@ extension Ocap_ResponseGetForgeStats: SwiftProtobuf.Message, SwiftProtobuf._Mess } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.code != .ok { try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) } - if let v = self._forgeStats { + try { if let v = self._forgeStats { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -4054,12 +4298,16 @@ extension Ocap_ResponseEstimateGas: SwiftProtobuf.Message, SwiftProtobuf._Messag } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.code != .ok { try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) } - if let v = self._estimate { + try { if let v = self._estimate { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() try unknownFields.traverse(visitor: &visitor) } diff --git a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/rpc.proto b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/rpc.proto index f64e4018..34e07c11 100644 --- a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/rpc.proto +++ b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/rpc.proto @@ -147,6 +147,7 @@ message ResponseListAssets { message RequestListTopAccounts { Page paging = 1; string tokenAddress = 2; + TimeFilter time_filter = 3; } message ResponseListTopAccounts { StatusCode code = 1; @@ -187,6 +188,7 @@ message ResponseGetTokenState { message RequestListTokens { Page paging = 1; string issuer_address = 2; + TimeFilter time_filter = 3; } message ResponseListTokens { StatusCode code = 1; @@ -203,6 +205,7 @@ message RequestListFactories { Page paging = 1; string owner_address = 2; repeated string address_list = 3; + TimeFilter time_filter = 4; } message ResponseListFactories { StatusCode code = 1; @@ -247,6 +250,7 @@ message RequestListRollups { Page paging = 1; string token_address = 2; string foreign_token_address = 3; // same as erc20_token_address + TimeFilter time_filter = 4; } message ResponseListRollups { StatusCode code = 1; diff --git a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/service.graphqls b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/service.graphqls index 17902c94..732429f0 100644 --- a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/service.graphqls +++ b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/service.graphqls @@ -72,7 +72,7 @@ type RootQueryType { proposer: String timeFilter: TimeFilterInput ): ResponseListBlocks - listTopAccounts(paging: PageInput, tokenAddress: String): ResponseListTopAccounts + listTopAccounts(paging: PageInput, tokenAddress: String, timeFilter: TimeFilterInput): ResponseListTopAccounts listTransactions( addressFilter: AddressFilterInput paging: PageInput @@ -89,8 +89,13 @@ type RootQueryType { ): ResponseListTransactions # since 1.7.0 - listTokens(issuerAddress: String, paging: PageInput): ResponseListTokens - listFactories(ownerAddress: String, addressList: [String], paging: PageInput): ResponseListFactories + listTokens(issuerAddress: String, paging: PageInput, timeFilter: TimeFilterInput): ResponseListTokens + listFactories( + ownerAddress: String + addressList: [String] + paging: PageInput + timeFilter: TimeFilterInput + ): ResponseListFactories # since v1.8.3 getAccountTokens(address: String, token: String): ResponseGetAccountTokens @@ -110,6 +115,7 @@ type RootQueryType { tokenAddress: String erc20TokenAddress: String foreignTokenAddress: String + timeFilter: TimeFilterInput ): ResponseListRollups getRollupBlock(hash: String, height: String, rollupAddress: String): ResponseGetRollupBlock listRollupBlocks( @@ -119,6 +125,7 @@ type RootQueryType { proposer: String validatorFilter: ValidatorFilterInput txFilter: TxFilterInput + timeFilter: TimeFilterInput ): ResponseListRollupBlocks listRollupValidators(paging: PageInput, rollupAddress: String): ResponseListRollupValidators diff --git a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/state.pb.swift b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/state.pb.swift index 9d882190..204b1558 100644 --- a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/state.pb.swift +++ b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/state.pb.swift @@ -760,6 +760,11 @@ public struct Ocap_RollupState { set {_uniqueStorage()._tokenAddress = newValue} } + public var vaultAddress: String { + get {return _storage._vaultAddress} + set {_uniqueStorage()._vaultAddress = newValue} + } + /// FUTURE: how to support main token on foreign chain: such as ETH and BNB public var contractAddress: String { get {return _storage._contractAddress} @@ -978,6 +983,17 @@ public struct Ocap_RollupState { set {_uniqueStorage()._migrateHistory = newValue} } + /// Added since v1.18.32 + public var closed: Bool { + get {return _storage._closed} + set {_uniqueStorage()._closed = newValue} + } + + public var vaultHistory: [String] { + get {return _storage._vaultHistory} + set {_uniqueStorage()._vaultHistory = newValue} + } + public var context: Ocap_StateContext { get {return _storage._context ?? Ocap_StateContext()} set {_uniqueStorage()._context = newValue} @@ -1090,6 +1106,12 @@ public struct Ocap_RollupBlock { set {_uniqueStorage()._minReward = newValue} } + /// Added since v1.18.32 + public var governance: Bool { + get {return _storage._governance} + set {_uniqueStorage()._governance = newValue} + } + public var context: Ocap_StateContext { get {return _storage._context ?? Ocap_StateContext()} set {_uniqueStorage()._context = newValue} @@ -1242,9 +1264,13 @@ extension Ocap_AccountState: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem public func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - if let v = _storage._balance { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = _storage._balance { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } + } }() if !_storage._nonce.isEmpty { try visitor.visitSingularStringField(value: _storage._nonce, fieldNumber: 2) } @@ -1257,21 +1283,21 @@ extension Ocap_AccountState: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem if !_storage._pk.isEmpty { try visitor.visitSingularBytesField(value: _storage._pk, fieldNumber: 5) } - if let v = _storage._type { + try { if let v = _storage._type { try visitor.visitSingularMessageField(value: v, fieldNumber: 6) - } + } }() if !_storage._moniker.isEmpty { try visitor.visitSingularStringField(value: _storage._moniker, fieldNumber: 7) } - if let v = _storage._context { + try { if let v = _storage._context { try visitor.visitSingularMessageField(value: v, fieldNumber: 8) - } + } }() if !_storage._issuer.isEmpty { try visitor.visitSingularStringField(value: _storage._issuer, fieldNumber: 9) } - if let v = _storage._gasBalance { + try { if let v = _storage._gasBalance { try visitor.visitSingularMessageField(value: v, fieldNumber: 10) - } + } }() if !_storage._migratedTo.isEmpty { try visitor.visitRepeatedStringField(value: _storage._migratedTo, fieldNumber: 13) } @@ -1284,9 +1310,9 @@ extension Ocap_AccountState: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem if !_storage._tokens.isEmpty { try visitor.visitRepeatedMessageField(value: _storage._tokens, fieldNumber: 21) } - if let v = _storage._data { + try { if let v = _storage._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 50) - } + } }() } try unknownFields.traverse(visitor: &visitor) } @@ -1414,6 +1440,10 @@ extension Ocap_AssetState: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen public func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !_storage._address.isEmpty { try visitor.visitSingularStringField(value: _storage._address, fieldNumber: 1) } @@ -1432,30 +1462,30 @@ extension Ocap_AssetState: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen if _storage._ttl != 0 { try visitor.visitSingularUInt32Field(value: _storage._ttl, fieldNumber: 6) } - if let v = _storage._consumedTime { + try { if let v = _storage._consumedTime { try visitor.visitSingularMessageField(value: v, fieldNumber: 7) - } + } }() if !_storage._issuer.isEmpty { try visitor.visitSingularStringField(value: _storage._issuer, fieldNumber: 8) } if !_storage._parent.isEmpty { try visitor.visitSingularStringField(value: _storage._parent, fieldNumber: 9) } - if let v = _storage._endpoint { + try { if let v = _storage._endpoint { try visitor.visitSingularMessageField(value: v, fieldNumber: 10) - } - if let v = _storage._display { + } }() + try { if let v = _storage._display { try visitor.visitSingularMessageField(value: v, fieldNumber: 11) - } + } }() if !_storage._tags.isEmpty { try visitor.visitRepeatedStringField(value: _storage._tags, fieldNumber: 12) } - if let v = _storage._context { + try { if let v = _storage._context { try visitor.visitSingularMessageField(value: v, fieldNumber: 14) - } - if let v = _storage._data { + } }() + try { if let v = _storage._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 50) - } + } }() } try unknownFields.traverse(visitor: &visitor) } @@ -1566,36 +1596,40 @@ extension Ocap_ForgeState: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen public func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !_storage._address.isEmpty { try visitor.visitSingularStringField(value: _storage._address, fieldNumber: 1) } - if let v = _storage._consensus { + try { if let v = _storage._consensus { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() if !_storage._tasks.isEmpty { try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: _storage._tasks, fieldNumber: 3) } if !_storage._version.isEmpty { try visitor.visitSingularStringField(value: _storage._version, fieldNumber: 4) } - if let v = _storage._token { + try { if let v = _storage._token { try visitor.visitSingularMessageField(value: v, fieldNumber: 5) - } - if let v = _storage._txConfig { + } }() + try { if let v = _storage._txConfig { try visitor.visitSingularMessageField(value: v, fieldNumber: 6) - } - if let v = _storage._upgradeInfo { + } }() + try { if let v = _storage._upgradeInfo { try visitor.visitSingularMessageField(value: v, fieldNumber: 7) - } + } }() if !_storage._accountConfig.isEmpty { try visitor.visitRepeatedMessageField(value: _storage._accountConfig, fieldNumber: 8) } - if let v = _storage._vaults { + try { if let v = _storage._vaults { try visitor.visitSingularMessageField(value: v, fieldNumber: 9) - } - if let v = _storage._data { + } }() + try { if let v = _storage._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 2047) - } + } }() } try unknownFields.traverse(visitor: &visitor) } @@ -1719,6 +1753,10 @@ extension Ocap_DelegateOpState: SwiftProtobuf.Message, SwiftProtobuf._MessageImp } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.rule.isEmpty { try visitor.visitSingularStringField(value: self.rule, fieldNumber: 1) } @@ -1728,12 +1766,12 @@ extension Ocap_DelegateOpState: SwiftProtobuf.Message, SwiftProtobuf._MessageImp if self.numTxsDelta != 0 { try visitor.visitSingularUInt64Field(value: self.numTxsDelta, fieldNumber: 3) } - if let v = self._balance { + try { if let v = self._balance { try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - } - if let v = self._balanceDelta { + } }() + try { if let v = self._balanceDelta { try visitor.visitSingularMessageField(value: v, fieldNumber: 5) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -1773,18 +1811,22 @@ extension Ocap_DelegateState: SwiftProtobuf.Message, SwiftProtobuf._MessageImple } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.address.isEmpty { try visitor.visitSingularStringField(value: self.address, fieldNumber: 1) } if !self.ops.isEmpty { try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: self.ops, fieldNumber: 2) } - if let v = self._context { + try { if let v = self._context { try visitor.visitSingularMessageField(value: v, fieldNumber: 14) - } - if let v = self._data { + } }() + try { if let v = self._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 15) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -1884,6 +1926,10 @@ extension Ocap_TokenState: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen public func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !_storage._address.isEmpty { try visitor.visitSingularStringField(value: _storage._address, fieldNumber: 1) } @@ -1911,15 +1957,15 @@ extension Ocap_TokenState: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen if !_storage._totalSupply.isEmpty { try visitor.visitSingularStringField(value: _storage._totalSupply, fieldNumber: 9) } - if let v = _storage._foreignToken { + try { if let v = _storage._foreignToken { try visitor.visitSingularMessageField(value: v, fieldNumber: 10) - } - if let v = _storage._context { + } }() + try { if let v = _storage._context { try visitor.visitSingularMessageField(value: v, fieldNumber: 15) - } - if let v = _storage._data { + } }() + try { if let v = _storage._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 20) - } + } }() } try unknownFields.traverse(visitor: &visitor) } @@ -2056,6 +2102,10 @@ extension Ocap_AssetFactoryState: SwiftProtobuf.Message, SwiftProtobuf._MessageI public func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !_storage._address.isEmpty { try visitor.visitSingularStringField(value: _storage._address, fieldNumber: 1) } @@ -2077,36 +2127,36 @@ extension Ocap_AssetFactoryState: SwiftProtobuf.Message, SwiftProtobuf._MessageI if !_storage._trustedIssuers.isEmpty { try visitor.visitRepeatedStringField(value: _storage._trustedIssuers, fieldNumber: 7) } - if let v = _storage._input { + try { if let v = _storage._input { try visitor.visitSingularMessageField(value: v, fieldNumber: 8) - } - if let v = _storage._output { + } }() + try { if let v = _storage._output { try visitor.visitSingularMessageField(value: v, fieldNumber: 9) - } + } }() if !_storage._hooks.isEmpty { try visitor.visitRepeatedMessageField(value: _storage._hooks, fieldNumber: 10) } - if let v = _storage._data { + try { if let v = _storage._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 11) - } - if let v = _storage._context { + } }() + try { if let v = _storage._context { try visitor.visitSingularMessageField(value: v, fieldNumber: 12) - } - if let v = _storage._balance { + } }() + try { if let v = _storage._balance { try visitor.visitSingularMessageField(value: v, fieldNumber: 13) - } + } }() if !_storage._tokens.isEmpty { try visitor.visitRepeatedMessageField(value: _storage._tokens, fieldNumber: 14) } if _storage._numMinted != 0 { try visitor.visitSingularUInt32Field(value: _storage._numMinted, fieldNumber: 15) } - if let v = _storage._display { + try { if let v = _storage._display { try visitor.visitSingularMessageField(value: v, fieldNumber: 16) - } - if let v = _storage._lastSettlement { + } }() + try { if let v = _storage._lastSettlement { try visitor.visitSingularMessageField(value: v, fieldNumber: 17) - } + } }() } try unknownFields.traverse(visitor: &visitor) } @@ -2232,6 +2282,10 @@ extension Ocap_StakeState: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen public func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !_storage._address.isEmpty { try visitor.visitSingularStringField(value: _storage._address, fieldNumber: 1) } @@ -2265,12 +2319,12 @@ extension Ocap_StakeState: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen if !_storage._slashers.isEmpty { try visitor.visitRepeatedStringField(value: _storage._slashers, fieldNumber: 11) } - if let v = _storage._context { + try { if let v = _storage._context { try visitor.visitSingularMessageField(value: v, fieldNumber: 30) - } - if let v = _storage._data { + } }() + try { if let v = _storage._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 50) - } + } }() } try unknownFields.traverse(visitor: &visitor) } @@ -2307,6 +2361,7 @@ extension Ocap_RollupState: SwiftProtobuf.Message, SwiftProtobuf._MessageImpleme public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "address"), 2: .standard(proto: "token_address"), + 3: .standard(proto: "vault_address"), 4: .standard(proto: "contract_address"), 5: .standard(proto: "seed_validators"), 6: .same(proto: "validators"), @@ -2342,13 +2397,16 @@ extension Ocap_RollupState: SwiftProtobuf.Message, SwiftProtobuf._MessageImpleme 38: .standard(proto: "publish_waiting_period"), 39: .standard(proto: "publish_slash_rate"), 40: .standard(proto: "migrate_history"), - 42: .same(proto: "context"), + 41: .same(proto: "closed"), + 42: .standard(proto: "vault_history"), + 43: .same(proto: "context"), 50: .same(proto: "data"), ] fileprivate class _StorageClass { var _address: String = String() var _tokenAddress: String = String() + var _vaultAddress: String = String() var _contractAddress: String = String() var _seedValidators: [Ocap_RollupValidator] = [] var _validators: [Ocap_RollupValidator] = [] @@ -2384,6 +2442,8 @@ extension Ocap_RollupState: SwiftProtobuf.Message, SwiftProtobuf._MessageImpleme var _publishWaitingPeriod: UInt32 = 0 var _publishSlashRate: UInt32 = 0 var _migrateHistory: [String] = [] + var _closed: Bool = false + var _vaultHistory: [String] = [] var _context: Ocap_StateContext? = nil var _data: SwiftProtobuf.Google_Protobuf_Any? = nil @@ -2394,6 +2454,7 @@ extension Ocap_RollupState: SwiftProtobuf.Message, SwiftProtobuf._MessageImpleme init(copying source: _StorageClass) { _address = source._address _tokenAddress = source._tokenAddress + _vaultAddress = source._vaultAddress _contractAddress = source._contractAddress _seedValidators = source._seedValidators _validators = source._validators @@ -2429,6 +2490,8 @@ extension Ocap_RollupState: SwiftProtobuf.Message, SwiftProtobuf._MessageImpleme _publishWaitingPeriod = source._publishWaitingPeriod _publishSlashRate = source._publishSlashRate _migrateHistory = source._migrateHistory + _closed = source._closed + _vaultHistory = source._vaultHistory _context = source._context _data = source._data } @@ -2451,6 +2514,7 @@ extension Ocap_RollupState: SwiftProtobuf.Message, SwiftProtobuf._MessageImpleme switch fieldNumber { case 1: try { try decoder.decodeSingularStringField(value: &_storage._address) }() case 2: try { try decoder.decodeSingularStringField(value: &_storage._tokenAddress) }() + case 3: try { try decoder.decodeSingularStringField(value: &_storage._vaultAddress) }() case 4: try { try decoder.decodeSingularStringField(value: &_storage._contractAddress) }() case 5: try { try decoder.decodeRepeatedMessageField(value: &_storage._seedValidators) }() case 6: try { try decoder.decodeRepeatedMessageField(value: &_storage._validators) }() @@ -2486,7 +2550,9 @@ extension Ocap_RollupState: SwiftProtobuf.Message, SwiftProtobuf._MessageImpleme case 38: try { try decoder.decodeSingularUInt32Field(value: &_storage._publishWaitingPeriod) }() case 39: try { try decoder.decodeSingularUInt32Field(value: &_storage._publishSlashRate) }() case 40: try { try decoder.decodeRepeatedStringField(value: &_storage._migrateHistory) }() - case 42: try { try decoder.decodeSingularMessageField(value: &_storage._context) }() + case 41: try { try decoder.decodeSingularBoolField(value: &_storage._closed) }() + case 42: try { try decoder.decodeRepeatedStringField(value: &_storage._vaultHistory) }() + case 43: try { try decoder.decodeSingularMessageField(value: &_storage._context) }() case 50: try { try decoder.decodeSingularMessageField(value: &_storage._data) }() default: break } @@ -2496,12 +2562,19 @@ extension Ocap_RollupState: SwiftProtobuf.Message, SwiftProtobuf._MessageImpleme public func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !_storage._address.isEmpty { try visitor.visitSingularStringField(value: _storage._address, fieldNumber: 1) } if !_storage._tokenAddress.isEmpty { try visitor.visitSingularStringField(value: _storage._tokenAddress, fieldNumber: 2) } + if !_storage._vaultAddress.isEmpty { + try visitor.visitSingularStringField(value: _storage._vaultAddress, fieldNumber: 3) + } if !_storage._contractAddress.isEmpty { try visitor.visitSingularStringField(value: _storage._contractAddress, fieldNumber: 4) } @@ -2562,9 +2635,9 @@ extension Ocap_RollupState: SwiftProtobuf.Message, SwiftProtobuf._MessageImpleme if !_storage._blockHash.isEmpty { try visitor.visitSingularStringField(value: _storage._blockHash, fieldNumber: 25) } - if let v = _storage._tokenInfo { + try { if let v = _storage._tokenInfo { try visitor.visitSingularMessageField(value: v, fieldNumber: 26) - } + } }() if !_storage._totalDepositAmount.isEmpty { try visitor.visitSingularStringField(value: _storage._totalDepositAmount, fieldNumber: 27) } @@ -2592,9 +2665,9 @@ extension Ocap_RollupState: SwiftProtobuf.Message, SwiftProtobuf._MessageImpleme if _storage._paused != false { try visitor.visitSingularBoolField(value: _storage._paused, fieldNumber: 35) } - if let v = _storage._foreignToken { + try { if let v = _storage._foreignToken { try visitor.visitSingularMessageField(value: v, fieldNumber: 36) - } + } }() if _storage._leaveWaitingPeriod != 0 { try visitor.visitSingularUInt32Field(value: _storage._leaveWaitingPeriod, fieldNumber: 37) } @@ -2607,12 +2680,18 @@ extension Ocap_RollupState: SwiftProtobuf.Message, SwiftProtobuf._MessageImpleme if !_storage._migrateHistory.isEmpty { try visitor.visitRepeatedStringField(value: _storage._migrateHistory, fieldNumber: 40) } - if let v = _storage._context { - try visitor.visitSingularMessageField(value: v, fieldNumber: 42) + if _storage._closed != false { + try visitor.visitSingularBoolField(value: _storage._closed, fieldNumber: 41) } - if let v = _storage._data { - try visitor.visitSingularMessageField(value: v, fieldNumber: 50) + if !_storage._vaultHistory.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._vaultHistory, fieldNumber: 42) } + try { if let v = _storage._context { + try visitor.visitSingularMessageField(value: v, fieldNumber: 43) + } }() + try { if let v = _storage._data { + try visitor.visitSingularMessageField(value: v, fieldNumber: 50) + } }() } try unknownFields.traverse(visitor: &visitor) } @@ -2624,6 +2703,7 @@ extension Ocap_RollupState: SwiftProtobuf.Message, SwiftProtobuf._MessageImpleme let rhs_storage = _args.1 if _storage._address != rhs_storage._address {return false} if _storage._tokenAddress != rhs_storage._tokenAddress {return false} + if _storage._vaultAddress != rhs_storage._vaultAddress {return false} if _storage._contractAddress != rhs_storage._contractAddress {return false} if _storage._seedValidators != rhs_storage._seedValidators {return false} if _storage._validators != rhs_storage._validators {return false} @@ -2659,6 +2739,8 @@ extension Ocap_RollupState: SwiftProtobuf.Message, SwiftProtobuf._MessageImpleme if _storage._publishWaitingPeriod != rhs_storage._publishWaitingPeriod {return false} if _storage._publishSlashRate != rhs_storage._publishSlashRate {return false} if _storage._migrateHistory != rhs_storage._migrateHistory {return false} + if _storage._closed != rhs_storage._closed {return false} + if _storage._vaultHistory != rhs_storage._vaultHistory {return false} if _storage._context != rhs_storage._context {return false} if _storage._data != rhs_storage._data {return false} return true @@ -2686,6 +2768,7 @@ extension Ocap_RollupBlock: SwiftProtobuf.Message, SwiftProtobuf._MessageImpleme 12: .standard(proto: "burned_amount"), 13: .standard(proto: "reward_amount"), 14: .standard(proto: "min_reward"), + 15: .same(proto: "governance"), 30: .same(proto: "context"), 50: .same(proto: "data"), ] @@ -2704,6 +2787,7 @@ extension Ocap_RollupBlock: SwiftProtobuf.Message, SwiftProtobuf._MessageImpleme var _burnedAmount: String = String() var _rewardAmount: String = String() var _minReward: String = String() + var _governance: Bool = false var _context: Ocap_StateContext? = nil var _data: SwiftProtobuf.Google_Protobuf_Any? = nil @@ -2725,6 +2809,7 @@ extension Ocap_RollupBlock: SwiftProtobuf.Message, SwiftProtobuf._MessageImpleme _burnedAmount = source._burnedAmount _rewardAmount = source._rewardAmount _minReward = source._minReward + _governance = source._governance _context = source._context _data = source._data } @@ -2758,6 +2843,7 @@ extension Ocap_RollupBlock: SwiftProtobuf.Message, SwiftProtobuf._MessageImpleme case 12: try { try decoder.decodeSingularStringField(value: &_storage._burnedAmount) }() case 13: try { try decoder.decodeSingularStringField(value: &_storage._rewardAmount) }() case 14: try { try decoder.decodeSingularStringField(value: &_storage._minReward) }() + case 15: try { try decoder.decodeSingularBoolField(value: &_storage._governance) }() case 30: try { try decoder.decodeSingularMessageField(value: &_storage._context) }() case 50: try { try decoder.decodeSingularMessageField(value: &_storage._data) }() default: break @@ -2768,6 +2854,10 @@ extension Ocap_RollupBlock: SwiftProtobuf.Message, SwiftProtobuf._MessageImpleme public func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !_storage._hash.isEmpty { try visitor.visitSingularStringField(value: _storage._hash, fieldNumber: 1) } @@ -2807,12 +2897,15 @@ extension Ocap_RollupBlock: SwiftProtobuf.Message, SwiftProtobuf._MessageImpleme if !_storage._minReward.isEmpty { try visitor.visitSingularStringField(value: _storage._minReward, fieldNumber: 14) } - if let v = _storage._context { - try visitor.visitSingularMessageField(value: v, fieldNumber: 30) + if _storage._governance != false { + try visitor.visitSingularBoolField(value: _storage._governance, fieldNumber: 15) } - if let v = _storage._data { + try { if let v = _storage._context { + try visitor.visitSingularMessageField(value: v, fieldNumber: 30) + } }() + try { if let v = _storage._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 50) - } + } }() } try unknownFields.traverse(visitor: &visitor) } @@ -2835,6 +2928,7 @@ extension Ocap_RollupBlock: SwiftProtobuf.Message, SwiftProtobuf._MessageImpleme if _storage._burnedAmount != rhs_storage._burnedAmount {return false} if _storage._rewardAmount != rhs_storage._rewardAmount {return false} if _storage._minReward != rhs_storage._minReward {return false} + if _storage._governance != rhs_storage._governance {return false} if _storage._context != rhs_storage._context {return false} if _storage._data != rhs_storage._data {return false} return true @@ -2869,15 +2963,19 @@ extension Ocap_EvidenceState: SwiftProtobuf.Message, SwiftProtobuf._MessageImple } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.hash.isEmpty { try visitor.visitSingularStringField(value: self.hash, fieldNumber: 1) } if !self.data.isEmpty { try visitor.visitSingularStringField(value: self.data, fieldNumber: 2) } - if let v = self._context { + try { if let v = self._context { try visitor.visitSingularMessageField(value: v, fieldNumber: 30) - } + } }() try unknownFields.traverse(visitor: &visitor) } diff --git a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/state.proto b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/state.proto index 2e27b9b4..cb358e13 100644 --- a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/state.proto +++ b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/state.proto @@ -218,6 +218,7 @@ message RollupState { // FUTURE: how to handle 1 ocap token mapping to multiple foreign chains string address = 1; string token_address = 2; + string vault_address = 3; // FUTURE: how to support main token on foreign chain: such as ETH and BNB string contract_address = 4; @@ -305,7 +306,11 @@ message RollupState { // contract history from earliest to latest repeated string migrate_history = 40; - StateContext context = 42; + // Added since v1.18.32 + bool closed = 41; + repeated string vault_history = 42; + + StateContext context = 43; google.protobuf.Any data = 50; } @@ -360,6 +365,9 @@ message RollupBlock { // And the publisher share of total reward should cover the block sync cost string min_reward = 14; + // Added since v1.18.32 + bool governance = 15; + StateContext context = 30; google.protobuf.Any data = 50; } diff --git a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/trace-type.pb.swift b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/trace-type.pb.swift index ea266aaa..7c90b37d 100644 --- a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/trace-type.pb.swift +++ b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/trace-type.pb.swift @@ -907,6 +907,11 @@ public struct Ocap_IndexedRollupState { set {_uniqueStorage()._tokenAddress = newValue} } + public var vaultAddress: String { + get {return _storage._vaultAddress} + set {_uniqueStorage()._vaultAddress = newValue} + } + public var contractAddress: String { get {return _storage._contractAddress} set {_uniqueStorage()._contractAddress = newValue} @@ -1106,6 +1111,17 @@ public struct Ocap_IndexedRollupState { set {_uniqueStorage()._migrateHistory = newValue} } + /// Added since v1.18.32 + public var closed: Bool { + get {return _storage._closed} + set {_uniqueStorage()._closed = newValue} + } + + public var vaultHistory: [String] { + get {return _storage._vaultHistory} + set {_uniqueStorage()._vaultHistory = newValue} + } + public var data: SwiftProtobuf.Google_Protobuf_Any { get {return _storage._data ?? SwiftProtobuf.Google_Protobuf_Any()} set {_uniqueStorage()._data = newValue} @@ -1197,6 +1213,12 @@ public struct Ocap_IndexedRollupBlock { set {_uniqueStorage()._rewardAmount = newValue} } + /// Added since v1.18.32 + public var governance: Bool { + get {return _storage._governance} + set {_uniqueStorage()._governance = newValue} + } + public var tokenInfo: Ocap_IndexedTokenInput { get {return _storage._tokenInfo ?? Ocap_IndexedTokenInput()} set {_uniqueStorage()._tokenInfo = newValue} @@ -2182,6 +2204,10 @@ extension Ocap_IndexedTransaction: SwiftProtobuf.Message, SwiftProtobuf._Message public func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !_storage._hash.isEmpty { try visitor.visitSingularStringField(value: _storage._hash, fieldNumber: 1) } @@ -2197,9 +2223,9 @@ extension Ocap_IndexedTransaction: SwiftProtobuf.Message, SwiftProtobuf._Message if !_storage._type.isEmpty { try visitor.visitSingularStringField(value: _storage._type, fieldNumber: 5) } - if let v = _storage._tx { + try { if let v = _storage._tx { try visitor.visitSingularMessageField(value: v, fieldNumber: 6) - } + } }() if !_storage._receipts.isEmpty { try visitor.visitRepeatedMessageField(value: _storage._receipts, fieldNumber: 16) } @@ -2287,12 +2313,16 @@ extension Ocap_IndexedAccountState: SwiftProtobuf.Message, SwiftProtobuf._Messag } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.address.isEmpty { try visitor.visitSingularStringField(value: self.address, fieldNumber: 1) } - if let v = self._balance { + try { if let v = self._balance { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() if !self.numAssets.isEmpty { try visitor.visitSingularStringField(value: self.numAssets, fieldNumber: 3) } @@ -2317,15 +2347,15 @@ extension Ocap_IndexedAccountState: SwiftProtobuf.Message, SwiftProtobuf._Messag if !self.migratedTo.isEmpty { try visitor.visitSingularStringField(value: self.migratedTo, fieldNumber: 10) } - if let v = self._totalReceivedStakes { + try { if let v = self._totalReceivedStakes { try visitor.visitSingularMessageField(value: v, fieldNumber: 11) - } - if let v = self._totalStakes { + } }() + try { if let v = self._totalStakes { try visitor.visitSingularMessageField(value: v, fieldNumber: 12) - } - if let v = self._totalUnstakes { + } }() + try { if let v = self._totalUnstakes { try visitor.visitSingularMessageField(value: v, fieldNumber: 13) - } + } }() if !self.recentNumTxs.isEmpty { try visitor.visitRepeatedStringField(value: self.recentNumTxs, fieldNumber: 14) } @@ -2454,6 +2484,10 @@ extension Ocap_IndexedAssetState: SwiftProtobuf.Message, SwiftProtobuf._MessageI public func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !_storage._address.isEmpty { try visitor.visitSingularStringField(value: _storage._address, fieldNumber: 1) } @@ -2487,18 +2521,18 @@ extension Ocap_IndexedAssetState: SwiftProtobuf.Message, SwiftProtobuf._MessageI if !_storage._ttl.isEmpty { try visitor.visitSingularStringField(value: _storage._ttl, fieldNumber: 11) } - if let v = _storage._display { + try { if let v = _storage._display { try visitor.visitSingularMessageField(value: v, fieldNumber: 12) - } - if let v = _storage._endpoint { + } }() + try { if let v = _storage._endpoint { try visitor.visitSingularMessageField(value: v, fieldNumber: 13) - } + } }() if !_storage._tags.isEmpty { try visitor.visitRepeatedStringField(value: _storage._tags, fieldNumber: 14) } - if let v = _storage._data { + try { if let v = _storage._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 50) - } + } }() } try unknownFields.traverse(visitor: &visitor) } @@ -2678,6 +2712,10 @@ extension Ocap_IndexedTokenState: SwiftProtobuf.Message, SwiftProtobuf._MessageI public func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !_storage._name.isEmpty { try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) } @@ -2711,12 +2749,12 @@ extension Ocap_IndexedTokenState: SwiftProtobuf.Message, SwiftProtobuf._MessageI if !_storage._renaissanceTime.isEmpty { try visitor.visitSingularStringField(value: _storage._renaissanceTime, fieldNumber: 11) } - if let v = _storage._foreignToken { + try { if let v = _storage._foreignToken { try visitor.visitSingularMessageField(value: v, fieldNumber: 13) - } - if let v = _storage._data { + } }() + try { if let v = _storage._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 50) - } + } }() } try unknownFields.traverse(visitor: &visitor) } @@ -2858,6 +2896,10 @@ extension Ocap_IndexedFactoryState: SwiftProtobuf.Message, SwiftProtobuf._Messag public func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !_storage._address.isEmpty { try visitor.visitSingularStringField(value: _storage._address, fieldNumber: 1) } @@ -2879,18 +2921,18 @@ extension Ocap_IndexedFactoryState: SwiftProtobuf.Message, SwiftProtobuf._Messag if !_storage._trustedIssuers.isEmpty { try visitor.visitRepeatedStringField(value: _storage._trustedIssuers, fieldNumber: 7) } - if let v = _storage._input { + try { if let v = _storage._input { try visitor.visitSingularMessageField(value: v, fieldNumber: 8) - } - if let v = _storage._output { + } }() + try { if let v = _storage._output { try visitor.visitSingularMessageField(value: v, fieldNumber: 9) - } + } }() if !_storage._hooks.isEmpty { try visitor.visitRepeatedMessageField(value: _storage._hooks, fieldNumber: 10) } - if let v = _storage._data { + try { if let v = _storage._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 11) - } + } }() if !_storage._balance.isEmpty { try visitor.visitSingularStringField(value: _storage._balance, fieldNumber: 13) } @@ -2909,9 +2951,9 @@ extension Ocap_IndexedFactoryState: SwiftProtobuf.Message, SwiftProtobuf._Messag if !_storage._renaissanceTime.isEmpty { try visitor.visitSingularStringField(value: _storage._renaissanceTime, fieldNumber: 18) } - if let v = _storage._display { + try { if let v = _storage._display { try visitor.visitSingularMessageField(value: v, fieldNumber: 19) - } + } }() } try unknownFields.traverse(visitor: &visitor) } @@ -2993,6 +3035,10 @@ extension Ocap_IndexedStakeState: SwiftProtobuf.Message, SwiftProtobuf._MessageI } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.address.isEmpty { try visitor.visitSingularStringField(value: self.address, fieldNumber: 1) } @@ -3032,9 +3078,9 @@ extension Ocap_IndexedStakeState: SwiftProtobuf.Message, SwiftProtobuf._MessageI if !self.slashers.isEmpty { try visitor.visitRepeatedStringField(value: self.slashers, fieldNumber: 13) } - if let v = self._data { + try { if let v = self._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 50) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -3063,6 +3109,7 @@ extension Ocap_IndexedRollupState: SwiftProtobuf.Message, SwiftProtobuf._Message public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "address"), 2: .standard(proto: "token_address"), + 3: .standard(proto: "vault_address"), 4: .standard(proto: "contract_address"), 5: .standard(proto: "seed_validators"), 6: .same(proto: "validators"), @@ -3100,12 +3147,15 @@ extension Ocap_IndexedRollupState: SwiftProtobuf.Message, SwiftProtobuf._Message 40: .standard(proto: "publish_waiting_period"), 41: .standard(proto: "publish_slash_rate"), 42: .standard(proto: "migrate_history"), + 43: .same(proto: "closed"), + 44: .standard(proto: "vault_history"), 50: .same(proto: "data"), ] fileprivate class _StorageClass { var _address: String = String() var _tokenAddress: String = String() + var _vaultAddress: String = String() var _contractAddress: String = String() var _seedValidators: [Ocap_RollupValidator] = [] var _validators: [Ocap_RollupValidator] = [] @@ -3143,6 +3193,8 @@ extension Ocap_IndexedRollupState: SwiftProtobuf.Message, SwiftProtobuf._Message var _publishWaitingPeriod: UInt32 = 0 var _publishSlashRate: UInt32 = 0 var _migrateHistory: [String] = [] + var _closed: Bool = false + var _vaultHistory: [String] = [] var _data: SwiftProtobuf.Google_Protobuf_Any? = nil static let defaultInstance = _StorageClass() @@ -3152,6 +3204,7 @@ extension Ocap_IndexedRollupState: SwiftProtobuf.Message, SwiftProtobuf._Message init(copying source: _StorageClass) { _address = source._address _tokenAddress = source._tokenAddress + _vaultAddress = source._vaultAddress _contractAddress = source._contractAddress _seedValidators = source._seedValidators _validators = source._validators @@ -3189,6 +3242,8 @@ extension Ocap_IndexedRollupState: SwiftProtobuf.Message, SwiftProtobuf._Message _publishWaitingPeriod = source._publishWaitingPeriod _publishSlashRate = source._publishSlashRate _migrateHistory = source._migrateHistory + _closed = source._closed + _vaultHistory = source._vaultHistory _data = source._data } } @@ -3210,6 +3265,7 @@ extension Ocap_IndexedRollupState: SwiftProtobuf.Message, SwiftProtobuf._Message switch fieldNumber { case 1: try { try decoder.decodeSingularStringField(value: &_storage._address) }() case 2: try { try decoder.decodeSingularStringField(value: &_storage._tokenAddress) }() + case 3: try { try decoder.decodeSingularStringField(value: &_storage._vaultAddress) }() case 4: try { try decoder.decodeSingularStringField(value: &_storage._contractAddress) }() case 5: try { try decoder.decodeRepeatedMessageField(value: &_storage._seedValidators) }() case 6: try { try decoder.decodeRepeatedMessageField(value: &_storage._validators) }() @@ -3247,6 +3303,8 @@ extension Ocap_IndexedRollupState: SwiftProtobuf.Message, SwiftProtobuf._Message case 40: try { try decoder.decodeSingularUInt32Field(value: &_storage._publishWaitingPeriod) }() case 41: try { try decoder.decodeSingularUInt32Field(value: &_storage._publishSlashRate) }() case 42: try { try decoder.decodeRepeatedStringField(value: &_storage._migrateHistory) }() + case 43: try { try decoder.decodeSingularBoolField(value: &_storage._closed) }() + case 44: try { try decoder.decodeRepeatedStringField(value: &_storage._vaultHistory) }() case 50: try { try decoder.decodeSingularMessageField(value: &_storage._data) }() default: break } @@ -3256,12 +3314,19 @@ extension Ocap_IndexedRollupState: SwiftProtobuf.Message, SwiftProtobuf._Message public func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !_storage._address.isEmpty { try visitor.visitSingularStringField(value: _storage._address, fieldNumber: 1) } if !_storage._tokenAddress.isEmpty { try visitor.visitSingularStringField(value: _storage._tokenAddress, fieldNumber: 2) } + if !_storage._vaultAddress.isEmpty { + try visitor.visitSingularStringField(value: _storage._vaultAddress, fieldNumber: 3) + } if !_storage._contractAddress.isEmpty { try visitor.visitSingularStringField(value: _storage._contractAddress, fieldNumber: 4) } @@ -3298,9 +3363,9 @@ extension Ocap_IndexedRollupState: SwiftProtobuf.Message, SwiftProtobuf._Message if !_storage._renaissanceTime.isEmpty { try visitor.visitSingularStringField(value: _storage._renaissanceTime, fieldNumber: 17) } - if let v = _storage._tokenInfo { + try { if let v = _storage._tokenInfo { try visitor.visitSingularMessageField(value: v, fieldNumber: 18) - } + } }() if !_storage._issuer.isEmpty { try visitor.visitSingularStringField(value: _storage._issuer, fieldNumber: 19) } @@ -3355,9 +3420,9 @@ extension Ocap_IndexedRollupState: SwiftProtobuf.Message, SwiftProtobuf._Message if _storage._paused != false { try visitor.visitSingularBoolField(value: _storage._paused, fieldNumber: 36) } - if let v = _storage._foreignToken { + try { if let v = _storage._foreignToken { try visitor.visitSingularMessageField(value: v, fieldNumber: 37) - } + } }() if _storage._leaveWaitingPeriod != 0 { try visitor.visitSingularUInt32Field(value: _storage._leaveWaitingPeriod, fieldNumber: 38) } @@ -3373,9 +3438,15 @@ extension Ocap_IndexedRollupState: SwiftProtobuf.Message, SwiftProtobuf._Message if !_storage._migrateHistory.isEmpty { try visitor.visitRepeatedStringField(value: _storage._migrateHistory, fieldNumber: 42) } - if let v = _storage._data { - try visitor.visitSingularMessageField(value: v, fieldNumber: 50) + if _storage._closed != false { + try visitor.visitSingularBoolField(value: _storage._closed, fieldNumber: 43) } + if !_storage._vaultHistory.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._vaultHistory, fieldNumber: 44) + } + try { if let v = _storage._data { + try visitor.visitSingularMessageField(value: v, fieldNumber: 50) + } }() } try unknownFields.traverse(visitor: &visitor) } @@ -3387,6 +3458,7 @@ extension Ocap_IndexedRollupState: SwiftProtobuf.Message, SwiftProtobuf._Message let rhs_storage = _args.1 if _storage._address != rhs_storage._address {return false} if _storage._tokenAddress != rhs_storage._tokenAddress {return false} + if _storage._vaultAddress != rhs_storage._vaultAddress {return false} if _storage._contractAddress != rhs_storage._contractAddress {return false} if _storage._seedValidators != rhs_storage._seedValidators {return false} if _storage._validators != rhs_storage._validators {return false} @@ -3424,6 +3496,8 @@ extension Ocap_IndexedRollupState: SwiftProtobuf.Message, SwiftProtobuf._Message if _storage._publishWaitingPeriod != rhs_storage._publishWaitingPeriod {return false} if _storage._publishSlashRate != rhs_storage._publishSlashRate {return false} if _storage._migrateHistory != rhs_storage._migrateHistory {return false} + if _storage._closed != rhs_storage._closed {return false} + if _storage._vaultHistory != rhs_storage._vaultHistory {return false} if _storage._data != rhs_storage._data {return false} return true } @@ -3451,6 +3525,7 @@ extension Ocap_IndexedRollupBlock: SwiftProtobuf.Message, SwiftProtobuf._Message 13: .standard(proto: "minted_amount"), 14: .standard(proto: "burned_amount"), 15: .standard(proto: "reward_amount"), + 16: .same(proto: "governance"), 18: .standard(proto: "token_info"), 50: .same(proto: "data"), ] @@ -3470,6 +3545,7 @@ extension Ocap_IndexedRollupBlock: SwiftProtobuf.Message, SwiftProtobuf._Message var _mintedAmount: String = String() var _burnedAmount: String = String() var _rewardAmount: String = String() + var _governance: Bool = false var _tokenInfo: Ocap_IndexedTokenInput? = nil var _data: SwiftProtobuf.Google_Protobuf_Any? = nil @@ -3492,6 +3568,7 @@ extension Ocap_IndexedRollupBlock: SwiftProtobuf.Message, SwiftProtobuf._Message _mintedAmount = source._mintedAmount _burnedAmount = source._burnedAmount _rewardAmount = source._rewardAmount + _governance = source._governance _tokenInfo = source._tokenInfo _data = source._data } @@ -3526,6 +3603,7 @@ extension Ocap_IndexedRollupBlock: SwiftProtobuf.Message, SwiftProtobuf._Message case 13: try { try decoder.decodeSingularStringField(value: &_storage._mintedAmount) }() case 14: try { try decoder.decodeSingularStringField(value: &_storage._burnedAmount) }() case 15: try { try decoder.decodeSingularStringField(value: &_storage._rewardAmount) }() + case 16: try { try decoder.decodeSingularBoolField(value: &_storage._governance) }() case 18: try { try decoder.decodeSingularMessageField(value: &_storage._tokenInfo) }() case 50: try { try decoder.decodeSingularMessageField(value: &_storage._data) }() default: break @@ -3536,6 +3614,10 @@ extension Ocap_IndexedRollupBlock: SwiftProtobuf.Message, SwiftProtobuf._Message public func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !_storage._hash.isEmpty { try visitor.visitSingularStringField(value: _storage._hash, fieldNumber: 1) } @@ -3578,12 +3660,15 @@ extension Ocap_IndexedRollupBlock: SwiftProtobuf.Message, SwiftProtobuf._Message if !_storage._rewardAmount.isEmpty { try visitor.visitSingularStringField(value: _storage._rewardAmount, fieldNumber: 15) } - if let v = _storage._tokenInfo { - try visitor.visitSingularMessageField(value: v, fieldNumber: 18) + if _storage._governance != false { + try visitor.visitSingularBoolField(value: _storage._governance, fieldNumber: 16) } - if let v = _storage._data { + try { if let v = _storage._tokenInfo { + try visitor.visitSingularMessageField(value: v, fieldNumber: 18) + } }() + try { if let v = _storage._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 50) - } + } }() } try unknownFields.traverse(visitor: &visitor) } @@ -3607,6 +3692,7 @@ extension Ocap_IndexedRollupBlock: SwiftProtobuf.Message, SwiftProtobuf._Message if _storage._mintedAmount != rhs_storage._mintedAmount {return false} if _storage._burnedAmount != rhs_storage._burnedAmount {return false} if _storage._rewardAmount != rhs_storage._rewardAmount {return false} + if _storage._governance != rhs_storage._governance {return false} if _storage._tokenInfo != rhs_storage._tokenInfo {return false} if _storage._data != rhs_storage._data {return false} return true diff --git a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/trace-type.proto b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/trace-type.proto index 9ad73fdb..30161b16 100644 --- a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/trace-type.proto +++ b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/trace-type.proto @@ -230,6 +230,7 @@ message IndexedStakeState { message IndexedRollupState { string address = 1; string token_address = 2; + string vault_address = 3; string contract_address = 4; repeated RollupValidator seed_validators = 5; repeated RollupValidator validators = 6; @@ -280,6 +281,10 @@ message IndexedRollupState { // Added since v1.13.71 repeated string migrate_history = 42; + // Added since v1.18.32 + bool closed = 43; + repeated string vault_history = 44; + google.protobuf.Any data = 50; } @@ -305,6 +310,9 @@ message IndexedRollupBlock { string burned_amount = 14; string reward_amount = 15; + // Added since v1.18.32 + bool governance = 16; + IndexedTokenInput token_info = 18; google.protobuf.Any data = 50; diff --git a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/tx.pb.swift b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/tx.pb.swift index 1e262a64..a96b4c4b 100644 --- a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/tx.pb.swift +++ b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/tx.pb.swift @@ -764,6 +764,30 @@ public struct Ocap_UpdateAssetTx { fileprivate var _data: SwiftProtobuf.Google_Protobuf_Any? = nil } +public struct Ocap_ConsumeAssetTx { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var address: String = String() + + /// ocap won't update data into state if app is interested in this tx. + public var data: SwiftProtobuf.Google_Protobuf_Any { + get {return _data ?? SwiftProtobuf.Google_Protobuf_Any()} + set {_data = newValue} + } + /// Returns true if `data` has been explicitly set. + public var hasData: Bool {return self._data != nil} + /// Clears the value of `data`. Subsequent reads from it will return its default value. + public mutating func clearData() {self._data = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + fileprivate var _data: SwiftProtobuf.Google_Protobuf_Any? = nil +} + /// An asset factory is readonly by default /// Thus any change to the factory result a new factory public struct Ocap_CreateFactoryTx { @@ -1019,12 +1043,18 @@ public struct Ocap_CreateRollupTx { set {_uniqueStorage()._address = newValue} } - /// can be token or factory adddress + /// can be token or factory address public var tokenAddress: String { get {return _storage._tokenAddress} set {_uniqueStorage()._tokenAddress = newValue} } + /// vault to store locked token + public var vaultAddress: String { + get {return _storage._vaultAddress} + set {_uniqueStorage()._vaultAddress = newValue} + } + public var contractAddress: String { get {return _storage._contractAddress} set {_uniqueStorage()._contractAddress = newValue} @@ -1457,6 +1487,9 @@ public struct Ocap_CreateRollupBlockTx { /// Added since v1.13.61 public var minReward: String = String() + /// Added since v1.18.32 + public var governance: Bool = false + public var data: SwiftProtobuf.Google_Protobuf_Any { get {return _data ?? SwiftProtobuf.Google_Protobuf_Any()} set {_data = newValue} @@ -1562,14 +1595,14 @@ public struct Ocap_ResumeRollupTx { fileprivate var _data: SwiftProtobuf.Google_Protobuf_Any? = nil } -public struct Ocap_MigrateRollupContractTx { +public struct Ocap_CloseRollupTx { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. public var rollup: String = String() - public var to: String = String() + public var message: String = String() public var data: SwiftProtobuf.Google_Protobuf_Any { get {return _data ?? SwiftProtobuf.Google_Protobuf_Any()} @@ -1587,28 +1620,18 @@ public struct Ocap_MigrateRollupContractTx { fileprivate var _data: SwiftProtobuf.Google_Protobuf_Any? = nil } -public struct Ocap_MigrateRollupTokenTx { +public struct Ocap_MigrateRollupTx { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. public var rollup: String = String() - /// from which contract - public var from: String = String() - - /// to which contract, must points to latest contract address public var to: String = String() - /// token address and amount to migrate - public var token: Ocap_TokenInput { - get {return _token ?? Ocap_TokenInput()} - set {_token = newValue} - } - /// Returns true if `token` has been explicitly set. - public var hasToken: Bool {return self._token != nil} - /// Clears the value of `token`. Subsequent reads from it will return its default value. - public mutating func clearToken() {self._token = nil} + public var type: String = String() + + public var message: String = String() public var data: SwiftProtobuf.Google_Protobuf_Any { get {return _data ?? SwiftProtobuf.Google_Protobuf_Any()} @@ -1623,7 +1646,6 @@ public struct Ocap_MigrateRollupTokenTx { public init() {} - fileprivate var _token: Ocap_TokenInput? = nil fileprivate var _data: SwiftProtobuf.Google_Protobuf_Any? = nil } @@ -1633,7 +1655,7 @@ public struct Ocap_DepositTokenV2Tx { // methods supported on all messages. /// Should be a multi-signed transaction - /// Submited by user, signed by rollup validators + /// Submitted by user, signed by rollup validators public var token: Ocap_TokenInput { get {return _token ?? Ocap_TokenInput()} set {_token = newValue} @@ -1789,6 +1811,14 @@ public struct Ocap_ItxStub { set {value = .updateAsset(newValue)} } + public var consumeAsset: Ocap_ConsumeAssetTx { + get { + if case .consumeAsset(let v)? = value {return v} + return Ocap_ConsumeAssetTx() + } + set {value = .consumeAsset(newValue)} + } + /// Trade public var exchange: Ocap_ExchangeTx { get { @@ -1994,20 +2024,20 @@ public struct Ocap_ItxStub { set {value = .resumeRollup(newValue)} } - public var migrateRollupContract: Ocap_MigrateRollupContractTx { + public var migrateRollup: Ocap_MigrateRollupTx { get { - if case .migrateRollupContract(let v)? = value {return v} - return Ocap_MigrateRollupContractTx() + if case .migrateRollup(let v)? = value {return v} + return Ocap_MigrateRollupTx() } - set {value = .migrateRollupContract(newValue)} + set {value = .migrateRollup(newValue)} } - public var migrateRollupToken: Ocap_MigrateRollupTokenTx { + public var closeRollup: Ocap_CloseRollupTx { get { - if case .migrateRollupToken(let v)? = value {return v} - return Ocap_MigrateRollupTokenTx() + if case .closeRollup(let v)? = value {return v} + return Ocap_CloseRollupTx() } - set {value = .migrateRollupToken(newValue)} + set {value = .closeRollup(newValue)} } public var unknownFields = SwiftProtobuf.UnknownStorage() @@ -2021,6 +2051,7 @@ public struct Ocap_ItxStub { /// Assets case createAsset(Ocap_CreateAssetTx) case updateAsset(Ocap_UpdateAssetTx) + case consumeAsset(Ocap_ConsumeAssetTx) /// Trade case exchange(Ocap_ExchangeTx) case exchangeV2(Ocap_ExchangeV2Tx) @@ -2051,8 +2082,8 @@ public struct Ocap_ItxStub { case claimBlockReward(Ocap_ClaimBlockRewardTx) case pauseRollup(Ocap_PauseRollupTx) case resumeRollup(Ocap_ResumeRollupTx) - case migrateRollupContract(Ocap_MigrateRollupContractTx) - case migrateRollupToken(Ocap_MigrateRollupTokenTx) + case migrateRollup(Ocap_MigrateRollupTx) + case closeRollup(Ocap_CloseRollupTx) #if !swift(>=4.1) public static func ==(lhs: Ocap_ItxStub.OneOf_Value, rhs: Ocap_ItxStub.OneOf_Value) -> Bool { @@ -2084,6 +2115,10 @@ public struct Ocap_ItxStub { guard case .updateAsset(let l) = lhs, case .updateAsset(let r) = rhs else { preconditionFailure() } return l == r }() + case (.consumeAsset, .consumeAsset): return { + guard case .consumeAsset(let l) = lhs, case .consumeAsset(let r) = rhs else { preconditionFailure() } + return l == r + }() case (.exchange, .exchange): return { guard case .exchange(let l) = lhs, case .exchange(let r) = rhs else { preconditionFailure() } return l == r @@ -2184,12 +2219,12 @@ public struct Ocap_ItxStub { guard case .resumeRollup(let l) = lhs, case .resumeRollup(let r) = rhs else { preconditionFailure() } return l == r }() - case (.migrateRollupContract, .migrateRollupContract): return { - guard case .migrateRollupContract(let l) = lhs, case .migrateRollupContract(let r) = rhs else { preconditionFailure() } + case (.migrateRollup, .migrateRollup): return { + guard case .migrateRollup(let l) = lhs, case .migrateRollup(let r) = rhs else { preconditionFailure() } return l == r }() - case (.migrateRollupToken, .migrateRollupToken): return { - guard case .migrateRollupToken(let l) = lhs, case .migrateRollupToken(let r) = rhs else { preconditionFailure() } + case (.closeRollup, .closeRollup): return { + guard case .closeRollup(let l) = lhs, case .closeRollup(let r) = rhs else { preconditionFailure() } return l == r }() default: return false @@ -2230,18 +2265,22 @@ extension Ocap_AccountMigrateTx: SwiftProtobuf.Message, SwiftProtobuf._MessageIm } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.pk.isEmpty { try visitor.visitSingularBytesField(value: self.pk, fieldNumber: 1) } - if let v = self._type { + try { if let v = self._type { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() if !self.address.isEmpty { try visitor.visitSingularStringField(value: self.address, fieldNumber: 3) } - if let v = self._data { + try { if let v = self._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 15) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -2278,15 +2317,19 @@ extension Ocap_DeclareTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.moniker.isEmpty { try visitor.visitSingularStringField(value: self.moniker, fieldNumber: 1) } if !self.issuer.isEmpty { try visitor.visitSingularStringField(value: self.issuer, fieldNumber: 2) } - if let v = self._data { + try { if let v = self._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 15) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -2324,6 +2367,10 @@ extension Ocap_DelegateTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.address.isEmpty { try visitor.visitSingularStringField(value: self.address, fieldNumber: 1) } @@ -2333,9 +2380,9 @@ extension Ocap_DelegateTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen if !self.ops.isEmpty { try visitor.visitRepeatedMessageField(value: self.ops, fieldNumber: 3) } - if let v = self._data { + try { if let v = self._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 15) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -2412,6 +2459,10 @@ extension Ocap_RevokeDelegateTx: SwiftProtobuf.Message, SwiftProtobuf._MessageIm } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.address.isEmpty { try visitor.visitSingularStringField(value: self.address, fieldNumber: 1) } @@ -2421,9 +2472,9 @@ extension Ocap_RevokeDelegateTx: SwiftProtobuf.Message, SwiftProtobuf._MessageIm if !self.typeUrls.isEmpty { try visitor.visitRepeatedStringField(value: self.typeUrls, fieldNumber: 3) } - if let v = self._data { + try { if let v = self._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 15) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -2502,9 +2553,13 @@ extension Ocap_ExchangeInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem } public func traverse(visitor: inout V) throws { - if let v = self._value { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._value { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } + } }() if !self.assets.isEmpty { try visitor.visitRepeatedStringField(value: self.assets, fieldNumber: 2) } @@ -2542,9 +2597,13 @@ extension Ocap_ExchangeInfoV2: SwiftProtobuf.Message, SwiftProtobuf._MessageImpl } public func traverse(visitor: inout V) throws { - if let v = self._value { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._value { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } + } }() if !self.assets.isEmpty { try visitor.visitRepeatedStringField(value: self.assets, fieldNumber: 2) } @@ -2590,21 +2649,25 @@ extension Ocap_ExchangeTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.to.isEmpty { try visitor.visitSingularStringField(value: self.to, fieldNumber: 1) } - if let v = self._sender { + try { if let v = self._sender { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } - if let v = self._receiver { + } }() + try { if let v = self._receiver { try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } - if let v = self._expiredAt { + } }() + try { if let v = self._expiredAt { try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - } - if let v = self._data { + } }() + try { if let v = self._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 15) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -2646,21 +2709,25 @@ extension Ocap_ExchangeV2Tx: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.to.isEmpty { try visitor.visitSingularStringField(value: self.to, fieldNumber: 1) } - if let v = self._sender { + try { if let v = self._sender { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } - if let v = self._receiver { + } }() + try { if let v = self._receiver { try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } - if let v = self._expiredAt { + } }() + try { if let v = self._expiredAt { try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - } - if let v = self._data { + } }() + try { if let v = self._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 15) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -2700,18 +2767,22 @@ extension Ocap_TransferTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.to.isEmpty { try visitor.visitSingularStringField(value: self.to, fieldNumber: 1) } - if let v = self._value { + try { if let v = self._value { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() if !self.assets.isEmpty { try visitor.visitRepeatedStringField(value: self.assets, fieldNumber: 3) } - if let v = self._data { + try { if let v = self._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 15) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -2752,21 +2823,25 @@ extension Ocap_TransferV2Tx: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.to.isEmpty { try visitor.visitSingularStringField(value: self.to, fieldNumber: 1) } - if let v = self._value { + try { if let v = self._value { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() if !self.assets.isEmpty { try visitor.visitRepeatedStringField(value: self.assets, fieldNumber: 3) } if !self.tokens.isEmpty { try visitor.visitRepeatedMessageField(value: self.tokens, fieldNumber: 4) } - if let v = self._data { + try { if let v = self._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 15) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -2804,15 +2879,19 @@ extension Ocap_TransferV3Tx: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.inputs.isEmpty { try visitor.visitRepeatedMessageField(value: self.inputs, fieldNumber: 1) } if !self.outputs.isEmpty { try visitor.visitRepeatedMessageField(value: self.outputs, fieldNumber: 2) } - if let v = self._data { + try { if let v = self._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 15) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -2864,6 +2943,10 @@ extension Ocap_CreateTokenTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImple } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.name.isEmpty { try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) } @@ -2891,12 +2974,12 @@ extension Ocap_CreateTokenTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImple if !self.initialSupply.isEmpty { try visitor.visitSingularStringField(value: self.initialSupply, fieldNumber: 9) } - if let v = self._foreignToken { + try { if let v = self._foreignToken { try visitor.visitSingularMessageField(value: v, fieldNumber: 16) - } - if let v = self._data { + } }() + try { if let v = self._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 20) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -2996,6 +3079,10 @@ extension Ocap_AcquireAssetV2Tx: SwiftProtobuf.Message, SwiftProtobuf._MessageIm } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.factory.isEmpty { try visitor.visitSingularStringField(value: self.factory, fieldNumber: 1) } @@ -3008,12 +3095,12 @@ extension Ocap_AcquireAssetV2Tx: SwiftProtobuf.Message, SwiftProtobuf._MessageIm if !self.variables.isEmpty { try visitor.visitRepeatedMessageField(value: self.variables, fieldNumber: 4) } - if let v = self._issuer { + try { if let v = self._issuer { try visitor.visitSingularMessageField(value: v, fieldNumber: 5) - } - if let v = self._data { + } }() + try { if let v = self._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 15) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -3060,6 +3147,10 @@ extension Ocap_AcquireAssetV3Tx: SwiftProtobuf.Message, SwiftProtobuf._MessageIm } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.factory.isEmpty { try visitor.visitSingularStringField(value: self.factory, fieldNumber: 1) } @@ -3075,12 +3166,12 @@ extension Ocap_AcquireAssetV3Tx: SwiftProtobuf.Message, SwiftProtobuf._MessageIm if !self.variables.isEmpty { try visitor.visitRepeatedMessageField(value: self.variables, fieldNumber: 5) } - if let v = self._issuer { + try { if let v = self._issuer { try visitor.visitSingularMessageField(value: v, fieldNumber: 6) - } - if let v = self._data { + } }() + try { if let v = self._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 15) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -3126,6 +3217,10 @@ extension Ocap_MintAssetTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImpleme } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.factory.isEmpty { try visitor.visitSingularStringField(value: self.factory, fieldNumber: 1) } @@ -3141,9 +3236,9 @@ extension Ocap_MintAssetTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImpleme if !self.owner.isEmpty { try visitor.visitSingularStringField(value: self.owner, fieldNumber: 5) } - if let v = self._data { + try { if let v = self._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 15) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -3198,12 +3293,16 @@ extension Ocap_CreateAssetTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImple } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.moniker.isEmpty { try visitor.visitSingularStringField(value: self.moniker, fieldNumber: 1) } - if let v = self._data { + try { if let v = self._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() if self.readonly != false { try visitor.visitSingularBoolField(value: self.readonly, fieldNumber: 3) } @@ -3222,12 +3321,12 @@ extension Ocap_CreateAssetTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImple if !self.issuer.isEmpty { try visitor.visitSingularStringField(value: self.issuer, fieldNumber: 8) } - if let v = self._endpoint { + try { if let v = self._endpoint { try visitor.visitSingularMessageField(value: v, fieldNumber: 9) - } - if let v = self._display { + } }() + try { if let v = self._display { try visitor.visitSingularMessageField(value: v, fieldNumber: 10) - } + } }() if !self.tags.isEmpty { try visitor.visitRepeatedStringField(value: self.tags, fieldNumber: 11) } @@ -3274,15 +3373,19 @@ extension Ocap_UpdateAssetTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImple } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.address.isEmpty { try visitor.visitSingularStringField(value: self.address, fieldNumber: 1) } if !self.moniker.isEmpty { try visitor.visitSingularStringField(value: self.moniker, fieldNumber: 2) } - if let v = self._data { + try { if let v = self._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 15) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -3295,6 +3398,48 @@ extension Ocap_UpdateAssetTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImple } } +extension Ocap_ConsumeAssetTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".ConsumeAssetTx" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "address"), + 15: .same(proto: "data"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.address) }() + case 15: try { try decoder.decodeSingularMessageField(value: &self._data) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + if !self.address.isEmpty { + try visitor.visitSingularStringField(value: self.address, fieldNumber: 1) + } + try { if let v = self._data { + try visitor.visitSingularMessageField(value: v, fieldNumber: 15) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Ocap_ConsumeAssetTx, rhs: Ocap_ConsumeAssetTx) -> Bool { + if lhs.address != rhs.address {return false} + if lhs._data != rhs._data {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + extension Ocap_CreateFactoryTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".CreateFactoryTx" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ @@ -3377,6 +3522,10 @@ extension Ocap_CreateFactoryTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImp public func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !_storage._name.isEmpty { try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) } @@ -3392,24 +3541,24 @@ extension Ocap_CreateFactoryTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImp if !_storage._trustedIssuers.isEmpty { try visitor.visitRepeatedStringField(value: _storage._trustedIssuers, fieldNumber: 5) } - if let v = _storage._input { + try { if let v = _storage._input { try visitor.visitSingularMessageField(value: v, fieldNumber: 6) - } - if let v = _storage._output { + } }() + try { if let v = _storage._output { try visitor.visitSingularMessageField(value: v, fieldNumber: 7) - } + } }() if !_storage._hooks.isEmpty { try visitor.visitRepeatedMessageField(value: _storage._hooks, fieldNumber: 8) } if !_storage._address.isEmpty { try visitor.visitSingularStringField(value: _storage._address, fieldNumber: 9) } - if let v = _storage._display { + try { if let v = _storage._display { try visitor.visitSingularMessageField(value: v, fieldNumber: 10) - } - if let v = _storage._data { + } }() + try { if let v = _storage._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 15) - } + } }() } try unknownFields.traverse(visitor: &visitor) } @@ -3472,6 +3621,10 @@ extension Ocap_StakeTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.address.isEmpty { try visitor.visitSingularStringField(value: self.address, fieldNumber: 1) } @@ -3493,9 +3646,9 @@ extension Ocap_StakeTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat if !self.slashers.isEmpty { try visitor.visitRepeatedStringField(value: self.slashers, fieldNumber: 7) } - if let v = self._data { + try { if let v = self._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 50) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -3536,15 +3689,19 @@ extension Ocap_RevokeStakeTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImple } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.address.isEmpty { try visitor.visitSingularStringField(value: self.address, fieldNumber: 1) } if !self.outputs.isEmpty { try visitor.visitRepeatedMessageField(value: self.outputs, fieldNumber: 2) } - if let v = self._data { + try { if let v = self._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 50) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -3580,15 +3737,19 @@ extension Ocap_ClaimStakeTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.address.isEmpty { try visitor.visitSingularStringField(value: self.address, fieldNumber: 1) } - if let v = self._evidence { + try { if let v = self._evidence { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } - if let v = self._data { + } }() + try { if let v = self._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 50) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -3626,6 +3787,10 @@ extension Ocap_SlashStakeTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.address.isEmpty { try visitor.visitSingularStringField(value: self.address, fieldNumber: 1) } @@ -3635,9 +3800,9 @@ extension Ocap_SlashStakeTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem if !self.message.isEmpty { try visitor.visitSingularStringField(value: self.message, fieldNumber: 3) } - if let v = self._data { + try { if let v = self._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 50) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -3656,6 +3821,7 @@ extension Ocap_CreateRollupTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImpl public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "address"), 2: .standard(proto: "token_address"), + 3: .standard(proto: "vault_address"), 4: .standard(proto: "contract_address"), 5: .standard(proto: "seed_validators"), 6: .standard(proto: "min_stake_amount"), @@ -3690,6 +3856,7 @@ extension Ocap_CreateRollupTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImpl fileprivate class _StorageClass { var _address: String = String() var _tokenAddress: String = String() + var _vaultAddress: String = String() var _contractAddress: String = String() var _seedValidators: [Ocap_RollupValidator] = [] var _minStakeAmount: String = String() @@ -3727,6 +3894,7 @@ extension Ocap_CreateRollupTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImpl init(copying source: _StorageClass) { _address = source._address _tokenAddress = source._tokenAddress + _vaultAddress = source._vaultAddress _contractAddress = source._contractAddress _seedValidators = source._seedValidators _minStakeAmount = source._minStakeAmount @@ -3776,6 +3944,7 @@ extension Ocap_CreateRollupTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImpl switch fieldNumber { case 1: try { try decoder.decodeSingularStringField(value: &_storage._address) }() case 2: try { try decoder.decodeSingularStringField(value: &_storage._tokenAddress) }() + case 3: try { try decoder.decodeSingularStringField(value: &_storage._vaultAddress) }() case 4: try { try decoder.decodeSingularStringField(value: &_storage._contractAddress) }() case 5: try { try decoder.decodeRepeatedMessageField(value: &_storage._seedValidators) }() case 6: try { try decoder.decodeSingularStringField(value: &_storage._minStakeAmount) }() @@ -3813,12 +3982,19 @@ extension Ocap_CreateRollupTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImpl public func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !_storage._address.isEmpty { try visitor.visitSingularStringField(value: _storage._address, fieldNumber: 1) } if !_storage._tokenAddress.isEmpty { try visitor.visitSingularStringField(value: _storage._tokenAddress, fieldNumber: 2) } + if !_storage._vaultAddress.isEmpty { + try visitor.visitSingularStringField(value: _storage._vaultAddress, fieldNumber: 3) + } if !_storage._contractAddress.isEmpty { try visitor.visitSingularStringField(value: _storage._contractAddress, fieldNumber: 4) } @@ -3903,9 +4079,9 @@ extension Ocap_CreateRollupTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImpl if _storage._publishSlashRate != 0 { try visitor.visitSingularUInt32Field(value: _storage._publishSlashRate, fieldNumber: 31) } - if let v = _storage._data { + try { if let v = _storage._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 50) - } + } }() } try unknownFields.traverse(visitor: &visitor) } @@ -3917,6 +4093,7 @@ extension Ocap_CreateRollupTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImpl let rhs_storage = _args.1 if _storage._address != rhs_storage._address {return false} if _storage._tokenAddress != rhs_storage._tokenAddress {return false} + if _storage._vaultAddress != rhs_storage._vaultAddress {return false} if _storage._contractAddress != rhs_storage._contractAddress {return false} if _storage._seedValidators != rhs_storage._seedValidators {return false} if _storage._minStakeAmount != rhs_storage._minStakeAmount {return false} @@ -4093,6 +4270,10 @@ extension Ocap_UpdateRollupTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImpl public func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !_storage._minStakeAmount.isEmpty { try visitor.visitSingularStringField(value: _storage._minStakeAmount, fieldNumber: 1) } @@ -4165,9 +4346,9 @@ extension Ocap_UpdateRollupTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImpl if !_storage._rollup.isEmpty { try visitor.visitSingularStringField(value: _storage._rollup, fieldNumber: 40) } - if let v = _storage._data { + try { if let v = _storage._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 50) - } + } }() } try unknownFields.traverse(visitor: &visitor) } @@ -4238,21 +4419,25 @@ extension Ocap_JoinRollupTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.rollup.isEmpty { try visitor.visitSingularStringField(value: self.rollup, fieldNumber: 1) } if !self.endpoint.isEmpty { try visitor.visitSingularStringField(value: self.endpoint, fieldNumber: 2) } - if let v = self._evidence { + try { if let v = self._evidence { try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } + } }() if !self.signatures.isEmpty { try visitor.visitRepeatedMessageField(value: self.signatures, fieldNumber: 4) } - if let v = self._data { + try { if let v = self._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 50) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -4292,18 +4477,22 @@ extension Ocap_LeaveRollupTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImple } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.rollup.isEmpty { try visitor.visitSingularStringField(value: self.rollup, fieldNumber: 1) } - if let v = self._evidence { + try { if let v = self._evidence { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() if !self.signatures.isEmpty { try visitor.visitRepeatedMessageField(value: self.signatures, fieldNumber: 3) } - if let v = self._data { + try { if let v = self._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 50) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -4330,6 +4519,7 @@ extension Ocap_CreateRollupBlockTx: SwiftProtobuf.Message, SwiftProtobuf._Messag 8: .same(proto: "signatures"), 10: .same(proto: "rollup"), 11: .standard(proto: "min_reward"), + 12: .same(proto: "governance"), 50: .same(proto: "data"), ] @@ -4349,6 +4539,7 @@ extension Ocap_CreateRollupBlockTx: SwiftProtobuf.Message, SwiftProtobuf._Messag case 8: try { try decoder.decodeRepeatedMessageField(value: &self.signatures) }() case 10: try { try decoder.decodeSingularStringField(value: &self.rollup) }() case 11: try { try decoder.decodeSingularStringField(value: &self.minReward) }() + case 12: try { try decoder.decodeSingularBoolField(value: &self.governance) }() case 50: try { try decoder.decodeSingularMessageField(value: &self._data) }() default: break } @@ -4356,6 +4547,10 @@ extension Ocap_CreateRollupBlockTx: SwiftProtobuf.Message, SwiftProtobuf._Messag } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.hash.isEmpty { try visitor.visitSingularStringField(value: self.hash, fieldNumber: 1) } @@ -4386,9 +4581,12 @@ extension Ocap_CreateRollupBlockTx: SwiftProtobuf.Message, SwiftProtobuf._Messag if !self.minReward.isEmpty { try visitor.visitSingularStringField(value: self.minReward, fieldNumber: 11) } - if let v = self._data { - try visitor.visitSingularMessageField(value: v, fieldNumber: 50) + if self.governance != false { + try visitor.visitSingularBoolField(value: self.governance, fieldNumber: 12) } + try { if let v = self._data { + try visitor.visitSingularMessageField(value: v, fieldNumber: 50) + } }() try unknownFields.traverse(visitor: &visitor) } @@ -4403,6 +4601,7 @@ extension Ocap_CreateRollupBlockTx: SwiftProtobuf.Message, SwiftProtobuf._Messag if lhs.signatures != rhs.signatures {return false} if lhs.rollup != rhs.rollup {return false} if lhs.minReward != rhs.minReward {return false} + if lhs.governance != rhs.governance {return false} if lhs._data != rhs._data {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true @@ -4438,6 +4637,10 @@ extension Ocap_ClaimBlockRewardTx: SwiftProtobuf.Message, SwiftProtobuf._Message } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.rollup.isEmpty { try visitor.visitSingularStringField(value: self.rollup, fieldNumber: 1) } @@ -4447,15 +4650,15 @@ extension Ocap_ClaimBlockRewardTx: SwiftProtobuf.Message, SwiftProtobuf._Message if !self.blockHash.isEmpty { try visitor.visitSingularStringField(value: self.blockHash, fieldNumber: 3) } - if let v = self._evidence { + try { if let v = self._evidence { try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - } + } }() if !self.publisher.isEmpty { try visitor.visitSingularStringField(value: self.publisher, fieldNumber: 5) } - if let v = self._data { + try { if let v = self._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 50) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -4492,12 +4695,16 @@ extension Ocap_PauseRollupTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImple } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.rollup.isEmpty { try visitor.visitSingularStringField(value: self.rollup, fieldNumber: 1) } - if let v = self._data { + try { if let v = self._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 10) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -4530,12 +4737,16 @@ extension Ocap_ResumeRollupTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImpl } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.rollup.isEmpty { try visitor.visitSingularStringField(value: self.rollup, fieldNumber: 1) } - if let v = self._data { + try { if let v = self._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 10) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -4547,11 +4758,11 @@ extension Ocap_ResumeRollupTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImpl } } -extension Ocap_MigrateRollupContractTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".MigrateRollupContractTx" +extension Ocap_CloseRollupTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".CloseRollupTx" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "rollup"), - 2: .same(proto: "to"), + 2: .same(proto: "message"), 10: .same(proto: "data"), ] @@ -4562,7 +4773,7 @@ extension Ocap_MigrateRollupContractTx: SwiftProtobuf.Message, SwiftProtobuf._Me // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularStringField(value: &self.rollup) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.to) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.message) }() case 10: try { try decoder.decodeSingularMessageField(value: &self._data) }() default: break } @@ -4570,34 +4781,38 @@ extension Ocap_MigrateRollupContractTx: SwiftProtobuf.Message, SwiftProtobuf._Me } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.rollup.isEmpty { try visitor.visitSingularStringField(value: self.rollup, fieldNumber: 1) } - if !self.to.isEmpty { - try visitor.visitSingularStringField(value: self.to, fieldNumber: 2) + if !self.message.isEmpty { + try visitor.visitSingularStringField(value: self.message, fieldNumber: 2) } - if let v = self._data { + try { if let v = self._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 10) - } + } }() try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Ocap_MigrateRollupContractTx, rhs: Ocap_MigrateRollupContractTx) -> Bool { + public static func ==(lhs: Ocap_CloseRollupTx, rhs: Ocap_CloseRollupTx) -> Bool { if lhs.rollup != rhs.rollup {return false} - if lhs.to != rhs.to {return false} + if lhs.message != rhs.message {return false} if lhs._data != rhs._data {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } -extension Ocap_MigrateRollupTokenTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".MigrateRollupTokenTx" +extension Ocap_MigrateRollupTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".MigrateRollupTx" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "rollup"), - 2: .same(proto: "from"), - 3: .same(proto: "to"), - 4: .same(proto: "token"), + 2: .same(proto: "to"), + 3: .same(proto: "type"), + 4: .same(proto: "message"), 10: .same(proto: "data"), ] @@ -4608,9 +4823,9 @@ extension Ocap_MigrateRollupTokenTx: SwiftProtobuf.Message, SwiftProtobuf._Messa // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularStringField(value: &self.rollup) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.from) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.to) }() - case 4: try { try decoder.decodeSingularMessageField(value: &self._token) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.to) }() + case 3: try { try decoder.decodeSingularStringField(value: &self.type) }() + case 4: try { try decoder.decodeSingularStringField(value: &self.message) }() case 10: try { try decoder.decodeSingularMessageField(value: &self._data) }() default: break } @@ -4618,29 +4833,33 @@ extension Ocap_MigrateRollupTokenTx: SwiftProtobuf.Message, SwiftProtobuf._Messa } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.rollup.isEmpty { try visitor.visitSingularStringField(value: self.rollup, fieldNumber: 1) } - if !self.from.isEmpty { - try visitor.visitSingularStringField(value: self.from, fieldNumber: 2) - } if !self.to.isEmpty { - try visitor.visitSingularStringField(value: self.to, fieldNumber: 3) + try visitor.visitSingularStringField(value: self.to, fieldNumber: 2) } - if let v = self._token { - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + if !self.type.isEmpty { + try visitor.visitSingularStringField(value: self.type, fieldNumber: 3) } - if let v = self._data { - try visitor.visitSingularMessageField(value: v, fieldNumber: 10) + if !self.message.isEmpty { + try visitor.visitSingularStringField(value: self.message, fieldNumber: 4) } + try { if let v = self._data { + try visitor.visitSingularMessageField(value: v, fieldNumber: 10) + } }() try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Ocap_MigrateRollupTokenTx, rhs: Ocap_MigrateRollupTokenTx) -> Bool { + public static func ==(lhs: Ocap_MigrateRollupTx, rhs: Ocap_MigrateRollupTx) -> Bool { if lhs.rollup != rhs.rollup {return false} - if lhs.from != rhs.from {return false} if lhs.to != rhs.to {return false} - if lhs._token != rhs._token {return false} + if lhs.type != rhs.type {return false} + if lhs.message != rhs.message {return false} if lhs._data != rhs._data {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true @@ -4678,27 +4897,31 @@ extension Ocap_DepositTokenV2Tx: SwiftProtobuf.Message, SwiftProtobuf._MessageIm } public func traverse(visitor: inout V) throws { - if let v = self._token { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._token { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } + } }() if !self.to.isEmpty { try visitor.visitSingularStringField(value: self.to, fieldNumber: 2) } if !self.proposer.isEmpty { try visitor.visitSingularStringField(value: self.proposer, fieldNumber: 3) } - if let v = self._evidence { + try { if let v = self._evidence { try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - } + } }() if !self.rollup.isEmpty { try visitor.visitSingularStringField(value: self.rollup, fieldNumber: 5) } if !self.actualFee.isEmpty { try visitor.visitSingularStringField(value: self.actualFee, fieldNumber: 7) } - if let v = self._data { + try { if let v = self._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 15) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -4746,9 +4969,13 @@ extension Ocap_WithdrawTokenV2Tx: SwiftProtobuf.Message, SwiftProtobuf._MessageI } public func traverse(visitor: inout V) throws { - if let v = self._token { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._token { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } + } }() if !self.to.isEmpty { try visitor.visitSingularStringField(value: self.to, fieldNumber: 2) } @@ -4764,9 +4991,9 @@ extension Ocap_WithdrawTokenV2Tx: SwiftProtobuf.Message, SwiftProtobuf._MessageI if !self.actualFee.isEmpty { try visitor.visitSingularStringField(value: self.actualFee, fieldNumber: 7) } - if let v = self._data { + try { if let v = self._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 15) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -4792,6 +5019,7 @@ extension Ocap_ItxStub: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat 4: .standard(proto: "account_migrate"), 5: .standard(proto: "create_asset"), 6: .standard(proto: "update_asset"), + 7: .standard(proto: "consume_asset"), 10: .same(proto: "exchange"), 12: .standard(proto: "exchange_v2"), 13: .same(proto: "transfer"), @@ -4817,8 +5045,8 @@ extension Ocap_ItxStub: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat 55: .standard(proto: "claim_block_reward"), 56: .standard(proto: "pause_rollup"), 57: .standard(proto: "resume_rollup"), - 58: .standard(proto: "migrate_rollup_contract"), - 59: .standard(proto: "migrate_rollup_token"), + 58: .standard(proto: "migrate_rollup"), + 60: .standard(proto: "close_rollup"), ] public mutating func decodeMessage(decoder: inout D) throws { @@ -4829,300 +5057,445 @@ extension Ocap_ItxStub: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat switch fieldNumber { case 1: try { var v: Ocap_DeclareTx? + var hadOneofValue = false if let current = self.value { - try decoder.handleConflictingOneOf() + hadOneofValue = true if case .declare(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) - if let v = v {self.value = .declare(v)} + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .declare(v) + } }() case 2: try { var v: Ocap_DelegateTx? + var hadOneofValue = false if let current = self.value { - try decoder.handleConflictingOneOf() + hadOneofValue = true if case .delegate(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) - if let v = v {self.value = .delegate(v)} + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .delegate(v) + } }() case 3: try { var v: Ocap_RevokeDelegateTx? + var hadOneofValue = false if let current = self.value { - try decoder.handleConflictingOneOf() + hadOneofValue = true if case .revokeDelegate(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) - if let v = v {self.value = .revokeDelegate(v)} + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .revokeDelegate(v) + } }() case 4: try { var v: Ocap_AccountMigrateTx? + var hadOneofValue = false if let current = self.value { - try decoder.handleConflictingOneOf() + hadOneofValue = true if case .accountMigrate(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) - if let v = v {self.value = .accountMigrate(v)} + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .accountMigrate(v) + } }() case 5: try { var v: Ocap_CreateAssetTx? + var hadOneofValue = false if let current = self.value { - try decoder.handleConflictingOneOf() + hadOneofValue = true if case .createAsset(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) - if let v = v {self.value = .createAsset(v)} + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .createAsset(v) + } }() case 6: try { var v: Ocap_UpdateAssetTx? + var hadOneofValue = false if let current = self.value { - try decoder.handleConflictingOneOf() + hadOneofValue = true if case .updateAsset(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) - if let v = v {self.value = .updateAsset(v)} + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .updateAsset(v) + } + }() + case 7: try { + var v: Ocap_ConsumeAssetTx? + var hadOneofValue = false + if let current = self.value { + hadOneofValue = true + if case .consumeAsset(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .consumeAsset(v) + } }() case 10: try { var v: Ocap_ExchangeTx? + var hadOneofValue = false if let current = self.value { - try decoder.handleConflictingOneOf() + hadOneofValue = true if case .exchange(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) - if let v = v {self.value = .exchange(v)} + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .exchange(v) + } }() case 12: try { var v: Ocap_ExchangeV2Tx? + var hadOneofValue = false if let current = self.value { - try decoder.handleConflictingOneOf() + hadOneofValue = true if case .exchangeV2(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) - if let v = v {self.value = .exchangeV2(v)} + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .exchangeV2(v) + } }() case 13: try { var v: Ocap_TransferTx? + var hadOneofValue = false if let current = self.value { - try decoder.handleConflictingOneOf() + hadOneofValue = true if case .transfer(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) - if let v = v {self.value = .transfer(v)} + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .transfer(v) + } }() case 14: try { var v: Ocap_TransferV2Tx? + var hadOneofValue = false if let current = self.value { - try decoder.handleConflictingOneOf() + hadOneofValue = true if case .transferV2(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) - if let v = v {self.value = .transferV2(v)} + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .transferV2(v) + } }() case 15: try { var v: Ocap_TransferV3Tx? + var hadOneofValue = false if let current = self.value { - try decoder.handleConflictingOneOf() + hadOneofValue = true if case .transferV3(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) - if let v = v {self.value = .transferV3(v)} + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .transferV3(v) + } }() case 20: try { var v: Ocap_CreateTokenTx? + var hadOneofValue = false if let current = self.value { - try decoder.handleConflictingOneOf() + hadOneofValue = true if case .createToken(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) - if let v = v {self.value = .createToken(v)} + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .createToken(v) + } }() case 21: try { var v: Ocap_DepositTokenV2Tx? + var hadOneofValue = false if let current = self.value { - try decoder.handleConflictingOneOf() + hadOneofValue = true if case .depositToken(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) - if let v = v {self.value = .depositToken(v)} + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .depositToken(v) + } }() case 22: try { var v: Ocap_WithdrawTokenV2Tx? + var hadOneofValue = false if let current = self.value { - try decoder.handleConflictingOneOf() + hadOneofValue = true if case .withdrawToken(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) - if let v = v {self.value = .withdrawToken(v)} + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .withdrawToken(v) + } }() case 30: try { var v: Ocap_CreateFactoryTx? + var hadOneofValue = false if let current = self.value { - try decoder.handleConflictingOneOf() + hadOneofValue = true if case .createFactory(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) - if let v = v {self.value = .createFactory(v)} + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .createFactory(v) + } }() case 31: try { var v: Ocap_AcquireAssetV2Tx? + var hadOneofValue = false if let current = self.value { - try decoder.handleConflictingOneOf() + hadOneofValue = true if case .acquireAssetV2(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) - if let v = v {self.value = .acquireAssetV2(v)} + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .acquireAssetV2(v) + } }() case 32: try { var v: Ocap_AcquireAssetV3Tx? + var hadOneofValue = false if let current = self.value { - try decoder.handleConflictingOneOf() + hadOneofValue = true if case .acquireAssetV3(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) - if let v = v {self.value = .acquireAssetV3(v)} + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .acquireAssetV3(v) + } }() case 33: try { var v: Ocap_MintAssetTx? + var hadOneofValue = false if let current = self.value { - try decoder.handleConflictingOneOf() + hadOneofValue = true if case .mintAsset(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) - if let v = v {self.value = .mintAsset(v)} + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .mintAsset(v) + } }() case 40: try { var v: Ocap_StakeTx? + var hadOneofValue = false if let current = self.value { - try decoder.handleConflictingOneOf() + hadOneofValue = true if case .stake(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) - if let v = v {self.value = .stake(v)} + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .stake(v) + } }() case 41: try { var v: Ocap_RevokeStakeTx? + var hadOneofValue = false if let current = self.value { - try decoder.handleConflictingOneOf() + hadOneofValue = true if case .revokeStake(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) - if let v = v {self.value = .revokeStake(v)} + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .revokeStake(v) + } }() case 42: try { var v: Ocap_ClaimStakeTx? + var hadOneofValue = false if let current = self.value { - try decoder.handleConflictingOneOf() + hadOneofValue = true if case .claimStake(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) - if let v = v {self.value = .claimStake(v)} + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .claimStake(v) + } }() case 43: try { var v: Ocap_SlashStakeTx? + var hadOneofValue = false if let current = self.value { - try decoder.handleConflictingOneOf() + hadOneofValue = true if case .slashStake(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) - if let v = v {self.value = .slashStake(v)} + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .slashStake(v) + } }() case 49: try { var v: Ocap_UpgradeNodeTx? + var hadOneofValue = false if let current = self.value { - try decoder.handleConflictingOneOf() + hadOneofValue = true if case .upgradeNode(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) - if let v = v {self.value = .upgradeNode(v)} + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .upgradeNode(v) + } }() case 50: try { var v: Ocap_CreateRollupTx? + var hadOneofValue = false if let current = self.value { - try decoder.handleConflictingOneOf() + hadOneofValue = true if case .createRollup(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) - if let v = v {self.value = .createRollup(v)} + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .createRollup(v) + } }() case 51: try { var v: Ocap_UpdateRollupTx? + var hadOneofValue = false if let current = self.value { - try decoder.handleConflictingOneOf() + hadOneofValue = true if case .updateRollup(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) - if let v = v {self.value = .updateRollup(v)} + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .updateRollup(v) + } }() case 52: try { var v: Ocap_JoinRollupTx? + var hadOneofValue = false if let current = self.value { - try decoder.handleConflictingOneOf() + hadOneofValue = true if case .joinRollup(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) - if let v = v {self.value = .joinRollup(v)} + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .joinRollup(v) + } }() case 53: try { var v: Ocap_LeaveRollupTx? + var hadOneofValue = false if let current = self.value { - try decoder.handleConflictingOneOf() + hadOneofValue = true if case .leaveRollup(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) - if let v = v {self.value = .leaveRollup(v)} + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .leaveRollup(v) + } }() case 54: try { var v: Ocap_CreateRollupBlockTx? + var hadOneofValue = false if let current = self.value { - try decoder.handleConflictingOneOf() + hadOneofValue = true if case .createRollupBlock(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) - if let v = v {self.value = .createRollupBlock(v)} + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .createRollupBlock(v) + } }() case 55: try { var v: Ocap_ClaimBlockRewardTx? + var hadOneofValue = false if let current = self.value { - try decoder.handleConflictingOneOf() + hadOneofValue = true if case .claimBlockReward(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) - if let v = v {self.value = .claimBlockReward(v)} + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .claimBlockReward(v) + } }() case 56: try { var v: Ocap_PauseRollupTx? + var hadOneofValue = false if let current = self.value { - try decoder.handleConflictingOneOf() + hadOneofValue = true if case .pauseRollup(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) - if let v = v {self.value = .pauseRollup(v)} + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .pauseRollup(v) + } }() case 57: try { var v: Ocap_ResumeRollupTx? + var hadOneofValue = false if let current = self.value { - try decoder.handleConflictingOneOf() + hadOneofValue = true if case .resumeRollup(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) - if let v = v {self.value = .resumeRollup(v)} + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .resumeRollup(v) + } }() case 58: try { - var v: Ocap_MigrateRollupContractTx? + var v: Ocap_MigrateRollupTx? + var hadOneofValue = false if let current = self.value { - try decoder.handleConflictingOneOf() - if case .migrateRollupContract(let m) = current {v = m} + hadOneofValue = true + if case .migrateRollup(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) - if let v = v {self.value = .migrateRollupContract(v)} + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .migrateRollup(v) + } }() - case 59: try { - var v: Ocap_MigrateRollupTokenTx? + case 60: try { + var v: Ocap_CloseRollupTx? + var hadOneofValue = false if let current = self.value { - try decoder.handleConflictingOneOf() - if case .migrateRollupToken(let m) = current {v = m} + hadOneofValue = true + if case .closeRollup(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) - if let v = v {self.value = .migrateRollupToken(v)} + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.value = .closeRollup(v) + } }() default: break } @@ -5131,8 +5504,9 @@ extension Ocap_ItxStub: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 switch self.value { case .declare?: try { guard case .declare(let v)? = self.value else { preconditionFailure() } @@ -5158,6 +5532,10 @@ extension Ocap_ItxStub: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat guard case .updateAsset(let v)? = self.value else { preconditionFailure() } try visitor.visitSingularMessageField(value: v, fieldNumber: 6) }() + case .consumeAsset?: try { + guard case .consumeAsset(let v)? = self.value else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 7) + }() case .exchange?: try { guard case .exchange(let v)? = self.value else { preconditionFailure() } try visitor.visitSingularMessageField(value: v, fieldNumber: 10) @@ -5258,13 +5636,13 @@ extension Ocap_ItxStub: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat guard case .resumeRollup(let v)? = self.value else { preconditionFailure() } try visitor.visitSingularMessageField(value: v, fieldNumber: 57) }() - case .migrateRollupContract?: try { - guard case .migrateRollupContract(let v)? = self.value else { preconditionFailure() } + case .migrateRollup?: try { + guard case .migrateRollup(let v)? = self.value else { preconditionFailure() } try visitor.visitSingularMessageField(value: v, fieldNumber: 58) }() - case .migrateRollupToken?: try { - guard case .migrateRollupToken(let v)? = self.value else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 59) + case .closeRollup?: try { + guard case .closeRollup(let v)? = self.value else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 60) }() case nil: break } diff --git a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/tx.proto b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/tx.proto index 029dca48..0da8c3ac 100644 --- a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/tx.proto +++ b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/tx.proto @@ -259,6 +259,11 @@ message UpdateAssetTx { // ocap won't update data into state if app is interested in this tx. google.protobuf.Any data = 15; } +message ConsumeAssetTx { + string address = 1; + // ocap won't update data into state if app is interested in this tx. + google.protobuf.Any data = 15; +} // An asset factory is readonly by default // Thus any change to the factory result a new factory message CreateFactoryTx { @@ -368,9 +373,12 @@ message SlashStakeTx { message CreateRollupTx { string address = 1; - // can be token or factory adddress + // can be token or factory address string token_address = 2; + // vault to store locked token + string vault_address = 3; + // string erc20_token_address = 3; // deprecated string contract_address = 4; @@ -526,6 +534,9 @@ message CreateRollupBlockTx { // Added since v1.13.61 string min_reward = 11; + // Added since v1.18.32 + bool governance = 12; + google.protobuf.Any data = 50; } message ClaimBlockRewardTx { @@ -551,21 +562,21 @@ message ResumeRollupTx { string rollup = 1; google.protobuf.Any data = 10; } -message MigrateRollupContractTx { +message CloseRollupTx { string rollup = 1; - string to = 2; + string message = 2; google.protobuf.Any data = 10; } -message MigrateRollupTokenTx { +message MigrateRollupTx { string rollup = 1; - string from = 2; // from which contract - string to = 3; // to which contract, must points to latest contract address - TokenInput token = 4; // token address and amount to migrate + string to = 2; + string type = 3; + string message = 4; google.protobuf.Any data = 10; } message DepositTokenV2Tx { // Should be a multi-signed transaction - // Submited by user, signed by rollup validators + // Submitted by user, signed by rollup validators TokenInput token = 1; // token address and amount to deposit string to = 2; // address to deposit token to, should be same as tx.from string proposer = 3; // the rollup validator that pays for this deposit, other validators exists in tx.signatures @@ -603,6 +614,7 @@ message ItxStub { // Assets CreateAssetTx create_asset = 5; UpdateAssetTx update_asset = 6; + ConsumeAssetTx consume_asset = 7; // Trade ExchangeTx exchange = 10; @@ -638,7 +650,7 @@ message ItxStub { ClaimBlockRewardTx claim_block_reward = 55; PauseRollupTx pause_rollup = 56; ResumeRollupTx resume_rollup = 57; - MigrateRollupContractTx migrate_rollup_contract = 58; - MigrateRollupTokenTx migrate_rollup_token = 59; + MigrateRollupTx migrate_rollup = 58; + CloseRollupTx close_rollup = 60; } } diff --git a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/type.pb.swift b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/type.pb.swift index aad8ed15..18059150 100644 --- a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/type.pb.swift +++ b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/type.pb.swift @@ -1777,9 +1777,13 @@ extension Ocap_WalletInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen } public func traverse(visitor: inout V) throws { - if let v = self._type { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._type { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } + } }() if !self.sk.isEmpty { try visitor.visitSingularBytesField(value: self.sk, fieldNumber: 2) } @@ -1849,6 +1853,10 @@ extension Ocap_ChainInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.id.isEmpty { try visitor.visitSingularStringField(value: self.id, fieldNumber: 1) } @@ -1873,9 +1881,9 @@ extension Ocap_ChainInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement if !self.blockHeight.isEmpty { try visitor.visitSingularStringField(value: self.blockHeight, fieldNumber: 8) } - if let v = self._blockTime { + try { if let v = self._blockTime { try visitor.visitSingularMessageField(value: v, fieldNumber: 9) - } + } }() if !self.address.isEmpty { try visitor.visitSingularStringField(value: self.address, fieldNumber: 10) } @@ -2028,6 +2036,10 @@ extension Ocap_NodeInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa public func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !_storage._id.isEmpty { try visitor.visitSingularStringField(value: _storage._id, fieldNumber: 1) } @@ -2052,9 +2064,9 @@ extension Ocap_NodeInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa if !_storage._blockHeight.isEmpty { try visitor.visitSingularStringField(value: _storage._blockHeight, fieldNumber: 8) } - if let v = _storage._blockTime { + try { if let v = _storage._blockTime { try visitor.visitSingularMessageField(value: v, fieldNumber: 9) - } + } }() if !_storage._address.isEmpty { try visitor.visitSingularStringField(value: _storage._address, fieldNumber: 10) } @@ -2076,9 +2088,9 @@ extension Ocap_NodeInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa if !_storage._ip.isEmpty { try visitor.visitSingularStringField(value: _storage._ip, fieldNumber: 17) } - if let v = _storage._geoInfo { + try { if let v = _storage._geoInfo { try visitor.visitSingularMessageField(value: v, fieldNumber: 18) - } + } }() if !_storage._p2PAddress.isEmpty { try visitor.visitSingularStringField(value: _storage._p2PAddress, fieldNumber: 19) } @@ -2333,6 +2345,10 @@ extension Ocap_Multisig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.signer.isEmpty { try visitor.visitSingularStringField(value: self.signer, fieldNumber: 1) } @@ -2345,9 +2361,9 @@ extension Ocap_Multisig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa if !self.delegator.isEmpty { try visitor.visitSingularStringField(value: self.delegator, fieldNumber: 4) } - if let v = self._data { + try { if let v = self._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 15) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -2401,6 +2417,10 @@ extension Ocap_Transaction: SwiftProtobuf.Message, SwiftProtobuf._MessageImpleme } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.from.isEmpty { try visitor.visitSingularStringField(value: self.from, fieldNumber: 1) } @@ -2425,9 +2445,9 @@ extension Ocap_Transaction: SwiftProtobuf.Message, SwiftProtobuf._MessageImpleme if !self.signatures.isEmpty { try visitor.visitRepeatedMessageField(value: self.signatures, fieldNumber: 14) } - if let v = self._itx { + try { if let v = self._itx { try visitor.visitSingularMessageField(value: v, fieldNumber: 15) - } + } }() if !self.receipts.isEmpty { try visitor.visitRepeatedMessageField(value: self.receipts, fieldNumber: 16) } @@ -2536,9 +2556,13 @@ extension Ocap_TransactionInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImp public func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - if let v = _storage._tx { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = _storage._tx { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } + } }() if !_storage._height.isEmpty { try visitor.visitSingularStringField(value: _storage._height, fieldNumber: 2) } @@ -2554,9 +2578,9 @@ extension Ocap_TransactionInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImp if _storage._code != .ok { try visitor.visitSingularEnumField(value: _storage._code, fieldNumber: 6) } - if let v = _storage._time { + try { if let v = _storage._time { try visitor.visitSingularMessageField(value: v, fieldNumber: 7) - } + } }() if !_storage._receipts.isEmpty { try visitor.visitRepeatedMessageField(value: _storage._receipts, fieldNumber: 8) } @@ -3029,6 +3053,10 @@ extension Ocap_TransactionConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageI } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.maxAssetSize != 0 { try visitor.visitSingularUInt32Field(value: self.maxAssetSize, fieldNumber: 1) } @@ -3038,15 +3066,15 @@ extension Ocap_TransactionConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageI if self.maxMultisig != 0 { try visitor.visitSingularUInt32Field(value: self.maxMultisig, fieldNumber: 3) } - if let v = self._delegate { + try { if let v = self._delegate { try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - } + } }() if !self.txFee.isEmpty { try visitor.visitRepeatedMessageField(value: self.txFee, fieldNumber: 5) } - if let v = self._txGas { + try { if let v = self._txGas { try visitor.visitSingularMessageField(value: v, fieldNumber: 6) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -3176,15 +3204,19 @@ extension Ocap_BlockInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement public func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !_storage._height.isEmpty { try visitor.visitSingularStringField(value: _storage._height, fieldNumber: 1) } if _storage._numTxs != 0 { try visitor.visitSingularUInt32Field(value: _storage._numTxs, fieldNumber: 2) } - if let v = _storage._time { + try { if let v = _storage._time { try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } + } }() if !_storage._appHash.isEmpty { try visitor.visitSingularBytesField(value: _storage._appHash, fieldNumber: 4) } @@ -3227,12 +3259,12 @@ extension Ocap_BlockInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement if !_storage._validatorsHash.isEmpty { try visitor.visitSingularBytesField(value: _storage._validatorsHash, fieldNumber: 17) } - if let v = _storage._version { + try { if let v = _storage._version { try visitor.visitSingularMessageField(value: v, fieldNumber: 18) - } - if let v = _storage._lastBlockID { + } }() + try { if let v = _storage._lastBlockID { try visitor.visitSingularMessageField(value: v, fieldNumber: 19) - } + } }() } try unknownFields.traverse(visitor: &visitor) } @@ -3376,15 +3408,19 @@ extension Ocap_BlockInfoSimple: SwiftProtobuf.Message, SwiftProtobuf._MessageImp public func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !_storage._height.isEmpty { try visitor.visitSingularStringField(value: _storage._height, fieldNumber: 1) } if _storage._numTxs != 0 { try visitor.visitSingularUInt32Field(value: _storage._numTxs, fieldNumber: 2) } - if let v = _storage._time { + try { if let v = _storage._time { try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } + } }() if !_storage._appHash.isEmpty { try visitor.visitSingularBytesField(value: _storage._appHash, fieldNumber: 4) } @@ -3421,12 +3457,12 @@ extension Ocap_BlockInfoSimple: SwiftProtobuf.Message, SwiftProtobuf._MessageImp if !_storage._validatorsHash.isEmpty { try visitor.visitSingularBytesField(value: _storage._validatorsHash, fieldNumber: 15) } - if let v = _storage._version { + try { if let v = _storage._version { try visitor.visitSingularMessageField(value: v, fieldNumber: 16) - } - if let v = _storage._lastBlockID { + } }() + try { if let v = _storage._lastBlockID { try visitor.visitSingularMessageField(value: v, fieldNumber: 17) - } + } }() } try unknownFields.traverse(visitor: &visitor) } @@ -3487,18 +3523,22 @@ extension Ocap_StateContext: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.genesisTx.isEmpty { try visitor.visitSingularStringField(value: self.genesisTx, fieldNumber: 1) } if !self.renaissanceTx.isEmpty { try visitor.visitSingularStringField(value: self.renaissanceTx, fieldNumber: 2) } - if let v = self._genesisTime { + try { if let v = self._genesisTime { try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } - if let v = self._renaissanceTime { + } }() + try { if let v = self._renaissanceTime { try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -3535,15 +3575,19 @@ extension Ocap_StakeSummary: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem } public func traverse(visitor: inout V) throws { - if let v = self._totalStakes { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._totalStakes { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } - if let v = self._totalUnstakes { + } }() + try { if let v = self._totalUnstakes { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } - if let v = self._context { + } }() + try { if let v = self._context { try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -3723,6 +3767,10 @@ extension Ocap_PeerInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.id.isEmpty { try visitor.visitSingularStringField(value: self.id, fieldNumber: 1) } @@ -3738,9 +3786,9 @@ extension Ocap_PeerInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa if !self.ip.isEmpty { try visitor.visitSingularStringField(value: self.ip, fieldNumber: 5) } - if let v = self._geoInfo { + try { if let v = self._geoInfo { try visitor.visitSingularMessageField(value: v, fieldNumber: 6) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -3823,12 +3871,16 @@ extension Ocap_ValidatorInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImple } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.address.isEmpty { try visitor.visitSingularStringField(value: self.address, fieldNumber: 1) } - if let v = self._pubKey { + try { if let v = self._pubKey { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() if !self.votingPower.isEmpty { try visitor.visitSingularStringField(value: self.votingPower, fieldNumber: 3) } @@ -3838,9 +3890,9 @@ extension Ocap_ValidatorInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImple if !self.name.isEmpty { try visitor.visitSingularStringField(value: self.name, fieldNumber: 5) } - if let v = self._geoInfo { + try { if let v = self._geoInfo { try visitor.visitSingularMessageField(value: v, fieldNumber: 6) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -4001,12 +4053,16 @@ extension Ocap_WithdrawItem: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.hash.isEmpty { try visitor.visitSingularStringField(value: self.hash, fieldNumber: 1) } - if let v = self._value { + try { if let v = self._value { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -4041,15 +4097,19 @@ extension Ocap_AccountConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImple } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.address.isEmpty { try visitor.visitSingularStringField(value: self.address, fieldNumber: 1) } if !self.pk.isEmpty { try visitor.visitSingularBytesField(value: self.pk, fieldNumber: 2) } - if let v = self._balance { + try { if let v = self._balance { try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } + } }() try unknownFields.traverse(visitor: &visitor) } diff --git a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/vendor.pb.swift b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/vendor.pb.swift index 96ccb3a4..3b86b9f3 100644 --- a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/vendor.pb.swift +++ b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/vendor.pb.swift @@ -633,15 +633,19 @@ extension Vendor_ConsensusParams: SwiftProtobuf.Message, SwiftProtobuf._MessageI } public func traverse(visitor: inout V) throws { - if let v = self._block { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._block { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } - if let v = self._evidence { + } }() + try { if let v = self._evidence { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } - if let v = self._validator { + } }() + try { if let v = self._validator { try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -751,12 +755,16 @@ extension Vendor_BlockID: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.hash.isEmpty { try visitor.visitSingularBytesField(value: self.hash, fieldNumber: 1) } - if let v = self._partsHeader { + try { if let v = self._partsHeader { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -865,9 +873,13 @@ extension Vendor_ValidatorUpdate: SwiftProtobuf.Message, SwiftProtobuf._MessageI } public func traverse(visitor: inout V) throws { - if let v = self._pubKey { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._pubKey { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } + } }() if self.power != 0 { try visitor.visitSingularInt64Field(value: self.power, fieldNumber: 2) } @@ -903,9 +915,13 @@ extension Vendor_VoteInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen } public func traverse(visitor: inout V) throws { - if let v = self._validator { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._validator { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } + } }() if self.signedLastBlock != false { try visitor.visitSingularBoolField(value: self.signedLastBlock, fieldNumber: 2) } @@ -985,18 +1001,22 @@ extension Vendor_Evidence: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.type.isEmpty { try visitor.visitSingularStringField(value: self.type, fieldNumber: 1) } - if let v = self._validator { + try { if let v = self._validator { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() if self.height != 0 { try visitor.visitSingularInt64Field(value: self.height, fieldNumber: 3) } - if let v = self._time { + try { if let v = self._time { try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - } + } }() if self.totalVotingPower != 0 { try visitor.visitSingularInt64Field(value: self.totalVotingPower, fieldNumber: 5) } @@ -1116,27 +1136,31 @@ extension Vendor_Header: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa public func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - if let v = _storage._version { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = _storage._version { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } + } }() if !_storage._chainID.isEmpty { try visitor.visitSingularStringField(value: _storage._chainID, fieldNumber: 2) } if _storage._height != 0 { try visitor.visitSingularInt64Field(value: _storage._height, fieldNumber: 3) } - if let v = _storage._time { + try { if let v = _storage._time { try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - } + } }() if _storage._numTxs != 0 { try visitor.visitSingularInt64Field(value: _storage._numTxs, fieldNumber: 5) } if _storage._totalTxs != 0 { try visitor.visitSingularInt64Field(value: _storage._totalTxs, fieldNumber: 6) } - if let v = _storage._lastBlockID { + try { if let v = _storage._lastBlockID { try visitor.visitSingularMessageField(value: v, fieldNumber: 7) - } + } }() if !_storage._lastCommitHash.isEmpty { try visitor.visitSingularBytesField(value: _storage._lastCommitHash, fieldNumber: 8) } @@ -1223,15 +1247,19 @@ extension Vendor_RequestBeginBlock: SwiftProtobuf.Message, SwiftProtobuf._Messag } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.hash.isEmpty { try visitor.visitSingularBytesField(value: self.hash, fieldNumber: 1) } - if let v = self._header { + try { if let v = self._header { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } - if let v = self._lastCommitInfo { + } }() + try { if let v = self._lastCommitInfo { try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } + } }() if !self.byzantineValidators.isEmpty { try visitor.visitRepeatedMessageField(value: self.byzantineValidators, fieldNumber: 4) } From 8f0cc16bee5f053f53292fbe003f4dd0ad9fd788 Mon Sep 17 00:00:00 2001 From: DavidYu <654070281@qq.com> Date: Tue, 21 Feb 2023 10:35:07 +0800 Subject: [PATCH 2/2] bump version --- .jazzy.yaml | 2 +- ArcBlockSDK.podspec | 2 +- CHANGELOG.md | 5 +++++ version | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.jazzy.yaml b/.jazzy.yaml index 10748215..a13fb29b 100644 --- a/.jazzy.yaml +++ b/.jazzy.yaml @@ -10,4 +10,4 @@ github_url: https://github.com/ArcBlock/arcblock-ios-sdk github_file_prefix: https://github.com/ArcBlock/arcblock-ios-sdk/tree/master exclude: - ArcBlockSDK/ABSDKCoreKit/Network/ABSDKPagination.swift -module_version: 0.11.37 +module_version: 0.11.38 diff --git a/ArcBlockSDK.podspec b/ArcBlockSDK.podspec index e79e2da7..58296884 100644 --- a/ArcBlockSDK.podspec +++ b/ArcBlockSDK.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'ArcBlockSDK' - s.version = '0.11.37' + s.version = '0.11.38' s.summary = 'Used to integrate iOS apps with ArcBlock Platform.' # This description is used to generate tags and improve search results. diff --git a/CHANGELOG.md b/CHANGELOG.md index 247224b8..b905d943 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.11.38 (February 21, 2023) + - update protobuf + - Merge pull request #113 from ArcBlock/base58-fix + - Merge pull request #112 from ArcBlock/base58-fix + ## 0.11.37 (February 15, 2023) - support aes & rsa - Merge pull request #112 from ArcBlock/base58-fix diff --git a/version b/version index 0f148f9d..0c54b313 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.11.37 +0.11.38