Skip to content

Instantly share code, notes, and snippets.

View marcovc's full-sized avatar

Marco Correia marcovc

View GitHub Profile

Keybase proof

I hereby claim:

  • I am marcovc on github.
  • I am marcovc (https://keybase.io/marcovc) on keybase.
  • I have a public key ASCxZpE9AJzrRPZB0MkFugl_kBzDUerBn44C69geT7dN9go

To claim this, I am signing this object:

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@marcovc
marcovc / encoding.cpp
Created July 4, 2024 06:56
Encoding cow amm (in c++)
ExecFMAMMOrder::EncodingData ExecFMAMMOrder::compute_encoding_data(
std::chrono::system_clock::time_point const& valid_to
) const
{
using ABI = EthereumABIEncoding;
auto owner = order().fm_amm().id();
auto valid_to_seconds = std::chrono::duration_cast<std::chrono::seconds>(valid_to.time_since_epoch()).count();
auto encoding_parameters = order().fm_amm().encoding_parameters();