medusa-network / medusa-contracts

Solidity smart contracts for Medusa
Other
10 stars 2 forks source link

Feat/deployment scripts #7

Closed jaeaster closed 2 years ago

jaeaster commented 2 years ago
  1. Oracles are Pausable by owner of OracleFactory

  2. Basic deployment scripts to deploy (DKGFactory + DKG instance) and (OracleFactory + Oracle instance)

  3. Add link as a parameter to submitCiphertext()

  4. Cleanup (using directive for G1Point methods) (Shared structs defined outside of contracts) (use calldata and external where appropriate)

nikkolasg commented 2 years ago

For the novice that I am could you say a few words why calldata instead of memory ?

jaeaster commented 2 years ago

For the novice that I am could you say a few words why calldata instead of memory ?

Rule of thumb is always calldata for external functions.

If the data is already coming in through the calldata, then using memory will just allocate another copy of it. If you have public functions, you could use memory or calldata (depends if they are called externally or internally)