Skip to content

Commit

Permalink
Add task creation
Browse files Browse the repository at this point in the history
  • Loading branch information
chalex-eth committed Oct 10, 2024
1 parent 78b2712 commit 3dfd5f0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
help:
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

RPC_URL=http://localhost:8545
DEPLOYER_PK=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
TASK_REGISTRY_ADDRESS=0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512
TASK_ID=0xc86aab04e8ef18a63006f43fa41a2a0150bae3dbe276d581fa8b5cde0ccbc966

-----------------------------: ##

Expand All @@ -16,5 +19,10 @@ build-contracts: ## builds all contracts
test-contracts: ## tests all contracts
cd contracts && forge test

deploy-contracts: ## deploy contracts (you need to run anvil first in a separate terminal)
cd contracts && forge script script/DeployTaskAndAppRegistry.s.sol --rpc-url http://localhost:8545 --broadcast --private-key $(DEPLOYER_PK)
deploy-contracts: ## deploy contracts (you need to run anvil first in a separate terminal and the contract deployed)
cd contracts && forge script script/DeployTaskAndAppRegistry.s.sol --rpc-url $(RPC_URL) --broadcast --private-key $(DEPLOYER_PK)

__TASKS__: ##

create-task: ## create a task (you need to run anvil first in a separate terminal and the contract deployed)
cast send $(TASK_REGISTRY_ADDRESS) "createTask(bytes32)" $(TASK_ID) --private-key $(DEPLOYER_PK) --rpc-url $(RPC_URL)
1 change: 1 addition & 0 deletions contracts/script/DeployTaskAndAppRegistry.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ contract DeployTaskAndAppRegistry is Script, Constants {
taskRegistry = new TaskRegistry(msg.sender, AGGREGATOR_NODE, address(clientAppRegistry));

bytes32 clientAppId = keccak256("ethereum-block-number");
console2.logBytes32(clientAppId);
clientAppRegistry.registerClientApp(
clientAppId,
ClientAppMetadata({
Expand Down

0 comments on commit 3dfd5f0

Please sign in to comment.