Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions contracts/Ethlance.sol
Original file line number Diff line number Diff line change
Expand Up @@ -409,17 +409,22 @@ contract Ethlance is IERC721Receiver, IERC1155Receiver, DSAuth {
return bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"));
}


/**
* @dev This function is called automatically when this contract receives ETH
* It calls {_createJob} where:
* - passed `_offerer` is `msg.sender`
* - passed `_offeredValues` are constructed from `msg.value`
* - rest of arguments is obtained by decoding `msg.data`
* TODO: Needs implementation
*/
receive(
) external payable {
receive() external payable {
EthlanceStructs.TokenValue[] memory offeredValues = new EthlanceStructs.TokenValue[](1);
offeredValues[0] = EthlanceStructs.TokenValue({
token: address(0),
value: msg.value
});

bytes memory data = msg.data;
_createJobWithPassedData(data);
}

function supportsInterface(bytes4 interfaceId) external override pure returns (bool) {
Expand Down