Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
270f976
added smart contracts, libraries for automation registry
udityadav-supraoracles Dec 10, 2025
7a6c635
added test cases for registry and controller smart contract
udityadav-supraoracles Dec 10, 2025
d913adf
fixed variable naming, replaced modifier with pvt function
udityadav-supraoracles Dec 10, 2025
b7981a8
-created script to deploy automation registry contracts and initialis…
udityadav-supraoracles Dec 11, 2025
11d5782
Moved automation registry implementation to supra_contracts
Dec 16, 2025
8e4bff9
Merge branch 'feature/blockmeta' into feature/automation_registry
udityadav-supraoracles Dec 17, 2025
f19c25f
removed blockmeta address from controller
udityadav-supraoracles Dec 17, 2025
2cd7a8d
-added value in payload
udityadav-supraoracles Dec 18, 2025
16ce914
added access list in payload
udityadav-supraoracles Dec 19, 2025
261b221
fixes for enabling/disbaling automation
udityadav-supraoracles Dec 23, 2025
6bc8d43
fixed test cases involving automation disable
udityadav-supraoracles Dec 31, 2025
a5b09a0
renamed CommonUtils to LibCommonUtils
udityadav-supraoracles Dec 31, 2025
f61f923
renamed LibCommonUtils to CommonUtils
udityadav-supraoracles Dec 31, 2025
dcae097
Merge branch 'feature/blockmeta' into feature/automation_registry
udityadav-supraoracles Dec 31, 2025
e0a69f2
fixed test cases
udityadav-supraoracles Jan 2, 2026
d6a9259
separated the config and deposit logic from AutomationRegistry to Aut…
udityadav-supraoracles Jan 8, 2026
0606947
fixed test cases
udityadav-supraoracles Jan 13, 2026
9289865
updated scripts
udityadav-supraoracles Jan 22, 2026
5631351
Merge branch 'feature/evm_automation' into feature/automation_registry
aregng Jan 22, 2026
41a2217
updated scripts and README
udityadav-supraoracles Jan 22, 2026
87bd13d
removed coldWallet
udityadav-supraoracles Jan 23, 2026
2342e98
fixed validation to check if caller is AutomationCore
udityadav-supraoracles Jan 26, 2026
0498938
fixed refundTaskFees and added test cases for AutomationController
udityadav-supraoracles Jan 27, 2026
7a34a1e
Merge branch 'feature/evm_automation' into feature/automation_registry
udityadav-supraoracles Jan 28, 2026
9ee322c
updated script and fixed bugs
udityadav-supraoracles Jan 28, 2026
d154b68
updated storage layout and implemented relevant changes for it
udityadav-supraoracles Feb 2, 2026
bd92be5
moved cycle info in AutomationCore
udityadav-supraoracles Feb 3, 2026
b29cd48
updated test cases
udityadav-supraoracles Feb 3, 2026
75db172
moved cycleInfo to AutomationController
udityadav-supraoracles Feb 4, 2026
79eac73
-added view funcitons for cycle details
udityadav-supraoracles Feb 4, 2026
4fdf9ce
Small cosmentic changes after review
Feb 7, 2026
26ca1a5
-updated register function
udityadav-supraoracles Feb 10, 2026
36569bd
updated libraries
udityadav-supraoracles Feb 10, 2026
77fe1e2
updated readTxHash
udityadav-supraoracles Feb 10, 2026
323813b
added mockCall for readTxHash
udityadav-supraoracles Feb 11, 2026
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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,6 @@ rustc-ice-*
/index.html

# Fixtures
/test-fixtures
/test-fixtures

node_modules
47 changes: 11 additions & 36 deletions solidity/supra_contracts/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
## Supra EVM Automation Registry

