Skip to content

Commit

Permalink
Merge pull request #223 from Axis-Fi/implicit-imports
Browse files Browse the repository at this point in the history
feat: use implicit imports in interfaces to avoid type errors when importing as library
  • Loading branch information
Oighty authored Jul 12, 2024
2 parents 9d76410 + e5b7b18 commit 76e4b84
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 44 deletions.
52 changes: 26 additions & 26 deletions script/salts/salts.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,48 +61,48 @@
"0xf758779927a94ce49a1ea7e126142cca8472adf8cc3133234411737bb193ce41": "0xe826d67a09b7f9d1da2beacf436b833ae46aae40524c788fd02a10b5c3258c9a"
},
"Test_AllocatedMerkleAllowlist": {
"0x8de6e7b0b1f6974167a896ad8d377c8c29ad0132dd3f7b26f3aae7d4bb348d2f": "0xbafe0e1369edea3d992723bf3ff6a352dafbbb9f4dd6b81d52da4b538c123bb5",
"0xce7f9e37dca3a16d5c26ba67c9eba2e889ff76c1d27a05ed9ebd75083d46e241": "0x9c9a73570423fffe4c11df49d5434528af493273cd7424ec18e474b7940627ed"
"0xde90b3fc26aad97623cc3f0e749f074571be9d3c8688157fbd960725e16919a1": "0x9596400a18c78815f94c837c0c4c9adedcf148bef921b03f2f5485e989e4d894",
"0xe2c6fd7c60245abd79e4d6662cc0bf46a157fcc89d7164c26f1cb3127bd81693": "0xab62ce2ec3c59955ae05207dea7f11b37f7dd59fe263d17fd3a9567d5969de03"
},
"Test_CappedMerkleAllowlist": {
"0x5abd4cf6f12f56a1077d607918110659db02bbb5f419e4f4643c926e7c78d701": "0x7e5435b4313ad9ef6d831b39306df989156afac6ebeb1c4644cd7bd63088bfb7",
"0xe577ed57cc6c3ce09f0d1f66fbf3fcb30b35fde4c350c8d515d0f930603c41df": "0x97167e0f92b3e91d6e0fb8637c5ddfa224a3ec191528f46208663258c0cb95c3"
"0xb611d6b0a4ba211d9187da8183c1a5973ac76646eaf34a40dcc33799f7eccbc8": "0x8e563156842f36f3a5394c529dd654f27bd13a15719fef94201dcecdaee5c8f2",
"0xe63a572771160980afbe50bd2e8e17ff72aa986ff96e827c2473f9aad4450152": "0x905181541a5a5ccf43806626923610e22059ed62f7920214d34968ca02546276"
},
"Test_GUniFactory": {
"0x99fbce18602720731ae027d057bc0e206a620bbb54da7363d32dc149e7aeaa64": "0xf3e2bc8f6351215210664136231cceca0f7c958d3b200eaed4043a316eca22be"
},
"Test_MockCallback": {
"0x052a304d0a4a19a819c4e1501b45b4f1b49f73d1a7cac910386fe5fc509633a4": "0x1416c5dbf5cb95f1d5793df295de71f9fd1f46cf6e2cbdf08863e720fa750dbb",
"0x211f0c56d141fbeca1844d250c6a356beb00eaecc7afef8cd01797aa6b730ba6": "0x3370640c5c28a175b894e158639b0f4816d1e4bcf325f5f89a4050de8ccf411e",
"0x409bf08f08583ee56edee5cf91c507ce0ee7cd3a33d6b176505cde7e6fab5212": "0x81186eaf6b4b0d7f71f87e99e0aaeafcde574f4e20f864336048af6101a7a659",
"0x42425e602c9c169d71be77da2f8ca1fc0718c859fc8a1a8940e010485b9b2db4": "0xce98aa80db26c48c509f9d86fdf44077cd284e0baf845ed61ea1e54ff438faf3",
"0x4eb19888c437940923b0c1e78a04f1afe2a75dae78812574ba219f022fc5395a": "0x092aa8eb4b28032933998f30facb211484b12b7207ce3f676234b237acbe4c4f",
"0x65861ca173680f85c64b5ecb1041d69eba8addf2e4f3acde8ae4b0ec5f2625f5": "0xf3606e9e86d1e343eaf312d9bb5d5d7257ae7c4ee4dea7b6144be39404ae7566",
"0x732ffa915e7dee8ddde1f40a62d2a275e439a4fc180fa652b48e733b460fdd52": "0xf0b1ff5d2cc49cf228765a5ad0047c9029db01c999dc9139fc0c080c971ec3ad",
"0x819496f5a9c8dd326fdaaafa185159c136315d5abee91896f192dbdf2212768d": "0x1d38cc38fc757c41118353c34f871675a39b3843c62020f07e63f2dcaa267b7f",
"0x9df1908fad57611d75eb1b9d9a581ddc43baeaa767a14f5ddd26fe371bbcf06b": "0xfac5b6eb0f88cdab581445b9cb6f317d8ad097e988541ab3ab74334638e247e1",
"0xb10e85dc047de055ec7bcc8d8933f859c8c220aa1540e8d61f36e6391d5975fd": "0x30087b2a5b449b4fb632f6858e86243c9476b6521991f8256527f621a8a8af81",
"0xb262c3f41c3ffc3d264c72a40f60b02c497017ed75f73524e008f3ead803a998": "0xc4fb6028a62a1ebb3e33910ba5f875777b3e1877daa1fd1a465b075a8dc3548e",
"0xb582fee2a3f0fd5f455d98b1278099ceadb1a7c9d46e93e5100c8cc86aa4a388": "0xa34430ed6623eef78717e4bcb59843758b68c7ea37ef50bb4ba472534a156bda",
"0xbcd87b9a1206b37ef12053cbcac10515fbf400962837441462e04daa9e2ddc98": "0x7e913e29cef66a3db4d682a778c4db37601378be8d4144f9a5be8f5430f7cf62",
"0xc9ae4a5f6e1baf9009493d9068d9f61f8461a99a23532a7f8ed98393106ef560": "0x2200c04638ed027c9286c69d17b96121b7b182997133e3a68460cfd38cc1b2b4",
"0xd3e19abee55b3295d081f5777c0e642f7c7023552b5ae035ecc53f706fd90e63": "0x44747a53705f7f43c295715c328bf7e7b6ba483a82a77c644a35545c078c4e22",
"0xf12ef8015ea1ab65c40a62ad74a87c7a97bbc2736afd3f81f1cec73bc2290b45": "0xfa7bd314eaf70ba7c05504a7fc24ad5d4e5277d6852a6e357580a234fa7dd999",
"0xf36332cb1efc8bc6ea44da0a8971f853fc081b8487c5d4d3e09c1de201a68bc5": "0xa1a3bbe1723fe51343e379b98391874b47fa2b0a932ea45167f2416b400cb845",
"0xf745ee60388fc42e05923e38f1c09237e8514387e3a4b328c576a52aaa29c9b3": "0xa8370ffde74fd9bb4b68b57ffbf14b5957a28f1d86f7a8ae87242469ffee9f6d"
"0x052a304d0a4a19a819c4e1501b45b4f1b49f73d1a7cac910386fe5fc509633a4": "0x23bf8e610bda6f67da3aacddcdc06d5115c1a2f9ca1ad5b05e22270957691f9c",
"0x211f0c56d141fbeca1844d250c6a356beb00eaecc7afef8cd01797aa6b730ba6": "0xa6c46f4d51a8f24eb4784910b5c7e56a0f934dd5c7d3ee1acd792e6d9420a60f",
"0x409bf08f08583ee56edee5cf91c507ce0ee7cd3a33d6b176505cde7e6fab5212": "0x3af6a46a05923aa7ee6595d2e0e2faf686df66d285eafd78a1f5362c5798673c",
"0x42425e602c9c169d71be77da2f8ca1fc0718c859fc8a1a8940e010485b9b2db4": "0x969a131cd92afa82fc9b8107c8ad2528e4e58a906aac95ab5daf67f3d66b0108",
"0x4eb19888c437940923b0c1e78a04f1afe2a75dae78812574ba219f022fc5395a": "0xa0366c4c40ecc27c7524cf434991c72e52cb5c788dcd8e41d57b1b60816ed0c8",
"0x65861ca173680f85c64b5ecb1041d69eba8addf2e4f3acde8ae4b0ec5f2625f5": "0x24e139159750ccac7ce9171d1d0614c0dd259860d3fd32414c3035a067a15a37",
"0x732ffa915e7dee8ddde1f40a62d2a275e439a4fc180fa652b48e733b460fdd52": "0x960ac514bca5346af94c02ffd0e41efc9621655176e00bea3ce189c90c6ae32c",
"0x819496f5a9c8dd326fdaaafa185159c136315d5abee91896f192dbdf2212768d": "0xa1fd5154cfc6047e818dbebfec02844f9e4212b13623859cd22a61f3ce402fd1",
"0x9df1908fad57611d75eb1b9d9a581ddc43baeaa767a14f5ddd26fe371bbcf06b": "0x163971f6fbc7e3f04d19a9c30b7242a052dc8f62112bd599d19c159912551d82",
"0xb10e85dc047de055ec7bcc8d8933f859c8c220aa1540e8d61f36e6391d5975fd": "0xbcd13ec915bd280815fa3972d770be741a950cb4894c3e12c96b6922c8a126f6",
"0xb262c3f41c3ffc3d264c72a40f60b02c497017ed75f73524e008f3ead803a998": "0x409a276310191a7f79a4606d6a0d55a3b7466bb3e11ad8dbfbd86fbda8e28278",
"0xb582fee2a3f0fd5f455d98b1278099ceadb1a7c9d46e93e5100c8cc86aa4a388": "0xec3828c499ca1343fd984a138b8309244ecaf60787aed571366807ad7838abb2",
"0xbcd87b9a1206b37ef12053cbcac10515fbf400962837441462e04daa9e2ddc98": "0x2e1978d15be94d24f05692c57ec78f5aa0042e7cfb1dbfec3810ef54ba3e8045",
"0xc9ae4a5f6e1baf9009493d9068d9f61f8461a99a23532a7f8ed98393106ef560": "0xe96624612c4472683efb4b14e79d214833fe9864ded742ecf6c76301252659d1",
"0xd3e19abee55b3295d081f5777c0e642f7c7023552b5ae035ecc53f706fd90e63": "0xd2ce8e520792abd464cb2b5aa3c4d1e091e8ebdcdc72b29aa2f0580702f8c1ce",
"0xf12ef8015ea1ab65c40a62ad74a87c7a97bbc2736afd3f81f1cec73bc2290b45": "0xae42f9fbf2d802af15e70b2313a514e31e04d39a5f348baae2ed9dc2529f297b",
"0xf36332cb1efc8bc6ea44da0a8971f853fc081b8487c5d4d3e09c1de201a68bc5": "0x37a09d41bd8e44aea31d4bfc7a0ab6f1064d884354b6757a93d2def7dcd7efe5",
"0xf745ee60388fc42e05923e38f1c09237e8514387e3a4b328c576a52aaa29c9b3": "0xb1eb490af267790deb1bac5322223c552d5792852eb9047f8d8d2397f22f9e3d"
},
"Test_TokenAllowlist": {
"0x11e024c2f0ada4ce2ce048af08354dfa64f38ad959564c55e6bbf48d2ed3822e": "0xc763d91027e5243c9d7020f419199d114f74f8e8c2e2e668a0e25ff5bb66c6e8",
"0x78a7c23f669f5df656575693f45f928b7af2ed4bc981cf6dec77bef2c03bb081": "0xf0bc4482fcf2593df36fb9fb83ee5d273e7ee6a3caa9414d9c24eeee96567b6f"
"0x11e024c2f0ada4ce2ce048af08354dfa64f38ad959564c55e6bbf48d2ed3822e": "0xf2a54fd5502d17021466768875918dfe0f368bc8a618f66221d0a51d9bf49efe",
"0x78a7c23f669f5df656575693f45f928b7af2ed4bc981cf6dec77bef2c03bb081": "0xd98975cd3e8edc584667d7d31fbfe5dc8f3322c3caa6167cd3db8d59304b437f"
},
"Test_UniswapV2DirectToLiquidity": {
"0xf108beb959acb1e7e41cab1e1a3039f077c572167a9dadf5c31b642d80bc8c3c": "0x776bb071737d0bd3c0c1096a8a9d83574280b883b2681dadffaf6fa94fc669fc"
"0x35b3ed32a998b280e2946e62a3b903c76205813f0ffab1b212bf8a13ea64b508": "0x01e0ba27db009f5e2dfbf22d2ddf9f951075a2c5924831ab9abf79fb89889587"
},
"Test_UniswapV2Router": {
"0xe6204aa211921628df345ff0b909c863298684cd8ca65de5479af6b70662e622": "0xf5700f795856223d45b9e1b76fa0f23db9d770b25c44cae8f556ae6d1e7bee5e"
},
"Test_UniswapV3DirectToLiquidity": {
"0xc7b7c0717c869c4ea95e40c24731f0e4cb49f7665e8962a2cb2b58e5c46cc46d": "0xe5bda1880e46560490c3388a09b092db47d824b9214ad91150627c5c13c43343"
"0xcd0bd9d3a87710a3eee35256e3dc681741c061ca27237997bfbe4a2f60e82742": "0xb80314ff3158ad878c9ea318c4d66a0634c58440b6022b9e9900f22f92e26392"
},
"Test_UniswapV3Factory": {
"0xbcd657c3390ecd2e1782b6473400c51fa124922eb98b69f1b5192eb0f8e3d3df": "0xfad08a6eaa7974f06cec79e15064de7f6fa17b22ecdb3764988b2c4b1571c613"
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/IAtomicAuctionHouse.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity >=0.8.0;

import {IAuctionHouse} from "src/interfaces/IAuctionHouse.sol";
import "src/interfaces/IAuctionHouse.sol";

Check warning on line 4 in src/interfaces/IAtomicAuctionHouse.sol

View workflow job for this annotation

GitHub Actions / Foundry project

global import of path src/interfaces/IAuctionHouse.sol is not allowed. Specify names to import individually or bind all exports of the module into a name (import "path" as Name)

/// @title IAtomicAuctionHouse
/// @notice An interface to define the AtomicAuctionHouse's buyer-facing functions
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/IAtomicCatalogue.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity >=0.8.0;

import {ICatalogue} from "src/interfaces/ICatalogue.sol";
import "src/interfaces/ICatalogue.sol";

Check warning on line 4 in src/interfaces/IAtomicCatalogue.sol

View workflow job for this annotation

GitHub Actions / Foundry project

global import of path src/interfaces/ICatalogue.sol is not allowed. Specify names to import individually or bind all exports of the module into a name (import "path" as Name)

/// @title IAtomicCatalogue
/// @notice Interface for the AtomicCatalogue contract, which provides view functions for atomic auctions
Expand Down
8 changes: 4 additions & 4 deletions src/interfaces/IAuctionHouse.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
pragma solidity >=0.8.0;

// Interfaces
import {IAuction} from "src/interfaces/modules/IAuction.sol";
import {ICallback} from "src/interfaces/ICallback.sol";
import {IDerivative} from "src/interfaces/modules/IDerivative.sol";
import "src/interfaces/modules/IAuction.sol";

Check warning on line 5 in src/interfaces/IAuctionHouse.sol

View workflow job for this annotation

GitHub Actions / Foundry project

global import of path src/interfaces/modules/IAuction.sol is not allowed. Specify names to import individually or bind all exports of the module into a name (import "path" as Name)
import "src/interfaces/ICallback.sol";

Check warning on line 6 in src/interfaces/IAuctionHouse.sol

View workflow job for this annotation

GitHub Actions / Foundry project

global import of path src/interfaces/ICallback.sol is not allowed. Specify names to import individually or bind all exports of the module into a name (import "path" as Name)
import "src/interfaces/modules/IDerivative.sol";

Check warning on line 7 in src/interfaces/IAuctionHouse.sol

View workflow job for this annotation

GitHub Actions / Foundry project

global import of path src/interfaces/modules/IDerivative.sol is not allowed. Specify names to import individually or bind all exports of the module into a name (import "path" as Name)

// Internal dependencies
import {Keycode, Veecode} from "src/modules/Keycode.sol";
import "src/modules/Keycode.sol";

Check warning on line 10 in src/interfaces/IAuctionHouse.sol

View workflow job for this annotation

GitHub Actions / Foundry project

global import of path src/modules/Keycode.sol is not allowed. Specify names to import individually or bind all exports of the module into a name (import "path" as Name)

/// @title IAuctionHouse
/// @notice Interface for the Axis AuctionHouse contracts
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/IBatchAuctionHouse.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity >=0.8.0;

import {IAuctionHouse} from "src/interfaces/IAuctionHouse.sol";
import "src/interfaces/IAuctionHouse.sol";

Check warning on line 4 in src/interfaces/IBatchAuctionHouse.sol

View workflow job for this annotation

GitHub Actions / Foundry project

global import of path src/interfaces/IAuctionHouse.sol is not allowed. Specify names to import individually or bind all exports of the module into a name (import "path" as Name)

/// @title IBatchAuctionHouse
/// @notice An interface to define the BatchAuctionHouse's buyer-facing functions
Expand Down
4 changes: 2 additions & 2 deletions src/interfaces/IBatchCatalogue.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity >=0.8.0;

import {ICatalogue} from "src/interfaces/ICatalogue.sol";
import {IBatchAuction} from "src/interfaces/modules/IBatchAuction.sol";
import "src/interfaces/ICatalogue.sol";

Check warning on line 4 in src/interfaces/IBatchCatalogue.sol

View workflow job for this annotation

GitHub Actions / Foundry project

global import of path src/interfaces/ICatalogue.sol is not allowed. Specify names to import individually or bind all exports of the module into a name (import "path" as Name)
import "src/interfaces/modules/IBatchAuction.sol";

Check warning on line 5 in src/interfaces/IBatchCatalogue.sol

View workflow job for this annotation

GitHub Actions / Foundry project

global import of path src/interfaces/modules/IBatchAuction.sol is not allowed. Specify names to import individually or bind all exports of the module into a name (import "path" as Name)

/// @title IBatchCatalogue
/// @notice Interface for the BatchCatalogue contract, which provides view functions for batch auctions
Expand Down
3 changes: 1 addition & 2 deletions src/interfaces/ICatalogue.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity >=0.8.0;

import {IAuctionHouse} from "src/interfaces/IAuctionHouse.sol";
import {Keycode, Veecode} from "src/modules/Keycode.sol";
import "src/interfaces/IAuctionHouse.sol";

Check warning on line 4 in src/interfaces/ICatalogue.sol

View workflow job for this annotation

GitHub Actions / Foundry project

global import of path src/interfaces/IAuctionHouse.sol is not allowed. Specify names to import individually or bind all exports of the module into a name (import "path" as Name)

/// @title ICatalogue
/// @notice Interface for the Catalogue contract, which provides view functions for auctions
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/IFeeManager.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity >=0.8.0;

import {Keycode} from "src/modules/Keycode.sol";
import "src/modules/Keycode.sol";

/// @title IFeeManager
/// @notice Defines the interface to interact with auction fees
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/modules/IAtomicAuction.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity >=0.8.0;

import {IAuction} from "src/interfaces/modules/IAuction.sol";
import "src/interfaces/modules/IAuction.sol";

/// @title IAtomicAuction
/// @notice Interface for atomic auctions
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/modules/IBatchAuction.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity >=0.8.0;

import {IAuction} from "src/interfaces/modules/IAuction.sol";
import "src/interfaces/modules/IAuction.sol";

/// @title IBatchAuction
/// @notice Interface for batch auctions
Expand Down
7 changes: 3 additions & 4 deletions src/modules/derivatives/LinearVesting.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
pragma solidity 0.8.19;

import {ERC20} from "solmate/tokens/ERC20.sol";
import {ERC6909} from "solmate/tokens/ERC6909.sol";
import {SafeTransferLib} from "solmate/utils/SafeTransferLib.sol";
import {ClonesWithImmutableArgs} from "src/lib/clones/ClonesWithImmutableArgs.sol";
import {Timestamp} from "src/lib/Timestamp.sol";
Expand Down Expand Up @@ -74,13 +73,13 @@ contract LinearVesting is DerivativeModule, ILinearVesting, LinearVestingCard {

// ========== TRANSFER ========== //

/// @inheritdoc ERC6909
/// @notice Transfers are disabled
/// @dev Vesting tokens are soulbound/not transferable
function transfer(address, uint256, uint256) public virtual override returns (bool) {
revert NotPermitted();
}

/// @inheritdoc ERC6909
/// @notice Transfers are disabled
/// @dev Vesting tokens are soulbound/not transferable
function transferFrom(
address,
Expand All @@ -91,7 +90,7 @@ contract LinearVesting is DerivativeModule, ILinearVesting, LinearVestingCard {
revert NotPermitted();
}

/// @inheritdoc ERC6909
/// @notice Transfers are disabled
/// @dev Vesting tokens are soulbound/not transferable
function approve(address, uint256, uint256) public virtual override returns (bool) {
revert NotPermitted();
Expand Down

0 comments on commit 76e4b84

Please sign in to comment.