Smart Contracts
/
SplitWallet

SplitWallet

0xSplits

SplitWallet

The implementation logic for SplitProxy.

SplitProxy handles receive() itself to avoid the gas cost with DELEGATECALL.

Methods

sendERC20ToMain

function sendERC20ToMain(contract ERC20 token, uint256 amount) external payable

Sends amount amount of ERC20 token in proxy to SplitMain

payable reduces gas cost; no vulnerability to accidentally lock ETH introduced since fn call is restricted to SplitMain

Parameters

NameTypeDescription
tokencontract ERC20Token to send
amountuint256Amount to send

sendETHToMain

function sendETHToMain(uint256 amount) external payable

Sends amount amount of ETH in proxy to SplitMain

payable reduces gas cost; no vulnerability to accidentally lock ETH introduced since fn call is restricted to SplitMain

Parameters

NameTypeDescription
amountuint256Amount to send

splitMain

function splitMain() external view returns (contract ISplitMain)

address of SplitMain for split distributions & EOA/SC withdrawals

Returns

NameTypeDescription
_0contract ISplitMainundefined

Events

ReceiveETH

event ReceiveETH(address indexed split, uint256 amount)

emitted after each successful ETH transfer to proxy

Parameters

NameTypeDescription
split indexedaddressAddress of the split that received ETH
amountuint256Amount of ETH received

Errors

Unauthorized

error Unauthorized()

Unauthorized sender