Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add ERC6909 support #447

Merged
merged 113 commits into from
Dec 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
f9820ed
forge install: erc-6909
jtriley2p Sep 23, 2023
b22dc74
migrate 1155 to 6909
jtriley2p Sep 23, 2023
ce37af4
rm old 6909
jtriley2p Sep 24, 2023
00f4341
forge install: erc-6909
jtriley2p Sep 24, 2023
3673856
add event arg
jtriley2p Sep 24, 2023
d771042
rm old 6909
jtriley2p Sep 25, 2023
a6ee17c
forge install: erc-6909
jtriley2p Sep 25, 2023
5309c7f
update test event
jtriley2p Sep 25, 2023
33fdf58
Add gas snaps
zhongeric Nov 1, 2023
56d2d08
squash: support arbitrary calldata on test routers (#361)
saucepoint Sep 26, 2023
b67e3f3
Chore: update licenses (#364)
erin-koen Oct 10, 2023
7d3c6ec
Migrate SwapMath tests to foundry (#363)
ewilz Oct 15, 2023
ba04e0f
add base hook for tests (#377)
snreynolds Oct 24, 2023
3464902
change natspec to ILockCallback.lockAcquired (#376)
wildmolasses Oct 30, 2023
d6f0bb3
feat: update to solidity 0.8.22 (#378)
marktoda Oct 30, 2023
9875e9f
Cache dynamic fee in slot0 (#360)
snreynolds Nov 1, 2023
81e2f1f
Bug: Require different currencies (#380)
hensha256 Nov 1, 2023
fad1737
Replace MockERC20 with solmate's MockERC20 (#374)
saucepoint Nov 1, 2023
ebaa5d1
Fixing compiler warnings (#386)
hensha256 Nov 3, 2023
9a34f3e
fix: add gas snaps for swaps with 1155 as input/output (#383)
zhongeric Nov 3, 2023
0fadf92
Delete Hardhat (#372)
ewilz Nov 3, 2023
fbd55b9
feat: use standard forge directory structure (#389)
marktoda Nov 8, 2023
a6c8e05
Improve forge tests (#391)
hensha256 Nov 9, 2023
33aaf5f
Fix Issue #397: Incorrect Documentation (#399)
sipox11 Nov 13, 2023
be80868
feat: move whitepapers to docs dir to cleanup root (#393)
marktoda Nov 13, 2023
2743802
add snapshots to CI with tolerance (#401)
snreynolds Nov 14, 2023
4e2996d
Implement Claims accounting as minimal balance (#379)
zhongeric Nov 14, 2023
68c52a4
fix: whitepaper link (#400)
marktoda Nov 14, 2023
f5afe92
Add solc binaries and transient storage lock library (#395)
snreynolds Nov 14, 2023
80a71bf
Updated solc setup and instructions (#406)
hensha256 Nov 15, 2023
7a09f10
feat: move JS scripts to subdir and add helper (#405)
marktoda Nov 15, 2023
46e08e8
Set tick spacing range as constants (#369)
hyunchel Nov 15, 2023
4271165
Part 1: Improve forge tests (#407)
hensha256 Nov 16, 2023
fb68e18
remove forge snapshot --check (#417)
snreynolds Nov 20, 2023
874115d
feat: update justfile with custom solc (#418)
marktoda Nov 20, 2023
1831ace
Fix typos (#365)
xiaolou86 Nov 21, 2023
6b2727d
Update just prep and build (#421)
hensha256 Nov 21, 2023
4b8e4e2
fix tests
zhongeric Nov 21, 2023
2ce5840
remove totalsupply
zhongeric Nov 21, 2023
748937c
remove lib
zhongeric Nov 21, 2023
c42aba8
remove solmate
zhongeric Nov 21, 2023
1babbb6
forge install: solmate
zhongeric Nov 21, 2023
30d6d7c
Add comment
zhongeric Nov 21, 2023
fcb4762
Add solmate 6909 and remove claims
zhongeric Nov 21, 2023
e2fef70
feat: add variadic args to justfile (#423)
marktoda Nov 21, 2023
85dfe2f
move up settle and remove solmate
zhongeric Nov 22, 2023
b7f97a0
forge install: solmate
zhongeric Nov 22, 2023
be0d822
copy erc6909 locally and use _mint and _burn
zhongeric Nov 22, 2023
932376b
forge fmt
zhongeric Nov 22, 2023
482a146
remove lib
zhongeric Nov 22, 2023
42445f2
forge install: solmate
zhongeric Nov 22, 2023
1959c6a
rmeove solmate
zhongeric Nov 22, 2023
8291f76
forge install: solmate
zhongeric Nov 22, 2023
9bef4c7
fix gas snaps
zhongeric Nov 22, 2023
ae7c0db
remove unchecked without totalSupply
zhongeric Nov 22, 2023
95a41e9
Lock on initialize (#424)
hensha256 Nov 22, 2023
477f1eb
NoOp implementation with flag (#324)
emmaguo13 Nov 22, 2023
2929b3c
update testss
zhongeric Nov 27, 2023
88e7d57
rm solmate
zhongeric Nov 27, 2023
d3060e1
forge install: solmate
zhongeric Nov 27, 2023
12e504f
Use solmate 6909
zhongeric Nov 27, 2023
df5f006
fmt
zhongeric Nov 27, 2023
3cf69de
cache msg sender
zhongeric Nov 29, 2023
0d327b8
Explain different solc options (#429)
hensha256 Nov 29, 2023
a319c1e
Access lock (#404)
snreynolds Dec 1, 2023
56a1cd3
Fix broken tests that were using old claims balance format
zhongeric Dec 4, 2023
5df80bc
Add V46909 and reorder params
zhongeric Dec 4, 2023
37b0bd7
Add V46909 and Mock contract for test
zhongeric Dec 4, 2023
3ecbe30
Add revert tests
zhongeric Dec 4, 2023
72b52a3
burnFrom internal
zhongeric Dec 5, 2023
d2d9e07
remove old gas snaps and add native tests
zhongeric Dec 5, 2023
22d4964
feat: add lock target (#300)
marktoda Dec 4, 2023
521f381
fix tests and snaps
zhongeric Dec 5, 2023
b4764ed
forge fmt
zhongeric Dec 5, 2023
fdd52d2
expectEmit() all
zhongeric Dec 6, 2023
9c70e2e
expect emit all
zhongeric Dec 6, 2023
312467e
Prevent ProtocolFeeController from bricking pool initialization on re…
zhongeric Dec 6, 2023
2081ddc
feedback
zhongeric Dec 7, 2023
9e7735e
Add IERC69009, does not compile
zhongeric Dec 7, 2023
babc9b0
Revert "Add IERC69009, does not compile"
zhongeric Dec 7, 2023
349b334
added delta overflow checks (#433)
aadams Dec 7, 2023
cf6f514
add pool getters (#438)
snreynolds Dec 7, 2023
e7db92e
A few cleanup tasks (#437)
hensha256 Dec 8, 2023
8aec8c3
Remove hook fees and protocol fee on withdrawal (#432)
hensha256 Dec 8, 2023
a669d68
refactor: hooks callsites (#439)
marktoda Dec 8, 2023
caa1166
merge conflicts
zhongeric Dec 9, 2023
c90b990
fix fialing test
zhongeric Dec 11, 2023
2a719d5
Copy solmate 6909 locally to get interface inheritance
zhongeric Dec 11, 2023
c84c919
natspec
zhongeric Dec 11, 2023
5338b3c
expose getters in pool interface
snreynolds Dec 11, 2023
7ffbe50
Use id for mint/burn instead of currency
zhongeric Dec 12, 2023
664209e
forge fmt
zhongeric Dec 12, 2023
a4d55c9
Add burnFrom no approval test
zhongeric Dec 13, 2023
4ec5353
feedback
zhongeric Dec 13, 2023
43c6725
feedback
zhongeric Dec 13, 2023
182d500
forge install: ERC-6909
zhongeric Dec 13, 2023
4f1dfd3
remove lib
zhongeric Dec 13, 2023
f4fa8f9
Add commit SHA
zhongeric Dec 13, 2023
b467fe0
Merge branch 'main' into wip-6909
zhongeric Dec 14, 2023
c8c12c8
merge conflicts galore
zhongeric Dec 14, 2023
a41cf51
forge install: solmate
zhongeric Dec 14, 2023
3c18ea7
fix conflict
zhongeric Dec 14, 2023
a5e42f8
fix libs
zhongeric Dec 14, 2023
cf067dc
del
zhongeric Dec 14, 2023
db16ded
forge install: openzeppelin-contracts
zhongeric Dec 14, 2023
0dc051f
fix tests from conflcits and gas
zhongeric Dec 14, 2023
ee57069
forge fmt
zhongeric Dec 14, 2023
555e234
removed unused file
zhongeric Dec 14, 2023
29bcdd5
fix: faling fuzz tests (#441)
zhongeric Dec 15, 2023
63ded70
fix gas snap
zhongeric Dec 15, 2023
8bb3fa8
Merge branch 'main' into wip-6909
zhongeric Dec 15, 2023
b81b9b3
forge test
zhongeric Dec 15, 2023
a0beb23
feedback
zhongeric Dec 15, 2023
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 .forge-snapshots/addLiquidity with empty hook.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
323249
323277
2 changes: 1 addition & 1 deletion .forge-snapshots/addLiquidity with native token.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
200141
200111
2 changes: 1 addition & 1 deletion .forge-snapshots/addLiquidity.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
200109
200079
Original file line number Diff line number Diff line change
@@ -1 +1 @@
194300
194367
2 changes: 1 addition & 1 deletion .forge-snapshots/cached dynamic fee, no hooks.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
146667
146705
2 changes: 1 addition & 1 deletion .forge-snapshots/donate gas with 1 token.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
137771
137750
2 changes: 1 addition & 1 deletion .forge-snapshots/donate gas with 2 tokens.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
185216
185163
2 changes: 1 addition & 1 deletion .forge-snapshots/erc20 collect protocol fees.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
27033
27001
2 changes: 1 addition & 1 deletion .forge-snapshots/gas overhead of no-op lock.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
15224
15223
2 changes: 1 addition & 1 deletion .forge-snapshots/initialize.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
74200
74274
2 changes: 1 addition & 1 deletion .forge-snapshots/mint with empty hook.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
323262
323262
2 changes: 1 addition & 1 deletion .forge-snapshots/mint with native token.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
200100
200100
2 changes: 1 addition & 1 deletion .forge-snapshots/mint.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
200042
200042
2 changes: 1 addition & 1 deletion .forge-snapshots/mintWithEmptyHookEOAInitiated.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
255129
255189
2 changes: 1 addition & 1 deletion .forge-snapshots/modify position with noop.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
58013
58076
2 changes: 1 addition & 1 deletion .forge-snapshots/native collect protocol fees.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
38699
38667
2 changes: 1 addition & 1 deletion .forge-snapshots/poolManager bytecode size.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
23823
25102
2 changes: 1 addition & 1 deletion .forge-snapshots/removeLiquidity with empty hook.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
106962
106952
2 changes: 1 addition & 1 deletion .forge-snapshots/removeLiquidity with native token.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
208322
208312
2 changes: 1 addition & 1 deletion .forge-snapshots/removeLiquidity.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
204612
204602
2 changes: 1 addition & 1 deletion .forge-snapshots/simple swap with native.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
195638
195676
2 changes: 1 addition & 1 deletion .forge-snapshots/simple swap.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
204206
204244
2 changes: 1 addition & 1 deletion .forge-snapshots/simpleSwapEOAInitiated.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
173543
174149
2 changes: 1 addition & 1 deletion .forge-snapshots/simpleSwapNativeEOAInitiated.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
172131
172798
Original file line number Diff line number Diff line change
@@ -1 +1 @@
126266
126304
2 changes: 1 addition & 1 deletion .forge-snapshots/swap against liquidity.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
113757
113795
1 change: 1 addition & 0 deletions .forge-snapshots/swap burn 6909 for input.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
133995
2 changes: 1 addition & 1 deletion .forge-snapshots/swap burn claim for input.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
132930
132930
1 change: 1 addition & 0 deletions .forge-snapshots/swap burn native 6909 for input.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
129926
1 change: 1 addition & 0 deletions .forge-snapshots/swap mint native output as 6909.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
198205
1 change: 1 addition & 0 deletions .forge-snapshots/swap mint output as 6909.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
215075
2 changes: 1 addition & 1 deletion .forge-snapshots/swap mint output as claim.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
216399
216399
2 changes: 1 addition & 1 deletion .forge-snapshots/swap with dynamic fee.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
193401
193468
2 changes: 1 addition & 1 deletion .forge-snapshots/swap with hooks.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
113735
113773
1 change: 0 additions & 1 deletion .forge-snapshots/swap with native.snap

This file was deleted.

2 changes: 1 addition & 1 deletion .forge-snapshots/swap with noop.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
51304
51425
2 changes: 1 addition & 1 deletion .forge-snapshots/update dynamic fee in before swap.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
200144
200232
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
[submodule "lib/forge-gas-snapshot"]
path = lib/forge-gas-snapshot
url = https://github.com/marktoda/forge-gas-snapshot
[submodule "lib/solmate"]
path = lib/solmate
url = https://github.com/transmissions11/solmate
[submodule "lib/openzeppelin-contracts"]
path = lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
tag = v4.4.2
[submodule "lib/solmate"]
path = lib/solmate
url = https://github.com/transmissions11/solmate
100 changes: 100 additions & 0 deletions src/ERC6909.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

import {IERC6909Claims} from "./interfaces/external/IERC6909Claims.sol";

/// @notice Minimalist and gas efficient standard ERC6909 implementation.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC6909.sol)
/// @dev Copied from the commit at 4b47a19038b798b4a33d9749d25e570443520647
/// @dev This contract has been modified from the implementation at the above link.
abstract contract ERC6909 is IERC6909Claims {
/*//////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////*/

event OperatorSet(address indexed owner, address indexed operator, bool approved);

event Approval(address indexed owner, address indexed spender, uint256 indexed id, uint256 amount);

event Transfer(address caller, address indexed from, address indexed to, uint256 indexed id, uint256 amount);

/*//////////////////////////////////////////////////////////////
ERC6909 STORAGE
//////////////////////////////////////////////////////////////*/

mapping(address => mapping(address => bool)) public isOperator;

mapping(address => mapping(uint256 => uint256)) public balanceOf;

mapping(address => mapping(address => mapping(uint256 => uint256))) public allowance;

/*//////////////////////////////////////////////////////////////
ERC6909 LOGIC
//////////////////////////////////////////////////////////////*/

function transfer(address receiver, uint256 id, uint256 amount) public virtual returns (bool) {
balanceOf[msg.sender][id] -= amount;

balanceOf[receiver][id] += amount;

emit Transfer(msg.sender, msg.sender, receiver, id, amount);

return true;
}

function transferFrom(address sender, address receiver, uint256 id, uint256 amount) public virtual returns (bool) {
if (msg.sender != sender && !isOperator[sender][msg.sender]) {
uint256 allowed = allowance[sender][msg.sender][id];
if (allowed != type(uint256).max) allowance[sender][msg.sender][id] = allowed - amount;
}

balanceOf[sender][id] -= amount;

balanceOf[receiver][id] += amount;

emit Transfer(msg.sender, sender, receiver, id, amount);

return true;
}

function approve(address spender, uint256 id, uint256 amount) public virtual returns (bool) {
allowance[msg.sender][spender][id] = amount;

emit Approval(msg.sender, spender, id, amount);

return true;
}

function setOperator(address operator, bool approved) public virtual returns (bool) {
isOperator[msg.sender][operator] = approved;

emit OperatorSet(msg.sender, operator, approved);

return true;
}

/*//////////////////////////////////////////////////////////////
ERC165 LOGIC
//////////////////////////////////////////////////////////////*/

function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
return interfaceId == 0x01ffc9a7 // ERC165 Interface ID for ERC165
|| interfaceId == 0x0f632fb3; // ERC165 Interface ID for ERC6909
}

/*//////////////////////////////////////////////////////////////
INTERNAL MINT/BURN LOGIC
//////////////////////////////////////////////////////////////*/

function _mint(address receiver, uint256 id, uint256 amount) internal virtual {
balanceOf[receiver][id] += amount;

emit Transfer(msg.sender, address(0), receiver, id, amount);
}

function _burn(address sender, uint256 id, uint256 amount) internal virtual {
balanceOf[sender][id] -= amount;

emit Transfer(msg.sender, sender, address(0), id, amount);
}
}
23 changes: 23 additions & 0 deletions src/ERC6909Claims.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

import {ERC6909} from "./ERC6909.sol";

/// @notice ERC6909Claims inherits ERC6909 and implements an internal burnFrom function
abstract contract ERC6909Claims is ERC6909 {
/// @notice Burn `amount` tokens of token type `id` from `from`.
Copy link
Contributor

@marktoda marktoda Dec 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

think its important to note that if from !== msg.sender they must be operator or approved

/// @dev if sender is not `from` they must be an operator or have sufficient allowance.
/// @param from The address to burn tokens from.
/// @param id The currency to burn.
/// @param amount The amount to burn.
function _burnFrom(address from, uint256 id, uint256 amount) internal {
address sender = msg.sender;
if (from != sender && !isOperator[from][sender]) {
uint256 senderAllowance = allowance[from][sender][id];
if (senderAllowance != type(uint256).max) {
allowance[from][sender][id] = senderAllowance - amount;
}
}
_burn(from, id, amount);
}
}
16 changes: 8 additions & 8 deletions src/PoolManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ import {IDynamicFeeManager} from "./interfaces/IDynamicFeeManager.sol";
import {IPoolManager} from "./interfaces/IPoolManager.sol";
import {ILockCallback} from "./interfaces/callback/ILockCallback.sol";
import {Fees} from "./Fees.sol";
import {Claims} from "./Claims.sol";
import {ERC6909Claims} from "./ERC6909Claims.sol";
import {PoolId, PoolIdLibrary} from "./types/PoolId.sol";
import {BalanceDelta, BalanceDeltaLibrary} from "./types/BalanceDelta.sol";
import {Lockers} from "./libraries/Lockers.sol";
import {PoolGetters} from "./libraries/PoolGetters.sol";

/// @notice Holds the state for all pools
contract PoolManager is IPoolManager, Fees, NoDelegateCall, Claims {
contract PoolManager is IPoolManager, Fees, NoDelegateCall, ERC6909Claims {
using PoolIdLibrary for PoolKey;
using SafeCast for *;
using Pool for *;
Expand Down Expand Up @@ -288,15 +288,15 @@ contract PoolManager is IPoolManager, Fees, NoDelegateCall, Claims {
}

/// @inheritdoc IPoolManager
function mint(Currency currency, address to, uint256 amount) external noDelegateCall onlyByLocker {
_accountDelta(currency, amount.toInt128());
_mint(to, currency, amount);
function mint(address to, uint256 id, uint256 amount) external override noDelegateCall onlyByLocker {
_accountDelta(CurrencyLibrary.fromId(id), amount.toInt128());
_mint(to, id, amount);
}

/// @inheritdoc IPoolManager
function burn(Currency currency, uint256 amount) external noDelegateCall onlyByLocker {
_accountDelta(currency, -(amount.toInt128()));
_burn(currency, amount);
function burn(address from, uint256 id, uint256 amount) external override noDelegateCall onlyByLocker {
_accountDelta(CurrencyLibrary.fromId(id), -(amount.toInt128()));
_burnFrom(from, id, amount);
}

function setProtocolFee(PoolKey memory key) external {
Expand Down
11 changes: 6 additions & 5 deletions src/interfaces/IPoolManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ import {Currency} from "../types/Currency.sol";
import {PoolKey} from "../types/PoolKey.sol";
import {Pool} from "../libraries/Pool.sol";
import {IHooks} from "./IHooks.sol";
import {IERC6909Claims} from "./external/IERC6909Claims.sol";
import {IFees} from "./IFees.sol";
import {IClaims} from "./IClaims.sol";
import {BalanceDelta} from "../types/BalanceDelta.sol";
import {PoolId} from "../types/PoolId.sol";
import {Position} from "../libraries/Position.sol";

interface IPoolManager is IFees, IClaims {
interface IPoolManager is IFees, IERC6909Claims {
/// @notice Thrown when currencies touched has exceeded max of 256
error MaxCurrenciesTouched();

Expand Down Expand Up @@ -185,11 +186,11 @@ interface IPoolManager is IFees, IClaims {
/// @dev Can also be used as a mechanism for _free_ flash loans
function take(Currency currency, address to, uint256 amount) external;

/// @notice Called by the user to move value into Claims balance
function mint(Currency token, address to, uint256 amount) external;
/// @notice Called by the user to move value into ERC6909 balance
function mint(address to, uint256 id, uint256 amount) external;

/// @notice Called by the user to redeem their Claims balance
function burn(Currency token, uint256 amount) external;
/// @notice Called by the user to move value from ERC6909 balance
function burn(address from, uint256 id, uint256 amount) external;

/// @notice Called by the user to pay what is owed
function settle(Currency token) external payable returns (uint256 paid);
Expand Down
Loading