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
22 changes: 19 additions & 3 deletions Cargo.lock

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

9 changes: 5 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ wasi = "0.14.2"
wavs-wasi-utils = "=1.2.0"

# WAVS (https://github.com/Lay3rLabs/wavs-tools/pull/123)
wavs-llm = { git = "https://github.com/Lay3rLabs/wavs-tools", rev = "d159899766e1f842addd4b4289f9487012b1803a", package = "wavs-llm"}
wavs-eas = { git = "https://github.com/Lay3rLabs/wavs-tools", rev = "d159899766e1f842addd4b4289f9487012b1803a", package = "wavs-eas" }
wavs-indexer-api = { git = "https://github.com/Lay3rLabs/wavs-tools", rev = "d159899766e1f842addd4b4289f9487012b1803a", package = "wavs-indexer-api" }
wavs-merkle-sources = { git = "https://github.com/Lay3rLabs/wavs-tools", rev = "d159899766e1f842addd4b4289f9487012b1803a", package = "wavs-merkle-sources" }
wavs-llm = { git = "https://github.com/Lay3rLabs/wavs-tools", rev = "902c016b3485d983e051956246c72657c0f2a3cd", package = "wavs-llm"}
wavs-eas = { git = "https://github.com/Lay3rLabs/wavs-tools", rev = "902c016b3485d983e051956246c72657c0f2a3cd", package = "wavs-eas" }
wavs-indexer-api = { git = "https://github.com/Lay3rLabs/wavs-tools", rev = "902c016b3485d983e051956246c72657c0f2a3cd", package = "wavs-indexer-api" }
wavs-merkle-sources = { git = "https://github.com/Lay3rLabs/wavs-tools", rev = "902c016b3485d983e051956246c72657c0f2a3cd", package = "wavs-merkle-sources" }
wavs-ipfs = { git = "https://github.com/Lay3rLabs/wavs-tools", rev = "902c016b3485d983e051956246c72657c0f2a3cd", package = "wavs-ipfs"}

# Other
schemars = "1.0.4"
Expand Down
1 change: 1 addition & 0 deletions components/merkler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ alloy-rpc-types = { workspace = true }
wavs-indexer-api = { workspace = true }
wavs-merkle-sources = { workspace = true }
futures = { workspace = true }
wavs-ipfs = { workspace = true }

## IPFS
cid = { workspace = true }
Expand Down
190 changes: 0 additions & 190 deletions components/merkler/src/ipfs.rs

This file was deleted.

3 changes: 1 addition & 2 deletions components/merkler/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#[rustfmt::skip]
pub mod bindings;
mod config;
mod ipfs;
mod merkle;
mod trigger;

Expand Down Expand Up @@ -119,7 +118,7 @@ impl Guest for Component {
});

let ipfs_data_json = serde_json::to_string(&ipfs_data).map_err(|e| e.to_string())?;
let cid = ipfs::upload_json_to_ipfs(
let cid = wavs_ipfs::upload_json_to_ipfs(
&ipfs_data_json,
&format!("merkle_{}.json", ipfs_data.root),
&config.ipfs_url,
Expand Down
38 changes: 31 additions & 7 deletions script/DeployEAS.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,39 @@ contract DeployEAS is Common {
string memory _contractsJson = "contracts";
string memory _schemasJson = "schemas";

// 1. Deploy SchemaRegistry
SchemaRegistry schemaRegistry = new SchemaRegistry();
_contractsJson.serialize("schema_registry", Strings.toChecksumHexString(address(schemaRegistry)));
console.log("SchemaRegistry deployed at:", address(schemaRegistry));
// Base network native EAS addresses (predeploy contracts)
// See: https://docs.base.org/docs/contracts/
address BASE_EAS = 0x4200000000000000000000000000000000000021;
address BASE_SCHEMA_REGISTRY = 0x4200000000000000000000000000000000000020;

uint256 chainId = block.chainid;
bool isBase = (chainId == 8453 || chainId == 84532); // Base Mainnet (8453) or Base Sepolia (84532)

SchemaRegistry schemaRegistry;
EAS eas;

if (isBase) {
// Use Base's native EAS contracts
console.log("Detected Base network (chainId:", chainId, ") - using native EAS contracts");
schemaRegistry = SchemaRegistry(BASE_SCHEMA_REGISTRY);
eas = EAS(BASE_EAS);
console.log("Using Base SchemaRegistry at:", address(schemaRegistry));
console.log("Using Base EAS at:", address(eas));
} else {
// Deploy our own EAS contracts for non-Base networks
console.log("Deploying EAS contracts for chainId:", chainId);

// 1. Deploy SchemaRegistry
schemaRegistry = new SchemaRegistry();
console.log("SchemaRegistry deployed at:", address(schemaRegistry));

// 2. Deploy EAS
eas = new EAS(ISchemaRegistry(address(schemaRegistry)));
console.log("EAS deployed at:", address(eas));
}

// 2. Deploy EAS
EAS eas = new EAS(ISchemaRegistry(address(schemaRegistry)));
_contractsJson.serialize("schema_registry", Strings.toChecksumHexString(address(schemaRegistry)));
_contractsJson.serialize("eas", Strings.toChecksumHexString(address(eas)));
console.log("EAS deployed at:", address(eas));

// 3. Deploy EASIndexerResolver
EASIndexerResolver indexerResolver = new EASIndexerResolver(IEAS(address(eas)));
Expand Down