Skip to content

Instantly share code, notes, and snippets.

@0xmikko
Created April 6, 2023 14:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0xmikko/69e5894869f8203bc1114c4920f588fd to your computer and use it in GitHub Desktop.
Save 0xmikko/69e5894869f8203bc1114c4920f588fd to your computer and use it in GitHub Desktop.
Transfer using WETHGateway
for(uint256 i; i<tokens.length; ++i) {
address token = tokens[i];
uint256 balance = balances[i];
if (address == WETH) {
safeTransferToken(WETH, WETHGateway, amount);
} else {
safeTransferToken(token, to, amount);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment