From 8829428cda237107afde6deb00fbcc28757079e3 Mon Sep 17 00:00:00 2001 From: Anxo Rodriguez Date: Fri, 18 Aug 2023 10:29:45 +0100 Subject: [PATCH] Deploy to dev and prod scripts --- package.json | 2 ++ tenderly-prod.yaml | 79 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 tenderly-prod.yaml diff --git a/package.json b/package.json index e991598..254e6de 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,8 @@ "lint:actions": "eslint && prettier --check ./actions", "test:actions": "yarn build:actions && yarn ts-node actions/test/test_register.ts", "start:actions": "yarn ts-node actions/test/run_local.ts", + "deploy:dev": " tenderly actions deploy --project-config tenderly", + "deploy:prod": " tenderly actions deploy --project-config tenderly-prod", "fmt:cli": "prettier ./cli -w", "lint:cli": "eslint && prettier --check ./cli", "build:cli": "cd cli && npm ci && yarn run build", diff --git a/tenderly-prod.yaml b/tenderly-prod.yaml new file mode 100644 index 0000000..0d6c481 --- /dev/null +++ b/tenderly-prod.yaml @@ -0,0 +1,79 @@ +account_id: 9732a0da-5849-4b68-a671-9c4bf1266ca4 +# project_slug: anxolin@gmail.com +provider: "" + +actions: + gp-v2/production: + runtime: v1 + sources: actions + specs: + register_single_order: + description: Listens to events that index new single conditional orders + function: addContract:addContract + trigger: + transaction: + filters: + - logEmitted: + startsWith: + # `ConditionalOrderCreated(address, (address,bytes32,bytes))` + - 0x2cceac5555b0ca45a3744ced542f54b56ad2eb45e521962372eef212a2cbf361 + network: + - 1 + - 5 + - 100 + status: success + status: + - mined + type: transaction + + register_merkle_root: + description: Listens to events that index a merkle root of conditional orders + function: addContract:addContract + trigger: + transaction: + filters: + - logEmitted: + startsWith: + # `MerkleRootSet(address, bytes32, (uint256, bytes))` + - 0x58662f46b4a87d0f96d929b24c37fe25c55d52c0025d0b2bec3936534cc31e57 + network: + - 1 + - 5 + - 100 + status: success + status: + - mined + type: transaction + + watch_settlements: + description: Watch for settled trades and update the state + function: checkForSettlement:checkForSettlement + trigger: + transaction: + filters: + - logEmitted: + startsWith: + # `Trade(address, address, address, uint256, uint256, uint256, bytes)` + - 0xa07a543ab8a018198e99ca0184c93fe9050a79400a0a723441f84de1d972cc17 + network: + - 1 + - 5 + - 100 + status: success + status: + - mined + type: transaction + + watch_orders: + description: + Checks on every block if the registered smart order contract + wants to trade + function: checkForAndPlaceOrder:checkForAndPlaceOrder + trigger: + block: + blocks: 5 + network: + - 1 + - 5 + - 100 + type: block