This repository was archived by the owner on Dec 15, 2023. It is now read-only.
File tree 1 file changed +34
-5
lines changed
Web3Swift/TransactionBytes
1 file changed +34
-5
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,40 @@ public final class EthContractCallBytes: BytesScalar {
66
66
contractAddress: BytesScalar ,
67
67
weiAmount: BytesScalar ,
68
68
functionCall: BytesScalar
69
+ ) {
70
+ let gasPrice = CachedBytes (
71
+ origin: EthGasPrice (
72
+ network: network
73
+ )
74
+ )
75
+ self . init (
76
+ network: network,
77
+ gasPrice: gasPrice,
78
+ senderKey: senderKey,
79
+ contractAddress: contractAddress,
80
+ weiAmount: weiAmount,
81
+ functionCall: functionCall
82
+ )
83
+ }
84
+
85
+ /**
86
+ Ctor
87
+
88
+ - parameters:
89
+ - network: network where transaction is to be deployed
90
+ - gasPrice: gas price in Wei
91
+ - senderKey: private key of a sender
92
+ - contractAddress: address of the recipient contract
93
+ - weiAmount: amount to be sent in wei
94
+ - functionCall: encoded function call
95
+ */
96
+ public convenience init (
97
+ network: Network ,
98
+ gasPrice: BytesScalar ,
99
+ senderKey: PrivateKey ,
100
+ contractAddress: BytesScalar ,
101
+ weiAmount: BytesScalar ,
102
+ functionCall: BytesScalar
69
103
) {
70
104
let senderAddress = CachedBytes (
71
105
origin: SimpleBytes {
@@ -75,11 +109,6 @@ public final class EthContractCallBytes: BytesScalar {
75
109
let contractAddress = CachedBytes (
76
110
origin: contractAddress
77
111
)
78
- let gasPrice = CachedBytes (
79
- origin: EthGasPrice (
80
- network: network
81
- )
82
- )
83
112
let functionCall = CachedBytes (
84
113
origin: functionCall
85
114
)
You can’t perform that action at this time.
0 commit comments