flashloan-rs 0.2.0

Minimal Multicall3 Flashloan Module
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
/// @title ERC1155 Receiver
/// @notice SPDX-License-Identifier: MIT
/// @author asnared <https://github.com/abigger87>
/// @notice A minimal interface for receiving ERC1155 tokens.

/// @notice On ERC1155 Received
/// @notice Returns the function selector for `onERC1155Received`
#define macro ON_ERC1155_RECEIVED() = takes (0) returns (0) {
    // 0xf23a6e61 is the 4byte function selector for `onERC1155Received`
    0xf23a6e61 0x00 mstore    // []
    0x20 0x00 return          // []
}