<p>The trigger transaction only specifies the contract reference name. This contract reference name is unique per account. It is possible for a different contract runner to use different contract runner account with different contract reference names. Which means that the same trigger transaction can trigger different runners to load and run a different version of a contract from the blockchain or even a completely different contract depending on the reference. </p>

<p>Having said that, a trigger transaction most likely will set its recipient to a specific account, triggered contracts should first check if they are the recipient of the trigger transaction and ignore it if they are not. </p>

<p>There could be variations on this, for example a contract can choose to process a trigger  transaction for which its contract runner account is not the recipient. Perhaps the contract runner account has set specific account properties on a group of accounts it would like to consider when they are a recipients of a trigger transaction. </p>

<p>Having said that, in most cases I expect that only one contract runner will process a trigger transaction and the rest will ignore it.</p>

CC BY-SA 4.0
2018-11-03T08:18:50.820Z
2018-11-03T08:18:50.820Z
lyaffe
<p>If it is allowed to specify contract parameters within the contract reference transaction, it should be possible to adapt the HelloWorld example contract to send a message to an account specified in the reference transaction.</p>

<p>For example, when I send a trigger transaction from account A to the contract runner account B, the contract responses with a message to Account C (where account C is specified in the reference transaction).</p>

<p>What if there is another reference transaction that specifies an account D? How can I be sure that the response will be sent to account C? Is there a parameter for the trigger transaction to reference a specific contract reference transaction?</p>

<ardor>
What is the mechanism to ensure execution of contract parameters specified in a contract reference transaction?
atzen
# What is the mechanism to ensure execution of contract parameters specified in a contract reference transaction?

(Asked by: username_0 on 2018-11-02)

If it is allowed to specify contract parameters within the contract reference transaction, it should be possible to adapt the HelloWorld example contract to send a message to an account specified in the reference transaction.

For example, when I send a trigger transaction from account A to the contract runner account B, the contract responses with a message to Account C (where account C is specified in the reference transaction).

What if there is another reference transaction that specifies an account D? How can I be sure that the response will be sent to account C? Is there a parameter for the trigger transaction to reference a specific contract reference transaction?

**Tags:** ardor


---

## 1 answers

### Answer by username_1 on 2018-11-03. Score: 2 | Accepted answer

The trigger transaction only specifies the contract reference name. This contract reference name is unique per account. It is possible for a different contract runner to use different contract runner account with different contract reference names. Which means that the same trigger transaction can trigger different runners to load and run a different version of a contract from the blockchain or even a completely different contract depending on the reference.

Having said that, a trigger transaction most likely will set its recipient to a specific account, triggered contracts should first check if they are the recipient of the trigger transaction and ignore it if they are not.

There could be variations on this, for example a contract can choose to process a trigger transaction for which its contract runner account is not the recipient. Perhaps the contract runner account has set specific account properties on a group of accounts it would like to consider when they are a recipients of a trigger transaction.

Having said that, in most cases I expect that only one contract runner will process a trigger transaction and the rest will ignore it.


---

