@@ -208,7 +208,7 @@ func MakeSTXTokenTransfer(
208
208
209
209
signer := deriveSigner (senderKey )
210
210
211
- tx , err := NewTokenTransferTransaction (recipient , amount .Uint64 (), memo , network .Version , network .ChainID , signer , 0 , 0 , stacks .AnchorModeOnChainOnly , stacks . PostConditionModeAllow )
211
+ tx , err := NewTokenTransferTransaction (recipient , amount .Uint64 (), memo , network .Version , network .ChainID , signer , 0 , 0 , stacks .PostConditionModeAllow , [] PostCondition {} )
212
212
if err != nil {
213
213
return nil , & CustomError {Message : "Failed to create transaction" , Err : err }
214
214
}
@@ -224,11 +224,14 @@ func MakeSTXTokenTransfer(
224
224
func MakeContractDeploy (
225
225
contractName string ,
226
226
codeBody string ,
227
+ clarityVersion stacks.ClarityVersion ,
227
228
network stacks.StacksNetwork ,
228
229
senderAddress string ,
229
230
senderKey []byte ,
230
231
fee * big.Int ,
231
232
nonce * big.Int ,
233
+ postConditionMode stacks.PostConditionMode ,
234
+ postConditions []PostCondition ,
232
235
) (* SmartContractTransaction , error ) {
233
236
if contractName == "" || codeBody == "" || len (senderKey ) == 0 {
234
237
return nil , & CustomError {Message : "Invalid parameters: contractName, codeBody, or senderKey are empty" }
@@ -239,13 +242,14 @@ func MakeContractDeploy(
239
242
tx , err := NewSmartContractTransaction (
240
243
contractName ,
241
244
codeBody ,
245
+ clarityVersion ,
242
246
network .Version ,
243
247
network .ChainID ,
244
248
signer ,
245
249
0 ,
246
250
0 ,
247
- stacks . AnchorModeOnChainOnly ,
248
- stacks . PostConditionModeAllow ,
251
+ postConditionMode ,
252
+ postConditions ,
249
253
)
250
254
if err != nil {
251
255
return nil , & CustomError {Message : "Failed to create transaction" , Err : err }
@@ -269,14 +273,16 @@ func MakeContractCall(
269
273
senderKey []byte ,
270
274
fee * big.Int ,
271
275
nonce * big.Int ,
276
+ postConditionMode stacks.PostConditionMode ,
277
+ postConditions []PostCondition ,
272
278
) (* ContractCallTransaction , error ) {
273
279
if contractAddress == "" || contractName == "" || functionName == "" || len (senderKey ) == 0 {
274
280
return nil , & CustomError {Message : "Invalid parameters: contractAddress, contractName, functionName, or senderKey are empty" }
275
281
}
276
282
277
283
signer := deriveSigner (senderKey )
278
284
279
- tx , err := NewContractCallTransaction (contractAddress , contractName , functionName , functionArgs , network .Version , network .ChainID , signer , 0 , 0 , stacks . AnchorModeOnChainOnly , stacks . PostConditionModeAllow )
285
+ tx , err := NewContractCallTransaction (contractAddress , contractName , functionName , functionArgs , network .Version , network .ChainID , signer , 0 , 0 , postConditionMode , postConditions )
280
286
if err != nil {
281
287
return nil , & CustomError {Message : "Failed to create transaction" , Err : err }
282
288
}
0 commit comments