Until now, to execute a transaction with the service account, the signers array parameter had to be empty:
let account = Test.serviceAccount()
let receiver = Test.createAccount()
let code = Test.readFile("../transactions/transfer_flow_tokens.cdc")
let tx = Test.Transaction(
code: code,
authorizers: [account.address],
signers: [],
arguments: [receiver.address, 1500.0]
)
let txResult = Test.executeTransaction(tx)
However, this special case adds some unnecessary complexity to developers, hence we always require the signers array parameter to contain the service account:
let account = Test.serviceAccount()
let receiver = Test.createAccount()
let code = Test.readFile("../transactions/transfer_flow_tokens.cdc")
let tx = Test.Transaction(
code: code,
authorizers: [account.address],
signers: [account],
arguments: [receiver.address, 1500.0]
)
let txResult = Test.executeTransaction(tx)
[x] Targeted PR against master branch
[x] Linked to Github issue with discussion and accepted design OR link to spec that describes this work
Closes #263
Description
Until now, to execute a transaction with the service account, the
signers
array parameter had to be empty:However, this special case adds some unnecessary complexity to developers, hence we always require the
signers
array parameter to contain the service account:master
branchFiles changed
in the Github PR explorer