... | ... | @@ -23,8 +23,34 @@ Below we have more detailed descriptions of a number of use cases and diagrams t |
|
|
![Legend](emerald-v2/legend.png)
|
|
|
![EmeraldServices](emerald-v2/services.png)
|
|
|
|
|
|
## ContractRegistrar
|
|
|
|
|
|
> setContractAddress(**string** contractName, **address** address) : void
|
|
|
|
|
|
Set the *address* for the given *contractName*. This can only be called from the address that originally installed this contract (All contracts should be installed on startup of a primary node and are then immutable for the lifetime of that instance of Emerald)
|
|
|
|
|
|
> getContractAddress(**string contractName**) : string
|
|
|
|
|
|
Get the *address* associated with the given *contractName*. This will return the stored contract address or 0x0, the zero address, if no contract exists for the given name.
|
|
|
|
|
|
## PointToPointServiceRegistrar
|
|
|
|
|
|
## MultiLegPaymentService
|
|
|
|
|
|
## LedgerService
|
|
|
|
|
|
## BICRegistrar
|
|
|
|
|
|
## ISOXMLService
|
|
|
|
|
|
## FXQuoteService
|
|
|
|
|
|
# General principles
|
|
|
|
|
|
## Instances
|
|
|
|
|
|
An instance of Emerald is considered to be the set of smart contracts deployed to Ethereum shared by a set of nodes. Theoretically you could deploy two sets of smart contracts on the same underlying Ethereum network and these can operate independently. We don't expect this to be a normal operational state, however during a system upgrade for example this might be a beneficial situation.
|
|
|
|
|
|
## Currency amounts
|
|
|
|
|
|
To avoid any issues with fixed / floating point representation and rounding we will use integers to represent all currency amounts - this applies both across distributed ledger services built on Ethereum as well as point to point services. This requires us to have an agreed indivisible amount for any currency we want to represent:
|
... | ... | |