Skip to content
Draft
Show file tree
Hide file tree
Changes from 5 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
2 changes: 1 addition & 1 deletion .github/workflows/subgraph-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [workflow_dispatch, pull_request, push]
jobs:
build_and_test:
name: Build and Test
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
Expand Down
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"solidity.formatter": "prettier"
"solidity.formatter": "prettier",
"solidity.packageDefaultDependenciesContractsDirectory": "src",
"solidity.packageDefaultDependenciesDirectory": "lib"
}
32 changes: 32 additions & 0 deletions src/ISwapTokensCallback.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// SPDX-License-Identifier: GPL-3.0

/// @title swapTokens Callback interface

/*********************************
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
* ░░░░░░█████████░░█████████░░░ *
* ░░░░░░██░░░████░░██░░░████░░░ *
* ░░██████░░░████████░░░████░░░ *
* ░░██░░██░░░████░░██░░░████░░░ *
* ░░██░░██░░░████░░██░░░████░░░ *
* ░░░░░░█████████░░█████████░░░ *
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
*********************************/

pragma solidity ^0.8.17;

interface ISwapTokensCallback {
/**
* @notice Called on the {to} in TokenBuyerV2#swapTokens, after sending it sellTokens in exchange for {amount} TokenBuyerV2#paymentToken.
* @param caller the `msg.sender` in TokenBuyerV2#swapTokens
* @param amount the TokenBuyerV2#paymentToken amount caller is buying sellTokens for
* @param data arbitrary data passed through by the caller via the TokenBuyerV2#swapTokens call
*/
function swapTokensCallback(
address caller,
uint256 amount,
bytes calldata data
) external payable;
}
Loading