Open RiccardoBiosas opened 2 years ago
The contract getters use the hash of a contract name to fetch the corresponding address from the registry. Currently, they calculate the hash of the contract on the spot every time they are called, hence I suggest that we could save a bit of gas by storing the hash of the protocol contracts' names as a constant in a shared contract/embedded library.
Note: could potentially converge with https://github.com/livepeer/protocol/issues/563
The contract getters use the hash of a contract name to fetch the corresponding address from the registry. Currently, they calculate the hash of the contract on the spot every time they are called, hence I suggest that we could save a bit of gas by storing the hash of the protocol contracts' names as a constant in a shared contract/embedded library.