@@ -110,6 +110,20 @@ public protocol AbstractEnvelope: CustomStringConvertible { // possibly add Coda
110
110
111
111
// pseudo memberwise initializer
112
112
// accepts all common parameters (full description with default implementation below)
113
+ // Note the `nil` parameters, even though non-optional in the struct, are there to allow
114
+ // fallback to pulling the value from `options`. If options also does not have a value, a suitable default is used
115
+ // precedence is as follows: direct parameter > options value > default value
116
+ /// Default memberwse initializer that all envelopes must support
117
+ /// - Parameters:
118
+ /// - to: EthereumAddress of destination
119
+ /// - nonce: nonce for the transaction
120
+ /// - chainID: chainId of the network the transaction belongs to
121
+ /// - value: Native value in Wei of the transaction
122
+ /// - data: Payload data for the transaction
123
+ /// - v: Signature V component
124
+ /// - r: Signature R component
125
+ /// - s: Signature S component
126
+ /// - options: TransactionOptions struct containing any other required parameters
113
127
init ( to: EthereumAddress , nonce: BigUInt ? , chainID: BigUInt ? , value: BigUInt ? ,
114
128
data: Data , v: BigUInt , r: BigUInt , s: BigUInt , options: TransactionOptions ? )
115
129
@@ -149,29 +163,6 @@ public protocol AbstractEnvelope: CustomStringConvertible { // possibly add Coda
149
163
150
164
public extension AbstractEnvelope {
151
165
152
- // MARK: default implementation, should be overridden by each Envelope implementation
153
- // Note the `nil` parameters, even though non-optional in the struct, are there to allow
154
- // fallback to pulling the value from `options`. If options also does not have a value, a suitable default is used
155
- // precedence is as follows: direct parameter > options value > default value
156
- /// Default memberwse initializer that all envelopes must support
157
- /// - Parameters:
158
- /// - to: EthereumAddress of destination
159
- /// - nonce: nonce for the transaction
160
- /// - chainID: chainId of the network the transaction belongs to
161
- /// - value: Native value in Wei of the transaction
162
- /// - data: Payload data for the transaction
163
- /// - v: Signature V component
164
- /// - r: Signature R component
165
- /// - s: Signature S component
166
- /// - options: TransactionOptions struct containing any other required parameters
167
- init ( to: EthereumAddress , nonce: BigUInt ? = nil ,
168
- chainID: BigUInt ? = nil , value: BigUInt ? = nil , data: Data ,
169
- v: BigUInt = 1 , r: BigUInt = 0 , s: BigUInt = 0 ,
170
- options: TransactionOptions ? = nil ) {
171
- self . init ( to: to, nonce: nonce, chainID: chainID, value: value,
172
- data: data, v: v, r: r, s: s, options: options)
173
- }
174
-
175
166
mutating func clearSignatureData( ) {
176
167
self . v = 1
177
168
self . r = 0
0 commit comments