Skip to content

Instantly share code, notes, and snippets.

@mariano-aguero
Created April 20, 2020 20:09
Show Gist options
  • Save mariano-aguero/cd2fb6257a217bd2ecd89d370e0de1cf to your computer and use it in GitHub Desktop.
Save mariano-aguero/cd2fb6257a217bd2ecd89d370e0de1cf to your computer and use it in GitHub Desktop.
pool.ligo
function tokenProxy (const action : tokenAction; const store : store): operation is
block {
const tokenContract: contract (tokenAction) =
case (Tezos.get_contract_opt (store.token.contractAddress) : option (contract (tokenAction))) of
Some (contractAction) -> contractAction
| None -> (failwith ("Contract not found.") : contract (tokenAction))
end;
const proxyOperation : operation = Tezos.transaction (action, 0mutez, tokenContract);
} with proxyOperation;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment