Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
9fd2518
Merge pull request #123 from SocketDotTech/dev
arthcp May 2, 2025
29afa29
Merge pull request #129 from SocketDotTech/staging
arthcp May 2, 2025
10054ef
Merge pull request #131 from SocketDotTech/dev
ameeshaagrawal May 5, 2025
38accd5
Merge pull request #132 from SocketDotTech/staging
ameeshaagrawal May 5, 2025
c7c425a
Merge pull request #142 from SocketDotTech/dev
ameeshaagrawal Jun 3, 2025
7ece1fa
Merge pull request #157 from SocketDotTech/staging
ameeshaagrawal Jun 3, 2025
b5b5c7f
Merge pull request #161 from SocketDotTech/dev
arthcp Jun 4, 2025
f618d2b
doc: commments
ameeshaagrawal Jul 29, 2025
1cd0c98
feat: test mocks
ameeshaagrawal Jul 31, 2025
c13b51d
test: unit socket tests
ameeshaagrawal Jul 31, 2025
918b71a
test: utils
ameeshaagrawal Jul 31, 2025
8c00261
fix: rescue nft
ameeshaagrawal Jul 31, 2025
c6b8b85
test: memory to storage
ameeshaagrawal Aug 4, 2025
72d02ce
fix: use init socket to initialise plugs
ameeshaagrawal Aug 4, 2025
25b1954
doc: natspecs
ameeshaagrawal Aug 4, 2025
35472ee
feat: emit promise execution params
ameeshaagrawal Aug 4, 2025
f52fc12
fix: expire bid and end auction
ameeshaagrawal Aug 4, 2025
285732e
fix: build
ameeshaagrawal Aug 4, 2025
b3cb0e4
fix: promise callback test
ameeshaagrawal Aug 4, 2025
676cdd3
fix: build
ameeshaagrawal Aug 4, 2025
62cba88
feat: upgrade AM and schedule prec
ameeshaagrawal Aug 4, 2025
a84a176
fix: sb ids
ameeshaagrawal Aug 4, 2025
3431615
fix: rearrange tests
ameeshaagrawal Aug 4, 2025
aa38de3
feat: sb tests
ameeshaagrawal Aug 4, 2025
db5a18d
feat: watcher tests
ameeshaagrawal Aug 8, 2025
059e2b2
feat: receiver interface
ameeshaagrawal Aug 14, 2025
096a288
feat: post deposit hook for receiver
ameeshaagrawal Aug 14, 2025
84a7e96
fix: tests
ameeshaagrawal Aug 14, 2025
f496651
feat: susdc
ameeshaagrawal Aug 14, 2025
a888497
feat: data with deposits
ameeshaagrawal Aug 14, 2025
f2add44
feat: erc20 credit system
ameeshaagrawal Aug 14, 2025
580fa0a
fix: build and tests
ameeshaagrawal Aug 14, 2025
71b796a
feat: burn and mint susdc
ameeshaagrawal Aug 14, 2025
c1cb25a
fix: mint burn
ameeshaagrawal Aug 15, 2025
cb6eede
test: susdc mint and burn
ameeshaagrawal Aug 18, 2025
18f2f29
fix: interfaces
ameeshaagrawal Aug 18, 2025
8405080
fix: rearrange test
ameeshaagrawal Aug 18, 2025
e622600
fix: data tests
ameeshaagrawal Aug 19, 2025
9053929
fix: lint
ameeshaagrawal Aug 19, 2025
3b3705c
fix: scripts
ameeshaagrawal Aug 19, 2025
0d309be
fix: script errors
ameeshaagrawal Aug 19, 2025
8f96adf
fix: test setup
ameeshaagrawal Aug 20, 2025
e855a4e
fix: signer nonce
tHeMaskedMan981 Aug 20, 2025
5f569b5
chore: bump package
ameeshaagrawal Aug 20, 2025
3428dc7
fix: add set max fee
ameeshaagrawal Aug 20, 2025
d8e6230
feat: handle revert on burn
ameeshaagrawal Sep 2, 2025
0021e17
feat: whitelist susdc receivers
ameeshaagrawal Sep 2, 2025
10d84ec
fix: remove burn revert handler
ameeshaagrawal Sep 2, 2025
6371b4d
Merge branch 'master' into fees-deposit-hook
ameeshaagrawal Sep 4, 2025
be6cc5d
feat: opt sepolia dev deployments
ameeshaagrawal Sep 5, 2025
fa0bc5d
rm: old contracts
ameeshaagrawal Sep 5, 2025
7cc66f4
feat: added tokenMap
tHeMaskedMan981 Sep 5, 2025
96f157d
Merge branch 'fees-deposit-hook' of https://github.com/SocketDotTech/…
tHeMaskedMan981 Sep 5, 2025
c6cbbae
feat: script to whitelist susdc receiver
ameeshaagrawal Sep 5, 2025
edbf917
feat: added 10 chains
tHeMaskedMan981 Sep 6, 2025
e14aec5
fix: trigger retryable
ameeshaagrawal Sep 11, 2025
a5448c8
fix: lint
ameeshaagrawal Sep 11, 2025
0ea1478
feat: upgrade watcher
ameeshaagrawal Sep 11, 2025
0552186
feat: added new chains
tHeMaskedMan981 Sep 13, 2025
5201405
feat: new deployments
tHeMaskedMan981 Sep 13, 2025
74d6945
feat: added hyperevm
tHeMaskedMan981 Sep 13, 2025
55b3bb0
feat: stage deployed
tHeMaskedMan981 Sep 15, 2025
1a2c0f2
feat: dev deployments
tHeMaskedMan981 Sep 17, 2025
811a166
chore: package
tHeMaskedMan981 Sep 17, 2025
8170c95
fix: per chain fees
ameeshaagrawal Sep 17, 2025
86124e8
fix: setter scripts
ameeshaagrawal Sep 17, 2025
26220fc
feat: upgrade dev
ameeshaagrawal Sep 17, 2025
712a384
fix: commented transmitter check
ameeshaagrawal Sep 17, 2025
30d39fc
Merge pull request #193 from SocketDotTech/chain-fees
ameeshaagrawal Sep 17, 2025
039c208
feat: mark katana legacy
ameeshaagrawal Sep 17, 2025
e732284
fix: update supported chains
ameeshaagrawal Sep 17, 2025
3c41419
feat: sei gas limit
arthcp Sep 17, 2025
55ba9cc
feat: test dev upgrades
ameeshaagrawal Sep 18, 2025
a218a61
feat: remove plume
ameeshaagrawal Sep 18, 2025
0d21aa2
feat: prod deployment
tHeMaskedMan981 Sep 19, 2025
59eb1b2
Merge branch 'fees-deposit-hook' of https://github.com/SocketDotTech/…
tHeMaskedMan981 Sep 19, 2025
ac33353
feat: hyper gas limti
arthcp Sep 19, 2025
5e841f6
feat: eth gas price and finality
tHeMaskedMan981 Sep 22, 2025
7c5bdb4
fix: max fees fees manager
ameeshaagrawal Sep 22, 2025
992f766
fix: uncomment bash
ameeshaagrawal Sep 22, 2025
15ce8b1
fix: upgrade evmx contracts
ameeshaagrawal Sep 22, 2025
bf7e4be
fix: lint
ameeshaagrawal Sep 22, 2025
8decf3b
fix: upgrade contracts and fix expiry
ameeshaagrawal Sep 22, 2025
df2db6e
fix: verify
tHeMaskedMan981 Sep 22, 2025
8a578e6
Merge branch 'fees-deposit-hook' into hyper-gas-limit
tHeMaskedMan981 Sep 22, 2025
3575360
Merge pull request #194 from SocketDotTech/hyper-gas-limit
tHeMaskedMan981 Sep 22, 2025
bebe6d5
Merge branch 'fees-deposit-hook' of https://github.com/SocketDotTech/…
tHeMaskedMan981 Sep 22, 2025
493b472
fix: surge protocol fees
ameeshaagrawal Sep 26, 2025
b711aa2
fix: lint
ameeshaagrawal Oct 1, 2025
b71be78
feat: script to update forwarder and promise beacon
ameeshaagrawal Oct 2, 2025
f4dfa03
feat: make promise resolver proxy
ameeshaagrawal Oct 2, 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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ testScript.sh
CLAUDE.md

