Address: 0x9eCA6CEf73799402a1afe4779f588f03034c5D0f
Balance (XRP): 0 XRP
Bytecode: 0x60806040526004361015610011575f80fd5b5f3560e01c634010267414610024575f80fd5b346100985760a03660031901126100985761003d61009c565b6100456100b2565b604435906001600160401b03821161009857366023830112156100985781600401356001600160401b03811161009857366024828501011161009857610096936064359260246084359501916103aa565b005b5f80fd5b600435906001600160a01b038216820361009857565b602435906001600160a01b038216820361009857565b634e487b7160e01b5f52604160045260245ffd5b90601f801991011681019081106001600160401b038211176100fd57604052565b6100c8565b90816020910312610098575190565b6040513d5f823e3d90fd5b1561012357565b60405162461bcd60e51b815260206004820152601260248201527104e6f20746f6b656e7320746f2073776565760741b6044820152606490fd5b90816020910312610098575180151581036100985790565b1561017c57565b60405162461bcd60e51b8152602060048201526013602482015272151c985b9cd9995c919c9bdb4819985a5b1959606a1b6044820152606490fd5b6001600160401b0381116100fd57601f01601f191660200190565b9291926101de826101b7565b916101ec60405193846100dc565b829481845281830111610098578281602093845f960137010152565b906020820180921161021657565b634e487b7160e01b5f52601160045260245ffd5b1561023157565b60405162461bcd60e51b815260206004820152601a602482015279616d6f756e744f6666736574206f7574206f6620626f756e647360301b6044820152606490fd5b1561027a57565b60405162461bcd60e51b81526020600482015260146024820152730a0d8c2c6cad0ded8c8cae440dad2e6dac2e8c6d60631b6044820152606490fd5b156102bd57565b60405162461bcd60e51b8152602060048201526014602482015273151bdad95b88185c1c1c9bdd994819985a5b195960621b6044820152606490fd5b3d15610323573d9061030a826101b7565b9161031860405193846100dc565b82523d5f602084013e565b606090565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b919260a093610377969592845260208401526040830152151560608201528160808201520190610328565b90565b156103825750565b60405162461bcd60e51b8152602060048201529081906103a6906024830190610328565b0390fd5b6040516370a0823160e01b81523360048201529591949391926001600160a01b03919091169190602087602481865afa968715610542575f97610566575b506103f487151561011c565b6040516323b872dd60e01b815233600482015230602482015260448101889052916020836064815f885af1928315610542576104429361043b915f91610547575b50610175565b36916101d2565b610457815161045086610208565b111561022a565b8560208583010161046a85825114610273565b5260405163095ea7b360e01b81526001600160a01b038616600482015260248101879052956020876044815f875af1958615610542575f807f5a760595a6da847ff93bc1dfe0ee241c4edc8985ae7eeedc4e0a9255bc453d91946104dc6105099a6105119c8491610513575b506102b6565b60208151910182855af19687966104f16102f9565b98899160405195869560018060a01b0316998661034c565b0390a361037a565b565b610535915060203d60201161053b575b61052d81836100dc565b81019061015d565b5f6104d6565b503d610523565b610111565b610560915060203d60201161053b5761052d81836100dc565b5f610435565b61058991975060203d602011610590575b61058181836100dc565b810190610102565b955f6103e8565b503d61057756fea2646970667358221220e0fcc397f73cd2b8b767389cea0c56ddb84885931708b8f64068ce69be0147db64736f6c634300081e0033
Gas Token:
TrailsBalanceInjector.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.30; interface IERC20 { function balanceOf(address account) external view returns (uint256); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); } contract TrailsBalanceInjector { event BalanceInjectorCall( address indexed token, address indexed target, bytes32 placeholder, uint256 amountReplaced, uint256 amountOffset, bool success, bytes result ); /** * @notice Sweeps entire token balance of `token` and calls `target` with `callData`, * replacing a 32-byte placeholder at `amountOffset` with the balance. * @param token The ERC-20 token to sweep. * @param target The address to call with modified calldata. * @param callData The original calldata (must include a 32-byte placeholder). * @param amountOffset The byte offset in calldata where the placeholder is located. * @param placeholder The 32-byte placeholder that will be replaced with balance (used for validation). */ function sweepAndCall( address token, address target, bytes calldata callData, uint256 amountOffset, bytes32 placeholder ) external { uint256 callerBalance = IERC20(token).balanceOf(msg.sender); require(callerBalance > 0, "No tokens to sweep"); // Transfer all tokens from caller to this contract bool transferred = IERC20(token).transferFrom(msg.sender, address(this), callerBalance); require(transferred, "TransferFrom failed"); // Copy calldata into memory bytes memory data = callData; // Safety check: avoid overflow require(data.length >= amountOffset + 32, "amountOffset out of bounds"); // Load the value at the offset to check for placeholder match bytes32 found; assembly { found := mload(add(add(data, 32), amountOffset)) } require(found == placeholder, "Placeholder mismatch"); // Replace the placeholder with the caller's balance assembly { mstore(add(add(data, 32), amountOffset), callerBalance) } // Approve target to spend tokens bool approved = IERC20(token).approve(target, callerBalance); require(approved, "Token approve failed"); // Make the actual call (bool success, bytes memory result) = target.call(data); emit BalanceInjectorCall(token, target, placeholder, callerBalance, amountOffset, success, result); require(success, string(result)); } }