Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f44fe73
deploy: origin to berachain bartio
Oighty Nov 6, 2024
1c6613c
chore: rename deployment file with version
Oighty Nov 6, 2024
c39f9f8
chore: lint
Oighty Nov 6, 2024
458c859
chore: fix soldeer dependencies and bump solmate version
Oighty Nov 19, 2024
c8e03f4
deploy: batch auction house mainnet
Oighty Nov 27, 2024
6798a87
Merge branch 'master' of https://github.com/axis-fi/axis-core
Oighty Nov 27, 2024
6284d09
fix: prevent overfill on fpb auction
Oighty Dec 2, 2024
739b28b
chore: bump the FBPA version
Oighty Dec 2, 2024
2a0eb52
deploy: FPB v2 to L2s and testnets
Oighty Dec 2, 2024
a7d956b
fix: partial fill payout rounding in FPB
Oighty Dec 4, 2024
d3b9d31
test: add fuzz test for FPB fix
Oighty Dec 6, 2024
684fe5d
chore: bump FPB version to 3
Oighty Dec 13, 2024
2731919
chore: FPB v2 deploy
Oighty Dec 13, 2024
2b2106d
Merge branch 'fbp-patch' of https://github.com/axis-fi/axis-core into…
Oighty Dec 13, 2024
769e781
chore: update changelog
Oighty Dec 13, 2024
39e3538
deploy: FPBA v3 to all chains
Oighty Dec 13, 2024
f20380e
chore: lint
Oighty Dec 13, 2024
a2443d2
Merge pull request #237 from Axis-Fi/fbp-patch
Oighty Dec 13, 2024
0bc55ad
deploy: berachain
Oighty Feb 6, 2025
4fdc8a7
chore: add optimizer config to foundry.toml
Oighty Feb 6, 2025
12bd6b1
Merge branch 'master' into merge-master
0xJem Mar 5, 2025
a4e7a4e
chore: linting
0xJem Mar 5, 2025
e2b73a5
Regenerate soldeer.lock
0xJem Mar 5, 2025
3e89ff0
Use HTTPS for git
0xJem Mar 5, 2025
d1d1c24
Fix test failures due to forge 1.0
0xJem Mar 5, 2025
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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.0.3

- Fixed a bug in the Fixed Price Batch module calculating the payout of a partially filled bid. This was introduced in v1.0.2 when the underflow bug was fixed.

## 1.0.2

- Fixed a bug in the Fixed Price Batch module that could result in an underflow when an auction was settled

## 1.0.1

