Closed wanseob closed 4 years ago
It is hard to make other contracts include the library with only the asm.
This is the reason why it wasn't implemented as inline assembly in the first place - it does not allow instructions that control the stack
@poma Thanks for your reply. Understood!
https://github.com/iden3/circomlib/blob/master/src/mimcsponge_gencontract.js
The contract generated by mimcsponge_gencontracts.js is quite cheap. But because it's an external library which uses
public
function we have to pay more than 1400 gas compared to when if we useinternal
function by including the library inside the contract.Therefore it'll be really good if we have the solidity inline-assembly version of the MiMC.sol. It is hard to make other contracts include the library with only the asm.