**This repository includes Supra EVM Automation Registry contract and related contracts.**
**This repository includes following smart contracts:**
- MultiSignatureWallet and MultisigBeacon
- ERC20Supra
- BlockMeta
- Automation Registry smart contracts
- AutomationCore: manages configuration, refunds, fee accounting and other helper functions
- AutomationRegistry: user facing contract to register/cancel/stop a task
- AutomationController: manages cycle transition and processing of tasks

Foundry consists of:

Expand Down Expand Up @@ -34,40 +41,8 @@ $ forge build
$ forge test
```

### Format
### Deploying Automation Registry smart contracts

```shell
$ forge fmt
```

### Gas Snapshots

```shell
$ forge snapshot
```

### Anvil

```shell
$ anvil
```

### Deploy

```shell
$ forge script script/Counter.s.sol:CounterScript --rpc-url <your_rpc_url> --private-key <your_private_key>
```

### Cast

```shell
$ cast <subcommand>
```

### Help

```shell
$ forge --help
$ anvil --help
$ cast --help
```
$ forge script script/DeployAutomationRegistry.s.sol:DeployAutomationRegistry --rpc-url <your_rpc_url> --private-key <your_private_key>
```
89 changes: 89 additions & 0 deletions solidity/supra_contracts/deploy_automation_registry.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
#!/bin/bash
set -e

source .env
: "${RPC_URL:?Missing RPC_URL in .env}"
: "${PRIVATE_KEY:?Missing PRIVATE_KEY in .env}"

DEPLOY_LOG="deploy.log"
ENV_FILE="deployed.env"

# Helper for cleaner + safer extraction
extract() {
local result
result=$(grep -m1 "$1" "$DEPLOY_LOG" | grep -o "0x[a-fA-F0-9]\{40\}")
echo "${result:-NOT_FOUND}"
}

# ------------------------------------------------------------
# RUN FOUNDRY DEPLOY SCRIPT
# ------------------------------------------------------------
echo ""
echo "=== Deploying contracts ==="

ADDRESS=$(cast wallet address --private-key "$PRIVATE_KEY")
export OWNER=$ADDRESS

forge script script/DeployERC20Supra.s.sol:DeployERC20Supra \
--rpc-url "$RPC_URL" \
--private-key "$PRIVATE_KEY" \
--broadcast \
--skip-simulation \
-vvvv > "$DEPLOY_LOG" 2>&1

ERC20_SUPRA=$(extract "ERC20Supra deployed at: ")
if [[ "$ERC20_SUPRA" == "NOT_FOUND" ]]; then
echo "ERROR: ERC20Supra address not found"
exit 1
fi

export ERC20_SUPRA

forge script script/DeployAutomationRegistry.s.sol:DeployAutomationRegistry \
--rpc-url "$RPC_URL" \
--private-key "$PRIVATE_KEY" \
--broadcast \
--skip-simulation \
-vvvv >> "$DEPLOY_LOG" 2>&1

echo "Deployment logs saved to $DEPLOY_LOG"

# ------------------------------------------------------------
# PARSE DEPLOYED CONTRACT ADDRESSES
# ------------------------------------------------------------
echo ""
echo "=== Extracting deployed addresses ==="

AUTOMATION_CORE_IMPL=$(extract "AutomationCore implementation deployed at:")
AUTOMATION_CORE_PROXY=$(extract "AutomationCore proxy deployed at:")
AUTOMATION_REGISTRY_IMPL=$(extract "AutomationRegistry implementation deployed at:")
AUTOMATION_REGISTRY_PROXY=$(extract "AutomationRegistry proxy deployed at:")
AUTOMATION_CONTROLLER_IMPL=$(extract "AutomationController implementation deployed at:")
AUTOMATION_CONTROLLER_PROXY=$(extract "AutomationController proxy deployed at:")

# ------------------------------------------------------------
# WRITE TO .env
# ------------------------------------------------------------
echo ""
echo "=== Saving contract addresses to $ENV_FILE ==="
echo ""

cat <<EOF > "$ENV_FILE"
# Auto-generated deployment output

ERC20_SUPRA=$ERC20_SUPRA

