I had a method:
-- t.hpp --
[[eosio::action]]
void exchange();
-- t.cpp --
void token::exchange()
{
...
}
EOSIO_DISPATCH(eosio::token, (exchange))
and then decided that if a parameter were passed, I'd want to do something different, so I added:
-- t.hpp --
[[eosio::action]]
void exchange();
[[eosio::action]]
void exchange(asset auction);
-- t.cpp --
void token::exchange()
{
...
}
void token::exchange(asset auction)
{
...
}
EOSIO_DISPATCH(eosio::token, (exchange))
but this produces an error:
t.cpp:378:1: error: no matching function for call to 'execute_action' EOSIO_DISPATCH(eosio::token, (exchange))
can I not do this? or if I can, how is it done?