- Seller can now be a referrer to an auction and earn the referrer fee. This allows them to effectively not pay a fee when they direct traffic to their own auction
Expand Down
3 changes: 3 additions & 0 deletions deployments/.arbitrum-one-v1.0.2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"deployments.auctionModules.FixedPriceBatch": "0xB1e9E16a40321Fe06Cfd797619C345c143D11Aa7"
}
3 changes: 3 additions & 0 deletions deployments/.arbitrum-one-v1.0.3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"deployments.auctionModules.FixedPriceBatch": "0x04974BcFC715c148818724d9Caab3Fe8d0391b8b"
}
3 changes: 3 additions & 0 deletions deployments/.arbitrum-sepolia-v1.0.2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"deployments.auctionModules.FixedPriceBatch": "0x43ce692c6C538C76eFeA6f495AdA280B60a7ceCA"
}
3 changes: 3 additions & 0 deletions deployments/.arbitrum-sepolia-v1.0.3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"deployments.auctionModules.FixedPriceBatch": "0xAF4AaFC046FB329EB1181c0094a95DA7Cee38211"
}
3 changes: 3 additions & 0 deletions deployments/.base-sepolia-v1.0.2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"deployments.auctionModules.FixedPriceBatch": "0xd13d64dD95F3DB8d1B3E1E65a1ef3F952ee1FC73"
}
3 changes: 3 additions & 0 deletions deployments/.base-sepolia-v1.0.3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"deployments.auctionModules.FixedPriceBatch": "0x1A6Ba70B8e5957bCd03C20f9CF42D9e6D3d9b514"
}
3 changes: 3 additions & 0 deletions deployments/.base-v1.0.2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"deployments.auctionModules.FixedPriceBatch": "0xc83Cbb79072CE3341f25326C6a3ad0Cefe36AfdD"
}
3 changes: 3 additions & 0 deletions deployments/.base-v1.0.3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"deployments.auctionModules.FixedPriceBatch": "0x4042D4F2236D055212d485E028E8FE4939252F88"
}
7 changes: 7 additions & 0 deletions deployments/.berachain-bartio-v1.0.1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"deployments.BatchAuctionHouse": "0xBA0000c28179CE533233a943d432eddD154E62A3",
"deployments.BatchCatalogue": "0x37886d0667c16f41F73F6586f087166Ae3CF1155",
"deployments.auctionModules.EncryptedMarginalPrice": "0x2C7aE1A3989f17a6d9935382bDe7F1b021055083",
"deployments.auctionModules.FixedPriceBatch": "0x8Db46375e73545226E99b5e8cBfe2794ac835D38",
"deployments.derivativeModules.BatchLinearVesting": "0xD55227c0C37C97Fa2619a9C7F658C173883C1E2a"
}
3 changes: 3 additions & 0 deletions deployments/.berachain-bartio-v1.0.2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"deployments.auctionModules.FixedPriceBatch": "0x68a8d91d9936b5Ef8b65f516F8a5AAB6c7b1E43e"
}
3 changes: 3 additions & 0 deletions deployments/.berachain-bartio-v1.0.3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"deployments.auctionModules.FixedPriceBatch": "0x4044d6dE91FB3049A9eBA24e4299d0d7ec7E53a3"
}
7 changes: 7 additions & 0 deletions deployments/.berachain-v1.0.3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"deployments.BatchAuctionHouse": "0xBA0000907c7812AEC8F7e9e27AefF4Ea7565A8bA",
"deployments.BatchCatalogue": "0x30c356DFBAc808BC62c860A9B285f024b40dF1fc",
"deployments.auctionModules.EncryptedMarginalPrice": "0x053219a03D5Bb08B8EeC2BB9743F723b312A1cE3",
"deployments.auctionModules.FixedPriceBatch": "0xe6c04Ce6ca70eeE60bEc40E2e6e62958D91E02CC",
"deployments.derivativeModules.BatchLinearVesting": "0xE292cF4e316191CbFEbD74909356DF3cd9455e96"
}
3 changes: 3 additions & 0 deletions deployments/.blast-sepolia-v1.0.2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"deployments.auctionModules.FixedPriceBatch": "0x527Bec0Ed0660c7fc4Dcf64b741eb4CfCDEA1615"
}
3 changes: 3 additions & 0 deletions deployments/.blast-sepolia-v1.0.3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"deployments.auctionModules.FixedPriceBatch": "0xf1E5FA9008fC3a62D90c7e569E02D98315C19DC3"
}
3 changes: 3 additions & 0 deletions deployments/.blast-v1.0.2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"deployments.auctionModules.FixedPriceBatch": "0xCaAE490470305a9d6f58b026cdD36cc747F8F0b9"
}
3 changes: 3 additions & 0 deletions deployments/.blast-v1.0.3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"deployments.auctionModules.FixedPriceBatch": "0x0e4996960731Fec8E7C9DBbD51383fC71174DD88"
}
6 changes: 6 additions & 0 deletions deployments/.mainnet-v1.0.1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"deployments.BatchAuctionHouse": "0xBA000020Fed3cf3bF473f09Ca0A72Ba123e20926",
"deployments.BatchCatalogue": "0xD33e5cC03ad1C8F73cc57053f8a749ac76F14988",
"deployments.auctionModules.FixedPriceBatch": "0xC891eC53b389edc1ebC38305B2D400c9E47A33Db",
"deployments.derivativeModules.BatchLinearVesting": "0x605A7105CA51FD5F107258362f52d8269eeA851A"
}
3 changes: 3 additions & 0 deletions deployments/.mainnet-v1.0.2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"deployments.auctionModules.FixedPriceBatch": "0xaC9957282BeA578f371078ddc4cD12A135B105d6"
}
3 changes: 3 additions & 0 deletions deployments/.mainnet-v1.0.3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"deployments.auctionModules.FixedPriceBatch": "0x4ED7160dA0020070ADf1AB149c730E8A4bD73d15"
}
3 changes: 3 additions & 0 deletions deployments/.mode-sepolia-v1.0.2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"deployments.auctionModules.FixedPriceBatch": "0xa9458b5C26810F4bE972d9fB50147e5E2395dC3E"
}
3 changes: 3 additions & 0 deletions deployments/.mode-sepolia-v1.0.3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"deployments.auctionModules.FixedPriceBatch": "0x8e5a555bcaB474C91dcA326bE3DFdDa7e30c3765"
}
3 changes: 3 additions & 0 deletions deployments/.mode-v1.0.2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"deployments.auctionModules.FixedPriceBatch": "0x4044d6dE91FB3049A9eBA24e4299d0d7ec7E53a3"
}
3 changes: 3 additions & 0 deletions deployments/.mode-v1.0.3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"deployments.auctionModules.FixedPriceBatch": "0x3A327c856AF41EcF4d783975CE38f669dEeaB298"
}
12 changes: 7 additions & 5 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ fs_permissions = [{access = "read-write", path = "./bytecode/"}, {access = "read
ffi = true
solc_version = "0.8.19"
evm_version = "paris"
optimizer = true
optimizer_runs = 200

[fuzz]
runs = 1024
Expand All @@ -26,8 +28,8 @@ ignore = [
# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options

[dependencies]
forge-std = { version = "1.9.1" }
solmate = { version = "6.7.0", url = "git@github.com:transmissions11/solmate.git", commit = "c892309933b25c03d32b1b0d674df7ae292ba925" }
solady = { version = "0.0.124" }
"@openzeppelin-contracts" = { version = "4.9.2" }
clones-with-immutable-args = { version = "1.1.1", git = "git@github.com:wighawag/clones-with-immutable-args.git", rev = "f5ca191afea933d50a36d101009b5644dc28bc99" }
forge-std = "1.9.1"
solmate = "6.8.0"
solady = "0.0.124"
"@openzeppelin-contracts" = "4.9.2"
clones-with-immutable-args = { version = "1.1.1", git = "https://github.com/wighawag/clones-with-immutable-args.git", rev = "f5ca191afea933d50a36d101009b5644dc28bc99" }
6 changes: 3 additions & 3 deletions remappings.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@clones-with-immutable-args-1.1.1=dependencies/clones-with-immutable-args-1.1.1/src
@forge-std-1.9.1=dependencies/forge-std-1.9.1/src
@solmate-6.7.0=dependencies/solmate-6.7.0/src
@solady-0.0.124=dependencies/solady-0.0.124/src
@openzeppelin-contracts-4.9.2=dependencies/@openzeppelin-contracts-4.9.2
@clones-with-immutable-args-1.1.1=dependencies/clones-with-immutable-args-1.1.1/src
@solady-0.0.124=dependencies/solady-0.0.124/src
@solmate-6.8.0=dependencies/solmate-6.8.0/src
36 changes: 27 additions & 9 deletions script/deploy/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ contract Deploy is Script, WithEnvironment, WithSalts {
if (saveDeployment) _saveDeployment(chain_);
}

function _saveDeployment(string memory chain_) internal {
function _saveDeployment(
string memory chain_
) internal {
// Create the deployments folder if it doesn't exist
if (!vm.isDir("./deployments")) {
console2.log("Creating deployments directory");
Expand Down Expand Up @@ -349,7 +351,9 @@ contract Deploy is Script, WithEnvironment, WithSalts {

// ========== CATALOGUE DEPLOYMENTS ========== //

function deployAtomicCatalogue(bytes memory) public virtual returns (address, string memory) {
function deployAtomicCatalogue(
bytes memory
) public virtual returns (address, string memory) {
// No args used
console2.log("");
console2.log("Deploying AtomicCatalogue");
Expand Down Expand Up @@ -378,7 +382,9 @@ contract Deploy is Script, WithEnvironment, WithSalts {
return (address(atomicCatalogue), _PREFIX_DEPLOYMENT_ROOT);
}

function deployBatchCatalogue(bytes memory) public virtual returns (address, string memory) {
function deployBatchCatalogue(
bytes memory
) public virtual returns (address, string memory) {
// No args used
console2.log("");
console2.log("Deploying BatchCatalogue");
Expand Down Expand Up @@ -442,7 +448,9 @@ contract Deploy is Script, WithEnvironment, WithSalts {
return (address(amEmp), _PREFIX_AUCTION_MODULES);
}

function deployFixedPriceSale(bytes memory) public virtual returns (address, string memory) {
function deployFixedPriceSale(
bytes memory
) public virtual returns (address, string memory) {
// No args used
console2.log("");
console2.log("Deploying FixedPriceSale");
Expand Down Expand Up @@ -471,7 +479,9 @@ contract Deploy is Script, WithEnvironment, WithSalts {
return (address(amFps), _PREFIX_AUCTION_MODULES);
}

function deployFixedPriceBatch(bytes memory) public virtual returns (address, string memory) {
function deployFixedPriceBatch(
bytes memory
) public virtual returns (address, string memory) {
// No args used
console2.log("");
console2.log("Deploying FixedPriceBatch");
Expand Down Expand Up @@ -566,17 +576,23 @@ contract Deploy is Script, WithEnvironment, WithSalts {

// ========== HELPER FUNCTIONS ========== //

function _isAtomicAuctionHouse(string memory deploymentName) internal pure returns (bool) {
function _isAtomicAuctionHouse(
string memory deploymentName
) internal pure returns (bool) {
return keccak256(bytes(deploymentName)) == keccak256(_ATOMIC_AUCTION_HOUSE_NAME)
|| keccak256(bytes(deploymentName)) == keccak256(_BLAST_ATOMIC_AUCTION_HOUSE_NAME);
}

function _isBatchAuctionHouse(string memory deploymentName) internal pure returns (bool) {
function _isBatchAuctionHouse(
string memory deploymentName
) internal pure returns (bool) {
return keccak256(bytes(deploymentName)) == keccak256(_BATCH_AUCTION_HOUSE_NAME)
|| keccak256(bytes(deploymentName)) == keccak256(_BLAST_BATCH_AUCTION_HOUSE_NAME);
}

function _isAuctionHouse(string memory deploymentName) internal pure returns (bool) {
function _isAuctionHouse(
string memory deploymentName
) internal pure returns (bool) {
return _isAtomicAuctionHouse(deploymentName) || _isBatchAuctionHouse(deploymentName);
}

Expand Down Expand Up @@ -623,7 +639,9 @@ contract Deploy is Script, WithEnvironment, WithSalts {
///
/// @param key_ Key to look for
/// @return address Returns the address
function _getAddressNotZero(string memory key_) internal view returns (address) {
function _getAddressNotZero(
string memory key_
) internal view returns (address) {
// Get from the deployed addresses first
address deployedAddress = deployedTo[key_];

Expand Down
8 changes: 6 additions & 2 deletions script/deploy/DeployBlast.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ contract DeployBlast is Deploy {
return (address(amEmp), _PREFIX_AUCTION_MODULES);
}

function deployFixedPriceSale(bytes memory) public override returns (address, string memory) {
function deployFixedPriceSale(
bytes memory
) public override returns (address, string memory) {
// No args used
console2.log("");
console2.log("Deploying BlastFPS (Fixed Price Sale)");
Expand Down Expand Up @@ -152,7 +154,9 @@ contract DeployBlast is Deploy {
return (address(amFps), _PREFIX_AUCTION_MODULES);
}

function deployFixedPriceBatch(bytes memory) public override returns (address, string memory) {
function deployFixedPriceBatch(
bytes memory
) public override returns (address, string memory) {
// No args used
console2.log("");
console2.log("Deploying BlastFPB (Fixed Price Batch)");
Expand Down
12 changes: 9 additions & 3 deletions script/deploy/WithEnvironment.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ abstract contract WithEnvironment is Script {
string public chain;
string public env;

function _loadEnv(string calldata chain_) internal {
function _loadEnv(
string calldata chain_
) internal {
chain = chain_;
console2.log("Using chain:", chain_);

Expand All @@ -24,7 +26,9 @@ abstract contract WithEnvironment is Script {
///
/// @param key_ The key to look up in the environment file
/// @return address The address from the environment file, or the zero address
function _envAddress(string memory key_) internal view returns (address) {
function _envAddress(
string memory key_
) internal view returns (address) {
console2.log(" Checking in env.json");
string memory fullKey = string.concat(".current.", chain, ".", key_);
address addr;
Expand All @@ -47,7 +51,9 @@ abstract contract WithEnvironment is Script {
///
/// @param key_ The key to look up in the environment file
/// @return address The address from the environment file
function _envAddressNotZero(string memory key_) internal view returns (address) {
function _envAddressNotZero(
string memory key_
) internal view returns (address) {
address addr = _envAddress(key_);
require(
addr != address(0), string.concat("WithEnvironment: key '", key_, "' has zero address")
Expand Down
8 changes: 8 additions & 0 deletions script/deploy/sequences/fixed-batch-module.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"sequence": [
{
"name": "FixedPriceBatch",
"installBatchAuctionHouse": false
}
]
}
12 changes: 12 additions & 0 deletions script/deploy/sequences/fixed-batch.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
{
"sequence": [
{
"name": "BatchAuctionHouse"
},
{
"name": "BatchCatalogue"
},
{
"name": "FixedPriceBatch",
"installBatchAuctionHouse": true,
"maxReferrerFee": 1000,
"maxCuratorFee": 1000
},
{
"name": "BatchLinearVesting",
"installBatchAuctionHouse": true
}
]
Expand Down
Loading
Loading