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
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ src/types
typechain-types/

.env
.env.*
.DS_Store

.gas-snapshot/
Expand All @@ -26,8 +27,9 @@ broadcast/

.cursorrules

deployments/local_addresses.json
deployments/local_verification.json
deployments/local_addresses*.json
deployments/local_verification*.json
deployments/stage_addresses_*.json

testScript.sh
CLAUDE.md
Expand Down
1 change: 0 additions & 1 deletion contracts/evmx/fees/Credit.sol
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ abstract contract FeesManagerStorage is IFeesManager {

ForwarderSolana public forwarderSolana;

bytes32 public susdcSolanaProgramId;
bytes32 public feesPlugSolanaProgramId;

// slots [60-107] reserved for gap
Expand Down
4 changes: 0 additions & 4 deletions contracts/evmx/fees/FeesManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ contract FeesManager is Credit {
feesPlugSolanaProgramId = feesPlugSolanaProgramId_;
}

function setSusdcSolanaProgramId(bytes32 susdcSolanaProgramId_) external onlyOwner {
susdcSolanaProgramId = susdcSolanaProgramId_;
}

function setChainMaxFees(
uint32[] calldata chainSlugs_,
uint256[] calldata maxFees_
Expand Down
2 changes: 2 additions & 0 deletions contracts/evmx/interfaces/IWatcher.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ interface IWatcher is IConfigurations {

function transmitter() external view returns (address);

function transmitterSolana() external view returns (bytes32);

function isNonceUsed(uint256 nonce) external view returns (bool);

function triggerFromChainSlug() external view returns (uint32);
Expand Down
3 changes: 3 additions & 0 deletions contracts/evmx/watcher/Watcher.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ contract Watcher is Initializable, Configurations, Pausable {
address public latestAppGateway;
RawPayload public payloadData;
address public transmitter;
bytes32 public transmitterSolana;

error PayloadAlreadyCancelled();
error PayloadAlreadySettled();
Expand All @@ -48,10 +49,12 @@ contract Watcher is Initializable, Configurations, Pausable {
address owner_,
address addressResolver_,
address transmitter_,
bytes32 transmitterSolana_,
uint256 triggerFees_
) external reinitializer(1) {
evmxSlug = evmxSlug_;
transmitter = transmitter_;
transmitterSolana = transmitterSolana_;
triggerFees = triggerFees_;
_initializeOwner(owner_);
_setAddressResolver(addressResolver_);
Expand Down
11 changes: 2 additions & 9 deletions contracts/evmx/watcher/precompiles/WritePrecompile.sol
Original file line number Diff line number Diff line change
Expand Up @@ -271,17 +271,10 @@ contract WritePrecompile is WritePrecompileStorage, Initializable, Ownable {
functionArgsPacked
);

// TODO: this is temporary, must be injected from function arguments
// bytes32 of Solana Socket address : 9vFEQ5e3xf4eo17WttfqmXmnqN3gUicrhFGppmmNwyqV
bytes32 hardcodedSocket = 0x84815e8ca2f6dad7e12902c39a51bc72e13c48139b4fb10025d94e7abea2969c;
// bytes32 of Solana transmitter address : pFCBP4bhqdSsrWUVTgqhPsLrfEdChBK17vgFM7TxjxQ
bytes32 transmitterSolana = 0x0c1a5886fe1093df9fc438c296f9f7275b7718b6bc0e156d8d336c58f083996d;
return
DigestParams(
// watcherPrecompileConfig__.sockets(params_.payloadHeader.getChainSlug()), // TODO: this does not work, for some reason it returns 0x000.... address
hardcodedSocket,
// toBytes32Format(transmitter_),
transmitterSolana,
watcher__.sockets(rawPayload_.transaction.chainSlug),
watcher__.transmitterSolana(),
payloadId_,
deadline_,
rawPayload_.overrideParams.callType,
Expand Down
6 changes: 4 additions & 2 deletions deprecated/test/SetupTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -418,9 +418,11 @@ contract DeploySetup is SetupStore {
abi.encodeWithSelector(
Watcher.initialize.selector,
evmxSlug,
triggerFees,
watcherEOA,
address(addressResolver)
address(addressResolver),
transmitterEOA,
bytes32(0), // transmitterSolana - using 0 for now
triggerFees
)
);
watcher = Watcher(watcherProxy);
Expand Down
1 change: 1 addition & 0 deletions hardhat-scripts/deploy/1.deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ const deployEVMxContracts = async () => {
EVMxOwner,
addressResolver.address,
transmitter,
"0x0000000000000000000000000000000000000000000000000000000000000000", // transmitterSolana - using 0 for now
TRIGGER_FEES,
],
proxyFactory,
Expand Down
2 changes: 1 addition & 1 deletion lib/forge-std
2 changes: 1 addition & 1 deletion lib/solady
Submodule solady updated 196 files
2 changes: 1 addition & 1 deletion script/counter/DeployCounterPlug.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity ^0.8.21;
import {Script} from "forge-std/Script.sol";
import {console} from "forge-std/console.sol";
import {Counter} from "../../test/apps/counter/Counter.sol";
import {toBytes32Format} from "../../../../contracts/utils/common/Converters.sol";
import {toBytes32Format} from "../../contracts/utils/common/Converters.sol";

// source .env && forge script script/counter/DeployCounterPlug.s.sol --broadcast --skip-simulation
contract DeployCounterPlug is Script {
Expand Down
2 changes: 1 addition & 1 deletion script/counter/IncrementCountersFromApp.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity ^0.8.21;
import {Script} from "forge-std/Script.sol";
import {console} from "forge-std/console.sol";
import {CounterAppGateway} from "../../test/apps/counter/CounterAppGateway.sol";
import {toBytes32Format} from "../../../../contracts/utils/common/Converters.sol";
import {toBytes32Format} from "../../contracts/utils/common/Converters.sol";

// source .env && forge script script/counter/IncrementCountersFromApp.s.sol --broadcast --skip-simulation
// source .env && cast send 0x1Bb3770C1e25Ff498Cb25E4f91481E610428f0fd "incrementCounters(address)" '0x4382D89Db86dBFBDa96366E4029Ca962E01c232F' --private-key $PRIVATE_KEY
Expand Down
1 change: 1 addition & 0 deletions test/SetupTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ contract DeploySetup is SetupStore {
watcherEOA,
address(addressResolver),
address(transmitterEOA),
bytes32(0), // transmitterSolana - using 0 for now
triggerFees
)
);
Expand Down