Closed td202 closed 6 months ago
The contract name that we return from the query is appended by the init_
phrase (e.g. "init_contract"). Would it be better if we just return the contract
part of the name for simplicity?
The contract name that we return from the query is appended by the
init_
phrase (e.g. "init_contract"). Would it be better if we just return thecontract
part of the name for simplicity?
I went this way (partly) because [Owned]ContractName
includes the init_
prefix, so it seemed sensible to use that. I didn't want to introduce a new type for the prefix-less contract name, as I feel that would be likely to create confusion, and I didn't really want to mess around too much with the representation of these existing types. While the prefix is clearly redundant, I don't think removing it achieves simplicity, and absent a stronger argument, I propose to keep it.
It would be great if the factory logs an event when a new contract is added to the factory. This is particularly useful in (e.g. the uniswapV2
protocol) since indexers pick up the new DEXMarket and provide analytics from that point on for the new trading pair.
Purpose
Closes #399 Depends on https://github.com/Concordium/concordium-rust-sdk/pull/183
Adds support for smart contracts to query the module reference and contract name of smart contract instances.
Changes
contract_module_reference
andcontract_name
host functions toconcordium-std
.Checklist