Skip to content

Commit

Permalink
Merge pull request #14 from OpenZeppelin/plat-1923-pac-define-all-res…
Browse files Browse the repository at this point in the history
…ources-under-platform-instead-of-functions

Restructure `serverless.yml` format and add TS types
  • Loading branch information
shahnami authored Jul 23, 2023
2 parents 2105e83 + 081141c commit 6e34f36
Show file tree
Hide file tree
Showing 107 changed files with 2,484 additions and 1,808 deletions.
54 changes: 26 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,33 +41,32 @@ platform:
key: '${env:TEAM_API_KEY}'
secret: '${env:TEAM_API_SECRET}'

functions:
action-example-1:
name: 'Hello world from serverless'
path: './actions/hello-world'
relayer: ${self:resources.Resources.relayers.relayer-1}
trigger:
type: 'schedule'
frequency: 1500
paused: false

resources:
Resources:
policies:
policy-1:
gas-price-cap: 1000
whitelist-receivers:
- '0x0f06aB75c7DD497981b75CD82F6566e3a5CAd8f2'
eip1559-pricing: true

relayers:
relayer-1:
name: 'Test Relayer 1'
network: 'goerli'
min-balance: 1000
policy: ${self:resources.Resources.policies.policy-1}
api-keys:
- key1
actions:
action-example-1:
name: 'Hello world from serverless'
path: './actions/hello-world'
relayer: ${self:resources.relayers.relayer-1}
trigger:
type: 'schedule'
frequency: 1500
paused: false

policies:
policy-1:
gas-price-cap: 1000
whitelist-receivers:
- '0x0f06aB75c7DD497981b75CD82F6566e3a5CAd8f2'
eip1559-pricing: true

relayers:
relayer-1:
name: 'Test Relayer 1'
network: 'goerli'
min-balance: 1000
policy: ${self:resources.policies.policy-1}
api-keys:
- key1

plugins:
- '@openzeppelin/platform-as-code'
Expand Down Expand Up @@ -111,7 +110,6 @@ We provide auto-generated documentation based on the JSON schemas:

- [Platform Property](https://github.com/OpenZeppelin/platform-as-code/blob/main/src/types/docs/platform.md)
- [Provider Property](https://github.com/OpenZeppelin/platform-as-code/blob/main/src/types/docs/provider.md)
- [Function (Action) Property](https://github.com/OpenZeppelin/platform-as-code/blob/main/src/types/docs/function.md)
- [Resources Property](https://github.com/OpenZeppelin/platform-as-code/blob/main/src/types/docs/resources.md)

More information on types can be found [here](https://github.com/OpenZeppelin/platform-as-code/blob/main/src/types/index.ts). Specifically, the types preceded with `Y` (e.g. YRelayer). For the schemas, you can check out the [docs-schema](https://github.com/OpenZeppelin/platform-as-code/blob/main/src/types/docs-schemas) folder.
Expand Down Expand Up @@ -161,7 +159,7 @@ Note that when setting up the notification configuration for a monitor, the `cha
```yaml
notify-config:
channels: [] # assign channels as empty list if you wish to use a category
category: ${self:resources.Resources.categories.medium-severity} # optional
category: ${self:resources.categories.medium-severity} # optional
```

Errors thrown during the `deploy` process, will not revert any prior changes. Common errors are:
Expand Down
Loading

0 comments on commit 6e34f36

Please sign in to comment.