Skip to content

Commit

Permalink
Deploy to dev and prod scripts (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
anxolin authored Aug 19, 2023
1 parent 233eed3 commit 46ebf44
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 0 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
79 changes: 79 additions & 0 deletions tenderly-prod.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 46ebf44

Please sign in to comment.