diff --git a/.github/workflows/verify-template.yml b/.github/workflows/verify-template.yml index 92f25bc..72a2969 100644 --- a/.github/workflows/verify-template.yml +++ b/.github/workflows/verify-template.yml @@ -14,6 +14,9 @@ jobs: PROJECT_NAME: blueprint-template steps: - uses: actions/checkout@v4 + - uses: foundry-rs/foundry-toolchain@v1 + with: + version: nightly - uses: JohnPeel/cargo-generate-action@main with: name: ${{ env.PROJECT_NAME }} diff --git a/Cargo.lock b/Cargo.lock index f72e2d7..a5c0306 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1721,6 +1721,11 @@ dependencies = [ "zeroize", ] +[[package]] +name = "blueprint-build-utils" +version = "0.1.0" +source = "git+https://github.com/tangle-network/gadget#12da32de5136a2d22db0bc1581707a3e3bfb44f2" + [[package]] name = "blueprint-metadata" version = "0.1.6" @@ -1798,6 +1803,21 @@ dependencies = [ "serde", ] +[[package]] +name = "bp-test" +version = "0.1.0" +dependencies = [ + "async-trait", + "blueprint-build-utils", + "blueprint-metadata", + "color-eyre", + "gadget-sdk", + "structopt", + "tokio", + "tracing", + "tracing-subscriber 0.3.18", +] + [[package]] name = "bs58" version = "0.5.1" @@ -4369,20 +4389,6 @@ dependencies = [ "rand_core 0.6.4", ] -[[package]] -name = "gg" -version = "0.1.0" -dependencies = [ - "async-trait", - "blueprint-metadata", - "color-eyre", - "gadget-sdk", - "structopt", - "tokio", - "tracing", - "tracing-subscriber 0.3.18", -] - [[package]] name = "ghash" version = "0.5.1" diff --git a/Cargo.toml b/Cargo.toml index 50e382a..0ebbe27 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,6 +27,8 @@ features = ["getrandom"] [build-dependencies] blueprint-metadata = "0.1.6" +# TODO: Replace with versioned release +blueprint-build-utils = { git = "https://github.com/tangle-network/gadget" } [features] default = ["std"] diff --git a/build.rs b/build.rs index c77402e..6337030 100644 --- a/build.rs +++ b/build.rs @@ -1,4 +1,8 @@ fn main() { println!("cargo:rerun-if-changed=src/main.rs"); blueprint_metadata::generate_json(); + + let contract_dirs: Vec<&str> = vec!["./contracts"]; + blueprint_build_utils::soldeer_update(); + blueprint_build_utils::build_contracts(contract_dirs); } diff --git a/contracts/src/HelloBlueprint.sol b/contracts/src/HelloBlueprint.sol index 3972953..d375dcd 100644 --- a/contracts/src/HelloBlueprint.sol +++ b/contracts/src/HelloBlueprint.sol @@ -15,7 +15,10 @@ contract HelloBlueprint is BlueprintServiceManagerBase { * @param operator The operator's details. * @param _registrationInputs Inputs required for registration. */ - function onRegister(bytes calldata operator, bytes calldata _registrationInputs) + function onRegister( + ServiceOperators.OperatorPreferences calldata operator, + bytes calldata _registrationInputs + ) public payable override @@ -27,11 +30,9 @@ contract HelloBlueprint is BlueprintServiceManagerBase { /** * @dev Hook for service instance requests. Called when a user requests a service * instance from the blueprint. - * @param serviceId The ID of the requested service. - * @param operators The operators involved in the service. - * @param _requestInputs Inputs required for the service request. + * @param params The parameters for the service request. */ - function onRequest(uint64 serviceId, bytes[] calldata operators, bytes calldata _requestInputs) + function onRequest(ServiceOperators.RequestParams calldata params) public payable override @@ -46,7 +47,7 @@ contract HelloBlueprint is BlueprintServiceManagerBase { * @param serviceId The ID of the service related to the job. * @param job The job identifier. * @param _jobCallId The unique ID for the job call. - * @param participant The participant (operator) sending the result. + * @param operator The operator sending the result in bytes format. * @param _inputs Inputs used for the job execution. * @param _outputs Outputs resulting from the job execution. */ @@ -54,7 +55,7 @@ contract HelloBlueprint is BlueprintServiceManagerBase { uint64 serviceId, uint8 job, uint64 _jobCallId, - bytes calldata participant, + ServiceOperators.OperatorPreferences calldata operator, bytes calldata _inputs, bytes calldata _outputs ) public payable virtual override onlyFromRootChain { diff --git a/soldeer.lock b/soldeer.lock index a509b2c..bec7668 100644 --- a/soldeer.lock +++ b/soldeer.lock @@ -1,6 +1,5 @@ [[dependencies]] name = "tnt-core" version = "0.1.0" -source = "https://soldeer-revisions.s3.amazonaws.com/tnt-core/0_1_0_10-12-2024_20:51:20_tnt-core.zip" -checksum = "628b2475c4d629c1cb2578b41b2e10daa3711d711aa5f5b0dd6153959808620f" -integrity = "07e49929d89cefe2f075a4781a5e92d3f276b0de29c325c0cae9cddbc591e69e" +git = "https://github.com/tangle-network/tnt-core.git" +rev = "7ce2100bdb57472524a130488dace41a56cf3515"