AUTOMATION_CORE_IMPL=$AUTOMATION_CORE_IMPL
AUTOMATION_CORE_PROXY=$AUTOMATION_CORE_PROXY

AUTOMATION_REGISTRY_IMPL=$AUTOMATION_REGISTRY_IMPL
AUTOMATION_REGISTRY_PROXY=$AUTOMATION_REGISTRY_PROXY

AUTOMATION_CONTROLLER_IMPL=$AUTOMATION_CONTROLLER_IMPL
AUTOMATION_CONTROLLER_PROXY=$AUTOMATION_CONTROLLER_PROXY
EOF

cat "$ENV_FILE"

echo ""
echo "=== Deployment Complete ==="
37 changes: 37 additions & 0 deletions solidity/supra_contracts/getTaskDetails.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env node
import { ethers } from "ethers";

const [registryAddress, taskIndex, rpcUrl] = process.argv.slice(2);

if (!registryAddress || !taskIndex || !rpcUrl) {
console.error("Usage: node getTaskDetails.js <registryAddress> <taskIndex> <rpcUrl>");
process.exit(1);
}

// Replace with your contract ABI (minimal, only getTaskDetails)
const registryAbi = [
"function getTaskDetails(uint64 _taskIndex) view returns (tuple(uint128 maxGasAmount,uint128 gasPriceCap,uint128 automationFeeCapForCycle,uint128 lockedFeeForNextCycle,bytes32 txHash,uint64 taskIndex,uint64 registrationTime,uint64 expiryTime,uint64 priority,uint8 taskType,uint8 state,address owner,bytes payloadTx,bytes[] auxData))"
];

const provider = new ethers.JsonRpcProvider(rpcUrl);
const registry = new ethers.Contract(registryAddress, registryAbi, provider);

async function main() {
try {
const task = await registry.getTaskDetails(taskIndex);
console.log(`taskIndex: ${task.taskIndex}`);
console.log(`owner: ${task.owner}`);
console.log(`state: ${["PENDING","ACTIVE","CANCELLED"][task.state]}`);
console.log(`expiryTime: ${task.expiryTime}`);
console.log(`payloadTx: ${task.payloadTx}`);
console.log(`auxData: ${task.auxData}`);
console.log(`maxGasAmount: ${task.maxGasAmount}`);
console.log(`gasPriceCap: ${task.gasPriceCap}`);
console.log(`automationFeeCapForCycle: ${task.automationFeeCapForCycle}`);
console.log(`lockedFeeForNextCycle: ${task.lockedFeeForNextCycle}`);
} catch (e) {
console.error("Error fetching task:", e.message);
}
}

