Skip to content

Commit 7ea58df

Browse files
committed
Fix security token
1 parent 7c421d8 commit 7ea58df

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

Sources/web3swift/Tokens/ST20/Web3+SecurityToken.swift

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public class SecurityToken: ISecurityToken, ERC20BaseProperties {
100100
transaction.from = from
101101
transaction.to = self.address
102102
transaction.callOnBlock = .latest
103-
103+
contract.transaction = transaction
104104
// get the decimals manually
105105
let callResult = try await contract.createReadOperation("decimals")!.callContractMethod()
106106
var decimals = BigUInt(0)
@@ -119,7 +119,7 @@ public class SecurityToken: ISecurityToken, ERC20BaseProperties {
119119
transaction.from = from
120120
transaction.to = self.address
121121
transaction.callOnBlock = .latest
122-
122+
contract.transaction = transaction
123123
// get the decimals manually
124124
let callResult = try await contract.createReadOperation("decimals")!.callContractMethod()
125125
var decimals = BigUInt(0)
@@ -138,7 +138,7 @@ public class SecurityToken: ISecurityToken, ERC20BaseProperties {
138138
transaction.from = from
139139
transaction.to = self.address
140140
transaction.callOnBlock = .latest
141-
141+
contract.transaction = transaction
142142
// get the decimals manually
143143
let callResult = try await contract.createReadOperation("decimals")!.callContractMethod()
144144
var decimals = BigUInt(0)
@@ -171,7 +171,7 @@ public class SecurityToken: ISecurityToken, ERC20BaseProperties {
171171
transaction.from = from
172172
transaction.to = self.address
173173
transaction.callOnBlock = .latest
174-
174+
contract.transaction = transaction
175175
// get the decimals manually
176176
let callResult = try await contract.createReadOperation("decimals")!.callContractMethod()
177177
var decimals = BigUInt(0)
@@ -190,7 +190,7 @@ public class SecurityToken: ISecurityToken, ERC20BaseProperties {
190190
transaction.from = from
191191
transaction.to = self.address
192192
transaction.callOnBlock = .latest
193-
193+
contract.transaction = transaction
194194
// get the decimals manually
195195
let callResult = try await contract.createReadOperation("decimals")!.callContractMethod()
196196
var decimals = BigUInt(0)
@@ -209,7 +209,7 @@ public class SecurityToken: ISecurityToken, ERC20BaseProperties {
209209
transaction.from = from
210210
transaction.to = self.address
211211
transaction.callOnBlock = .latest
212-
212+
contract.transaction = transaction
213213
// get the decimals manually
214214
let callResult = try await contract.createReadOperation("decimals")!.callContractMethod()
215215
var decimals = BigUInt(0)
@@ -228,7 +228,7 @@ public class SecurityToken: ISecurityToken, ERC20BaseProperties {
228228
transaction.from = from
229229
transaction.to = self.address
230230
transaction.callOnBlock = .latest
231-
231+
contract.transaction = transaction
232232
// get the decimals manually
233233
let callResult = try await contract.createReadOperation("decimals")!.callContractMethod()
234234
var decimals = BigUInt(0)
@@ -254,13 +254,15 @@ public class SecurityToken: ISecurityToken, ERC20BaseProperties {
254254
transaction.from = from
255255
transaction.to = self.address
256256
transaction.callOnBlock = .latest
257+
contract.transaction = transaction
257258
return contract.createWriteOperation("renounceOwnership", parameters: [AnyObject]() )!
258259
}
259260

260261
public func transferOwnership(from: EthereumAddress, newOwner: EthereumAddress) throws -> WriteOperation {
261262
transaction.from = from
262263
transaction.to = self.address
263264
transaction.callOnBlock = .latest
265+
contract.transaction = transaction
264266
return contract.createWriteOperation("transferOwnership", parameters: [newOwner] as [AnyObject])!
265267
}
266268

@@ -333,6 +335,7 @@ public class SecurityToken: ISecurityToken, ERC20BaseProperties {
333335
transaction.from = from
334336
transaction.to = self.address
335337
transaction.callOnBlock = .latest
338+
contract.transaction = transaction
336339
return contract.createWriteOperation("createCheckpoint", parameters: [AnyObject]() )!
337340
}
338341

0 commit comments

Comments
 (0)