Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
14 changes: 7 additions & 7 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# RPCs
EVMX_RPC="https://rpc-evmx-devnet.socket.tech/"
SEPOLIA_RPC="https://rpc.ankr.com/eth_sepolia/"
ARBITRUM_SEPOLIA_RPC="https://rpc.ankr.com/arbitrum_sepolia"
OPTIMISM_SEPOLIA_RPC="https://rpc.ankr.com/optimism_sepolia"
BASE_SEPOLIA_RPC="https://rpc.ankr.com/base_sepolia"
SEPOLIA_RPC="https://ethereum-sepolia-rpc.publicnode.com"
ARBITRUM_SEPOLIA_RPC="https://sepolia-rollup.arbitrum.io/rpc"
OPTIMISM_SEPOLIA_RPC="https://sepolia.optimism.io"
BASE_SEPOLIA_RPC="https://sepolia.base.org"

# EVMx key addresses
# Find the most up to date addresses at:
# https://github.com/SocketDotTech/socket-protocol/blob/master/deployments/stage_addresses.json
ADDRESS_RESOLVER="0xf3046B22F98C25305E8040286fB1b33378BA10a1"
FEES_MANAGER="0x603723100172D30171B7Fd9870ba80F8baf6FaD4"
ARBITRUM_FEES_PLUG="0x89324F93d852cB4fcDC4Ee202456be466ce096bb"
ADDRESS_RESOLVER="0x4846430BB142385e581C894AE92a4CF0722aEC21"
FEES_MANAGER="0x9745623Aaa299500F93d2B1B4Efb7b3EC5e60FFc"
ARBITRUM_FEES_PLUG="0x9E263f6c7C199d9c147E30764A8cae1175184CB8"

# Add your deployer private key here
# or remove it from this file if it is already an env var
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,14 @@ jobs:

- name: Run Forge build
run: |
forge build --sizes
forge build
id: build

- name: Check contract sizes (non-blocking)
run: |
forge build --sizes || true
id: size_check

- name: Run Forge tests
run: |
forge test -vvv
Expand Down
2 changes: 1 addition & 1 deletion lib/socket-protocol
Submodule socket-protocol updated 149 files
16 changes: 9 additions & 7 deletions script/helpers/CheckAppEVMxLimits.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ contract CheckLimitsScript is Script {
console.log("AppGateway address:", appGateway);
WatcherPrecompile watcherContract = WatcherPrecompile(watcherPrecompile);

LimitParams memory scheduleLimit = watcherContract.getLimitParams(SCHEDULE, appGateway);
LimitParams memory queryLimit = watcherContract.getLimitParams(QUERY, appGateway);
LimitParams memory finalizeLimit = watcherContract.getLimitParams(FINALIZE, appGateway);

uint256 scheduleCurrentLimit = watcherContract.getCurrentLimit(SCHEDULE, appGateway);
uint256 queryCurrentLimit = watcherContract.getCurrentLimit(QUERY, appGateway);
uint256 finalizeCurrentLimit = watcherContract.getCurrentLimit(FINALIZE, appGateway);
LimitParams memory scheduleLimit =
watcherContract.watcherPrecompileLimits__().getLimitParams(SCHEDULE, appGateway);
LimitParams memory queryLimit = watcherContract.watcherPrecompileLimits__().getLimitParams(QUERY, appGateway);
LimitParams memory finalizeLimit =
watcherContract.watcherPrecompileLimits__().getLimitParams(FINALIZE, appGateway);

uint256 scheduleCurrentLimit = watcherContract.watcherPrecompileLimits__().getCurrentLimit(SCHEDULE, appGateway);
uint256 queryCurrentLimit = watcherContract.watcherPrecompileLimits__().getCurrentLimit(QUERY, appGateway);
uint256 finalizeCurrentLimit = watcherContract.watcherPrecompileLimits__().getCurrentLimit(FINALIZE, appGateway);

console.log("Schedule max limit:");
console.log(scheduleLimit.maxLimit);
Expand Down
20 changes: 14 additions & 6 deletions script/update-socket-protocol-commit.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
#!/bin/bash

# Check if branch name is provided
if [ -z "$1" ]; then
echo "Error: No branch name specified."
echo "Usage: $0 <branch_name>"
exit 1
fi

BRANCH_NAME=$1

# Check for modified or staged files, but ignore untracked files
if [[ -n $(git status --porcelain | grep '^[ MRAUCD]') ]]; then
if git status --porcelain | grep -q '^[ MRAUCD]'; then
echo "Error: You have modified or staged files. Commit or stash them before running this script."
exit 1
fi
Expand All @@ -11,11 +20,10 @@ git submodule deinit -f lib/socket-protocol
rm -rf .git/modules/lib/socket-protocol
git rm -rf lib/socket-protocol

# Re-add the submodule
git submodule add -b master https://github.com/SocketDotTech/socket-protocol.git lib/socket-protocol
# Re-add the submodule with the specified branch
git submodule add -b "$BRANCH_NAME" https://github.com/SocketDotTech/socket-protocol.git lib/socket-protocol
git submodule update --init --recursive

# Commit the update
git commit -m "Update socket-protocol submodule"

echo "SOCKET Protocol submodule updated successfully!"
git commit -m "Update socket-protocol submodule to latest $BRANCH_NAME"
echo "SOCKET Protocol submodule updated successfully to branch $BRANCH_NAME!"
8 changes: 4 additions & 4 deletions test/apps/Counter.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ contract CounterTest is DeliveryHelperTest {
contractIds[0] = counterId;
}

function deployCounterApp(uint32 chainSlug) internal returns (bytes32 asyncId) {
asyncId = _deploy(contractIds, chainSlug, 1, IAppGateway(counterGateway));
function deployCounterApp(uint32 chainSlug) internal returns (uint40 requestCount) {
requestCount = _deploy(chainSlug, IAppGateway(counterGateway), contractIds);
}

function testCounterDeployment() external {
Expand All @@ -49,8 +49,8 @@ contract CounterTest is DeliveryHelperTest {
address[] memory instances = new address[](1);
instances[0] = arbCounterForwarder;
counterGateway.incrementCounters(instances);
executeRequest(new bytes[](0));

_executeWriteBatchSingleChain(arbChainSlug, 1);
assertEq(Counter(arbCounter).counter(), arbCounterBefore + 1);
}

Expand All @@ -75,8 +75,8 @@ contract CounterTest is DeliveryHelperTest {
uint32[] memory chains = new uint32[](2);
chains[0] = arbChainSlug;
chains[1] = optChainSlug;
_executeWriteBatchMultiChain(chains);

executeRequest(new bytes[](0));
assertEq(Counter(arbCounter).counter(), arbCounterBefore + 1);
assertEq(Counter(optCounter).counter(), optCounterBefore + 1);
}
Expand Down
Loading