Skip to content

Instantly share code, notes, and snippets.

@0xmikko
Created April 6, 2023 14:58
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/ab21806fba3f52cf6b5f7eb0136c8d28 to your computer and use it in GitHub Desktop.
Save 0xmikko/ab21806fba3f52cf6b5f7eb0136c8d28 to your computer and use it in GitHub Desktop.
for(uint256 i; i<tokens.length; ++i) {
address token = tokens[i];
uint256 balance = balances[i];
if (address == WETH) {
_sendETH(to, amount);
} else {
safeTranferToken(token, to, amount);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment