Bulk transaction costs

I am utilizing credential registry based on following example, https://github.com/Concordium/concordium-rust-smart-contracts/tree/main/examples/credential-registry

My question is, I need to register credentials in bulk, If I handle this in client side I will be charged as per

Total Cost = n x Transaction cost, (where n are the total number of credentials to be registered)

Now If I handle this within the contract will the cost be reduced?

Depends a bit on what you mean by “inside the contract”.

You need to supply to the contract at the minimum the public keys of credential holders (holder ids). These you cannot generate yourself, they are given to you by the user.

The rest you could optimize if the metadata of the credentials is always the same, so when registering a credential you would send one transaction with a list of holder ids.

1 Like

Lets say i register 10 credentials in single contract (call the registerCrediential method 10 times) will that be count as 10 transactions?

In the example contract we have, yes.

But you can modify the register entrypoint so that it would take a list of credentials to register. Then it would only be one transaction.

Thanks, I will discuss with my client.