main();
2 changes: 1 addition & 1 deletion solidity/supra_contracts/lib/forge-std
Submodule forge-std updated 56 files
+8 −20 .github/workflows/ci.yml
+1 −1 CONTRIBUTING.md
+5 −5 README.md
+1 −1 RELEASE_CHECKLIST.md
+1 −13 foundry.toml
+2 −2 package.json
+2 −12 scripts/vm.py
+1 −1 src/Base.sol
+1 −1 src/LibVariable.sol
+1 −1 src/Script.sol
+1 −2 src/StdAssertions.sol
+13 −7 src/StdChains.sol
+10 −15 src/StdCheats.sol
+24 −5 src/StdConfig.sol
+1 −1 src/StdConstants.sol
+1 −1 src/StdError.sol
+21 −3 src/StdInvariant.sol
+1 −3 src/StdJson.sol
+1 −1 src/StdMath.sol
+10 −8 src/StdStorage.sol
+1 −1 src/StdStyle.sol
+7 −9 src/StdToml.sol
+5 −11 src/StdUtils.sol
+1 −3 src/Test.sol
+6 −4 src/Vm.sol
+2 −3 src/console.sol
+1 −1 src/console2.sol
+1 −1 src/interfaces/IERC1155.sol
+1 −1 src/interfaces/IERC165.sol
+1 −1 src/interfaces/IERC20.sol
+7 −7 src/interfaces/IERC4626.sol
+1 −1 src/interfaces/IERC6909.sol
+1 −1 src/interfaces/IERC721.sol
+4 −4 src/interfaces/IERC7540.sol
+7 −7 src/interfaces/IERC7575.sol
+1 −3 src/interfaces/IMulticall3.sol
+690 −1,379 src/safeconsole.sol
+1 −1 test/CommonBase.t.sol
+33 −4 test/Config.t.sol
+18 −0 test/LibVariable.t.sol
+1 −1 test/StdAssertions.t.sol
+3 −3 test/StdChains.t.sol
+2 −3 test/StdCheats.t.sol
+1 −1 test/StdConstants.t.sol
+2 −3 test/StdError.t.sol
+1 −1 test/StdJson.t.sol
+1 −1 test/StdMath.t.sol
+2 −3 test/StdStorage.t.sol
+1 −1 test/StdStyle.t.sol
+1 −1 test/StdToml.t.sol
+1 −1 test/StdUtils.t.sol
+2 −2 test/Vm.t.sol
+1 −3 test/compilation/CompilationScript.sol
+1 −3 test/compilation/CompilationScriptBase.sol
+1 −3 test/compilation/CompilationTest.sol
+1 −3 test/compilation/CompilationTestBase.sol
2 changes: 1 addition & 1 deletion solidity/supra_contracts/lib/openzeppelin-contracts
Submodule openzeppelin-contracts updated 81 files
+5 −0 .changeset/bright-cooks-brush.md
+5 −0 .changeset/curly-pandas-flow.md
+5 −0 .changeset/flat-flies-hear.md
+5 −0 .changeset/happy-pants-decide.md
+5 −0 .changeset/spicy-seals-bake.md
+5 −0 .changeset/tame-monkeys-make.md
+5 −0 .changeset/vast-worlds-pull.md
+5 −0 .changeset/whole-turkeys-swim.md
+1 −1 .github/actions/gas-compare/action.yml
+94 −8 .github/actions/setup/action.yml
+1 −1 .github/actions/storage-layout/action.yml
+8 −33 .github/workflows/formal-verification.yml
+2 −2 .github/workflows/release-cycle.yml
+95 −0 .github/workflows/release-upgradeable.yml
+3 −2 .github/workflows/upgradeable.yml
+2 −0 CHANGELOG.md
+1 −1 LICENSE
+ audits/2025-11-RLP.pdf
+1 −0 audits/README.md
+1 −1 contracts/access/AccessControl.sol
+1 −1 contracts/account/extensions/draft-AccountERC7579.sol
+1 −1 contracts/account/extensions/draft-AccountERC7579Hooked.sol
+132 −15 contracts/account/utils/draft-ERC4337Utils.sol
+1 −1 contracts/crosschain/CrosschainLinked.sol
+2 −2 contracts/crosschain/README.adoc
+3 −3 contracts/crosschain/bridges/BridgeERC20.sol
+3 −3 contracts/crosschain/bridges/BridgeERC7802.sol
+9 −9 contracts/crosschain/bridges/abstract/BridgeFungible.sol
+3 −1 contracts/interfaces/draft-IERC4337.sol
+2 −1 contracts/mocks/CallReceiverMock.sol
+1 −0 contracts/mocks/Stateless.sol
+32 −9 contracts/token/ERC1155/ERC1155.sol
+1 −1 contracts/token/ERC20/README.adoc
+3 −3 contracts/token/ERC20/extensions/ERC20Crosschain.sol
+1 −1 contracts/token/ERC20/extensions/ERC20Wrapper.sol
+6 −0 contracts/token/ERC6909/extensions/ERC6909ContentURI.sol
+6 −0 contracts/token/ERC6909/extensions/ERC6909Metadata.sol
+6 −0 contracts/token/ERC6909/extensions/ERC6909TokenSupply.sol
+3 −6 contracts/utils/Bytes.sol
+3 −0 contracts/utils/README.adoc
+2 −1 contracts/utils/RLP.sol
+16 −8 contracts/utils/RelayedCall.sol
+113 −0 contracts/utils/SimulateCall.sol
+1 −2 contracts/utils/cryptography/TrieProof.sol
+6 −1 contracts/utils/cryptography/WebAuthn.sol
+7 −0 contracts/utils/cryptography/signers/MultiSignerERC7913.sol
+2 −2 docs/templates/properties.js
+2 −2 foundry.toml
+1 −1 fv-requirements.txt
+1 −1 fv/specs/ERC721.spec
+3 −4 hardhat.config.js
+1 −1 lib/forge-std
+1,301 −1,251 package-lock.json
+5 −4 package.json
+27 −0 scripts/release/workflow/check-upgradeable.sh
+2 −2 scripts/release/workflow/github-release.js
+16 −57 scripts/upgradeable/upgradeable.patch
+2 −2 test/account/extensions/AccountERC7579.behavior.js
+345 −44 test/account/utils/draft-ERC4337Utils.test.js
+5 −5 test/crosschain/BridgeERC20.behavior.js
+2 −6 test/governance/extensions/GovernorSuperQuorumGreaterThanQuorum.t.sol
+1 −0 test/helpers/enums.js
+35 −8 test/helpers/erc4337.js
+10 −7 test/helpers/signers.js
+79 −0 test/helpers/trie.js
+107 −5 test/token/ERC1155/ERC1155.behavior.js
+37 −0 test/token/ERC1155/ERC1155.test.js
+2 −2 test/token/ERC20/extensions/ERC20Crosschain.test.js
+3 −0 test/token/ERC6909/extensions/ERC6909ContentURI.test.js
+4 −0 test/token/ERC6909/extensions/ERC6909Metadata.test.js
+3 −0 test/token/ERC6909/extensions/ERC6909TokenSupply.test.js
+11 −5 test/utils/RelayedCall.test.js
+101 −0 test/utils/SimulatedCall.test.js
+2 −2 test/utils/cryptography/ECDSA.test.js
+4 −1 test/utils/cryptography/MerkleProof.test.js
+1 −22 test/utils/cryptography/P256.t.sol
+8 −16 test/utils/cryptography/P256.test.js
+1 −1 test/utils/cryptography/RSA.test.js
+19 −36 test/utils/cryptography/TrieProof.test.js
+44 −2 test/utils/cryptography/WebAuthn.t.sol
+3 −0 test/utils/introspection/SupportsInterface.behavior.js
Submodule openzeppelin-contracts-upgradeable updated 75 files
+5 −0 .changeset/bright-cooks-brush.md
+5 −0 .changeset/curly-pandas-flow.md
+5 −0 .changeset/flat-flies-hear.md
+5 −0 .changeset/happy-pants-decide.md
+5 −0 .changeset/spicy-seals-bake.md
+5 −0 .changeset/tame-monkeys-make.md
+5 −0 .changeset/vast-worlds-pull.md
+5 −0 .changeset/whole-turkeys-swim.md
+1 −1 .github/actions/gas-compare/action.yml
+94 −8 .github/actions/setup/action.yml
+1 −1 .github/actions/storage-layout/action.yml
+8 −33 .github/workflows/formal-verification.yml
+2 −2 .github/workflows/release-cycle.yml
+95 −0 .github/workflows/release-upgradeable.yml
+3 −2 .github/workflows/upgradeable.yml
+2 −0 CHANGELOG.md
+1 −1 LICENSE
+ audits/2025-11-RLP.pdf
+1 −0 audits/README.md
+0 −1 contracts/access/AccessControlUpgradeable.sol
+1 −1 contracts/account/extensions/draft-AccountERC7579HookedUpgradeable.sol
+1 −1 contracts/account/extensions/draft-AccountERC7579Upgradeable.sol
+1 −1 contracts/crosschain/CrosschainLinkedUpgradeable.sol
+2 −2 contracts/crosschain/README.adoc
+3 −3 contracts/crosschain/bridges/BridgeERC20Upgradeable.sol
+3 −3 contracts/crosschain/bridges/BridgeERC7802Upgradeable.sol
+10 −10 contracts/crosschain/bridges/abstract/BridgeFungibleUpgradeable.sol
+2 −1 contracts/mocks/CallReceiverMockUpgradeable.sol
+1 −0 contracts/mocks/StatelessUpgradeable.sol
+32 −9 contracts/token/ERC1155/ERC1155Upgradeable.sol
+1 −1 contracts/token/ERC20/README.adoc
+3 −3 contracts/token/ERC20/extensions/ERC20CrosschainUpgradeable.sol
+1 −1 contracts/token/ERC20/extensions/ERC20WrapperUpgradeable.sol
+6 −0 contracts/token/ERC6909/extensions/ERC6909ContentURIUpgradeable.sol
+6 −0 contracts/token/ERC6909/extensions/ERC6909MetadataUpgradeable.sol
+6 −0 contracts/token/ERC6909/extensions/ERC6909TokenSupplyUpgradeable.sol
+3 −0 contracts/utils/README.adoc
+3 −40 contracts/utils/cryptography/EIP712Upgradeable.sol
+7 −0 contracts/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol
+2 −2 docs/templates/properties.js
+2 −2 foundry.toml
+1 −1 fv-requirements.txt
+1 −1 fv/specs/ERC721.spec
+3 −4 hardhat.config.js
+1 −1 lib/forge-std
+1 −1 lib/openzeppelin-contracts
+1,301 −1,251 package-lock.json
+5 −4 package.json
+27 −0 scripts/release/workflow/check-upgradeable.sh
+2 −2 scripts/release/workflow/github-release.js
+16 −57 scripts/upgradeable/upgradeable.patch
+2 −2 test/account/extensions/AccountERC7579.behavior.js
+345 −44 test/account/utils/draft-ERC4337Utils.test.js
+5 −5 test/crosschain/BridgeERC20.behavior.js
+2 −6 test/governance/extensions/GovernorSuperQuorumGreaterThanQuorum.t.sol
+1 −0 test/helpers/enums.js
+35 −8 test/helpers/erc4337.js
+10 −7 test/helpers/signers.js
+79 −0 test/helpers/trie.js
+107 −5 test/token/ERC1155/ERC1155.behavior.js
+37 −0 test/token/ERC1155/ERC1155.test.js
+2 −2 test/token/ERC20/extensions/ERC20Crosschain.test.js
+3 −0 test/token/ERC6909/extensions/ERC6909ContentURI.test.js
+4 −0 test/token/ERC6909/extensions/ERC6909Metadata.test.js
+3 −0 test/token/ERC6909/extensions/ERC6909TokenSupply.test.js
+11 −5 test/utils/RelayedCall.test.js
+101 −0 test/utils/SimulatedCall.test.js
+2 −2 test/utils/cryptography/ECDSA.test.js
+4 −1 test/utils/cryptography/MerkleProof.test.js
+1 −22 test/utils/cryptography/P256.t.sol
+8 −16 test/utils/cryptography/P256.test.js
+1 −1 test/utils/cryptography/RSA.test.js
+19 −36 test/utils/cryptography/TrieProof.test.js
+44 −2 test/utils/cryptography/WebAuthn.t.sol
+3 −0 test/utils/introspection/SupportsInterface.behavior.js
131 changes: 131 additions & 0 deletions solidity/supra_contracts/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions solidity/supra_contracts/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"dependencies": {
"dotenv": "^17.2.3",
"ethers": "^6.16.0"
},
"type": "module"
}
Loading