.idea/

hardhat-scripts/loadTest/*
3 changes: 3 additions & 0 deletions Errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,6 @@
| `InvalidData()` | `0x5cb045db` |
| `InvalidSignature()` | `0x8baa579f` |
| `DeadlinePassed()` | `0x70f65caa` |
| `OnlyRequestHandlerAllowed()` | `0x5c1aa683` |
| `OnlyPromiseResolverAllowed()` | `0x2392c25e` |
| `InvalidReceiver()` | `0x1e4ec46b` |
112 changes: 68 additions & 44 deletions EventTopics.md

Large diffs are not rendered by default.

116 changes: 58 additions & 58 deletions FunctionSignatures.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
| `consumeFrom` | `0x40dd78be` |
| `creationCodeWithArgs` | `0xc126dcc4` |
| `deployForwarder__` | `0xd4e3b034` |
| `endAuction` | `0x1212e653` |
| `endAuction` | `0x7426f0f6` |
| `evmxSlug` | `0x8bae77c2` |
| `expireBid` | `0x1dd5022c` |
| `expireBid` | `0x33b5b234` |
| `feesManager__` | `0x70568b58` |
| `forwarderAddresses` | `0x5390fdcb` |
| `getOnChainAddress` | `0xb6abffd7` |
Expand Down Expand Up @@ -113,62 +113,62 @@

## FeesManager

| Function | Signature |
| -------------------------------- | ------------ |
| `addressResolver__` | `0x6a750469` |
| `approveAppGateway` | `0xa3b53d8b` |
| `approveAppGatewayWithSignature` | `0x94b649ec` |
| `approveAppGateways` | `0x86d23ab2` |
| `asyncDeployer__` | `0x2a39e801` |
| `auctionManager` | `0xb0192f9a` |
| `blockCredits` | `0x9e434307` |
| `cancelOwnershipHandover` | `0x54d1f13d` |
| `completeOwnershipHandover` | `0xf04e283e` |
| `consumeFrom` | `0x40dd78be` |
| `creationCodeWithArgs` | `0xc126dcc4` |
| `deployForwarder__` | `0xd4e3b034` |
| `deposit` | `0x5671d329` |
| `deprecatedSbType` | `0x5a783900` |
| `evmxSlug` | `0x8bae77c2` |
| `feesManager__` | `0x70568b58` |
| `feesPlugs` | `0x23f5ee8a` |
| `feesPool` | `0x6b259690` |
| `forwarderAddresses` | `0x5390fdcb` |
| `getAvailableCredits` | `0xb065a8e5` |
| `getOnChainAddress` | `0xb6abffd7` |
| `getOverrideParams` | `0x54f0a866` |
| `handleRevert` | `0x44792f25` |
| `initialize` | `0xbf2c8539` |
| `initializeOnChain` | `0x86f01739` |
| `isApproved` | `0xa389783e` |
| `isAsyncModifierSet` | `0xb69e0c4a` |
| `isCreditSpendable` | `0x4f8990fd` |
| `isNonceUsed` | `0xcab7e8eb` |
| `isValidPromise` | `0xb690b962` |
| `maxFees` | `0xe83e34b1` |
| `onCompleteData` | `0xb52fa926` |
| `onDeployComplete` | `0xfa3dbd1e` |
| `overrideParams` | `0xec5490fe` |
| `owner` | `0x8da5cb5b` |
| `ownershipHandoverExpiresAt` | `0xfee81cf4` |
| `renounceOwnership` | `0x715018a6` |
| `requestBlockedCredits` | `0xb62d25ac` |
| `requestOwnershipHandover` | `0x25692962` |
| `rescueFunds` | `0x6ccae054` |
| `sbType` | `0x745de344` |
| `setAddress` | `0x85bf312c` |
| `setFeesPlug` | `0xd6a9a8b7` |
| `setFeesPool` | `0xd6684588` |
| `tokenOnChainBalances` | `0x3b27866d` |
| `transferCredits` | `0xf1686c89` |
| `transferOwnership` | `0xf2fde38b` |
| `unblockAndAssignCredits` | `0x01958181` |
| `unblockCredits` | `0xa0b32314` |
| `unwrap` | `0x7647691d` |
| `userCredits` | `0x20babb92` |
| `watcher__` | `0x300bb063` |
| `withdrawCredits` | `0xcfc6dbd9` |
| `wrap` | `0x023276f0` |
| Function | Signature |
| ---------------------------- | ------------ |
| `addressResolver__` | `0x6a750469` |
| `approve` | `0xa3b53d8b` |
| `approveWithSignature` | `0x94b649ec` |
| `approveAppGateways` | `0x86d23ab2` |
| `asyncDeployer__` | `0x2a39e801` |
| `auctionManager` | `0xb0192f9a` |
| `blockCredits` | `0x9e434307` |
| `cancelOwnershipHandover` | `0x54d1f13d` |
| `completeOwnershipHandover` | `0xf04e283e` |
| `consumeFrom` | `0x40dd78be` |
| `creationCodeWithArgs` | `0xc126dcc4` |
| `deployForwarder__` | `0xd4e3b034` |
| `deposit` | `0x5671d329` |
| `deprecatedSbType` | `0x5a783900` |
| `evmxSlug` | `0x8bae77c2` |
| `feesManager__` | `0x70568b58` |
| `feesPlugs` | `0x23f5ee8a` |
| `feesPool` | `0x6b259690` |
| `forwarderAddresses` | `0x5390fdcb` |
| `balanceOf` | `0xb065a8e5` |
| `getOnChainAddress` | `0xb6abffd7` |
| `getOverrideParams` | `0x54f0a866` |
| `handleRevert` | `0x44792f25` |
| `initialize` | `0xbf2c8539` |
| `initializeOnChain` | `0x86f01739` |
| `isApproved` | `0xa389783e` |
| `isAsyncModifierSet` | `0xb69e0c4a` |
| `isCreditSpendable` | `0x4f8990fd` |
| `isNonceUsed` | `0xcab7e8eb` |
| `isValidPromise` | `0xb690b962` |
| `maxFees` | `0xe83e34b1` |
| `onCompleteData` | `0xb52fa926` |
| `onDeployComplete` | `0xfa3dbd1e` |
| `overrideParams` | `0xec5490fe` |
| `owner` | `0x8da5cb5b` |
| `ownershipHandoverExpiresAt` | `0xfee81cf4` |
| `renounceOwnership` | `0x715018a6` |
| `requestBlockedCredits` | `0xb62d25ac` |
| `requestOwnershipHandover` | `0x25692962` |
| `rescueFunds` | `0x6ccae054` |
| `sbType` | `0x745de344` |
| `setAddress` | `0x85bf312c` |
| `setFeesPlug` | `0xd6a9a8b7` |
| `setFeesPool` | `0xd6684588` |
| `tokenOnChainBalances` | `0x3b27866d` |
| `transferFrom` | `0xf1686c89` |
| `transferOwnership` | `0xf2fde38b` |
| `unblockAndAssignCredits` | `0x01958181` |
| `unblockCredits` | `0xa0b32314` |
| `unwrap` | `0x7647691d` |
| `userCredits` | `0x20babb92` |
| `watcher__` | `0x300bb063` |
| `withdrawCredits` | `0xcfc6dbd9` |
| `wrap` | `0x023276f0` |

## FeesPool

Expand Down
29 changes: 16 additions & 13 deletions contracts/evmx/AuctionManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import {ECDSA} from "solady/utils/ECDSA.sol";
import "solady/utils/Initializable.sol";
import "./interfaces/IPromise.sol";
import "./interfaces/IAuctionManager.sol";

import "../utils/AccessControl.sol";
import "../utils/RescueFundsLib.sol";
import {AuctionNotOpen, AuctionClosed, BidExceedsMaxFees, LowerBidAlreadyExists, InvalidTransmitter, MaxReAuctionCountReached, InvalidBid} from "../utils/common/Errors.sol";
import {SCHEDULE} from "../utils/common/Constants.sol";

import {TRANSMITTER_ROLE} from "../utils/common/AccessRoles.sol";
import {AppGatewayBase} from "./base/AppGatewayBase.sol";
import "./interfaces/IERC20.sol";

/// @title AuctionManagerStorage
/// @notice Storage for the AuctionManager contract
Expand Down Expand Up @@ -169,8 +169,10 @@ contract AuctionManager is AuctionManagerStorage, Initializable, AppGatewayBase,
}

/// @notice Ends an auction
/// @param requestCount_ The ID of the auction
function endAuction(uint40 requestCount_) external override onlyPromises {
/// @param data The encoded request count
function endAuction(bytes memory data, bytes memory) external onlyPromises {
uint40 requestCount_ = abi.decode(data, (uint40));
if (requestCount_ == 0) revert InvalidBid();
if (
auctionStatus[requestCount_] == AuctionStatus.CLOSED ||
auctionStatus[requestCount_] == AuctionStatus.NOT_STARTED
Expand Down Expand Up @@ -207,26 +209,27 @@ contract AuctionManager is AuctionManagerStorage, Initializable, AppGatewayBase,
/// @notice Expires a bid and restarts an auction in case a request is not fully executed.
/// @dev Auction can be restarted only for `maxReAuctionCount` times.
/// @dev It also unblocks the fees from last transmitter to be assigned to the new winner.
/// @param requestCount_ The request id
function expireBid(uint40 requestCount_) external override onlyPromises {
if (reAuctionCount[requestCount_] >= maxReAuctionCount) revert MaxReAuctionCountReached();
RequestParams memory requestParams = watcher__().getRequestParams(requestCount_);
/// @param data The encoded request count
function expireBid(bytes memory data, bytes memory) external override onlyPromises {
uint40 requestCount = abi.decode(data, (uint40));
if (reAuctionCount[requestCount] >= maxReAuctionCount) revert MaxReAuctionCountReached();
RequestParams memory requestParams = watcher__().getRequestParams(requestCount);

// if executed or cancelled, bid is not expired
if (
requestParams.requestTrackingParams.payloadsRemaining == 0 ||
requestParams.requestTrackingParams.isRequestCancelled
) return;

delete winningBids[requestCount_];
auctionStatus[requestCount_] = AuctionStatus.RESTARTED;
reAuctionCount[requestCount_]++;
delete winningBids[requestCount];
auctionStatus[requestCount] = AuctionStatus.RESTARTED;
reAuctionCount[requestCount]++;

watcher__().requestHandler__().assignTransmitter(
requestCount_,
requestCount,
Bid({fee: 0, transmitter: address(0), extraData: ""})
);
emit AuctionRestarted(requestCount_);
emit AuctionRestarted(requestCount);
}

function _createRequest(
Expand Down Expand Up @@ -260,7 +263,7 @@ contract AuctionManager is AuctionManagerStorage, Initializable, AppGatewayBase,
uint256 delayInSeconds_
) internal returns (uint256 watcherFees) {
watcherFees = watcher__().getPrecompileFees(SCHEDULE, abi.encode(delayInSeconds_));
feesManager__().transferCredits(from_, to_, watcherFees);
IERC20(address(feesManager__())).transferFrom(from_, to_, watcherFees);
}

/// @notice Recovers the signer of a message
Expand Down
4 changes: 2 additions & 2 deletions contracts/evmx/base/AppGatewayBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ abstract contract AppGatewayBase is AddressResolverUtil, IAppGateway {

function _approveFeesWithSignature(bytes memory feesApprovalData_) internal {
if (feesApprovalData_.length == 0) return;
(consumeFrom, , ) = feesManager__().approveAppGatewayWithSignature(feesApprovalData_);
(consumeFrom, , ) = feesManager__().approveWithSignature(feesApprovalData_);
}

/// @notice Withdraws fee tokens
Expand All @@ -242,7 +242,7 @@ abstract contract AppGatewayBase is AddressResolverUtil, IAppGateway {
uint256 amount_,
address receiver_
) internal {
feesManager__().approveAppGateway(address(feesManager__()), true);
feesManager__().approve(address(feesManager__()), true);
feesManager__().withdrawCredits(chainSlug_, token_, amount_, maxFees, receiver_);
}

Expand Down
Loading