-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(rg): Relay group support (#563)
* Initial support * Improvements * Updates * Impr * Apply changes * chore(relayer-group): Improvements * feat(status): Add expired to list status * feat(status): add expired status * fix example: * feat(rg-status): Introduce new type for relayer group sstatus * chore(suggestions): Apply PR suggestions * Update packages/relay-group/src/models/index.ts Co-authored-by: Nami <[email protected]> * chore(remove): Remove duplicate entry * Update packages/relay-group/src/api/index.ts --------- Co-authored-by: ShahNami <[email protected]>
- Loading branch information
Showing
24 changed files
with
1,196 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# example-create-relayer-group |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
require('dotenv').config(); | ||
|
||
const { Defender } = require('@openzeppelin/defender-sdk'); | ||
const https = require('https'); | ||
|
||
async function main() { | ||
const creds = { | ||
apiKey: process.env.API_KEY, | ||
apiSecret: process.env.API_SECRET, | ||
//optional https config to keep connection alive. You can pass any configs that are accepted by https.Agent | ||
httpsAgent: https.Agent({ keepAlive: true }), | ||
}; | ||
const client = new Defender(creds); | ||
|
||
const createParams = { | ||
name: 'MyNewRelayerGroup', | ||
network: 'sepolia', | ||
relayers: 4, | ||
minBalance: BigInt(1e17).toString(), | ||
policies: { | ||
EIP1559Pricing: true, | ||
}, | ||
}; | ||
|
||
const relayerGroup = await client.relayGroup.create(createParams); | ||
|
||
console.log(relayerGroup); | ||
|
||
const relayerGroupApiKey = await client.relayGroup.createKey(relayerGroup.id); | ||
|
||
console.log(relayerGroupApiKey); | ||
} | ||
|
||
if (require.main === module) { | ||
main().catch(console.error); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "example-create-relayer-group", | ||
"version": "1.13.4", | ||
"private": true, | ||
"main": "index.js", | ||
"author": "Defender <[email protected]>", | ||
"license": "MIT", | ||
"scripts": { | ||
"start": "node index.js" | ||
}, | ||
"dependencies": { | ||
"@openzeppelin/defender-sdk": "1.13.4", | ||
"dotenv": "^16.3.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,251 @@ | ||
# @openzeppelin/defender-sdk-relay-group-client | ||
|
||
## 1.13.4 | ||
|
||
### Patch Changes | ||
|
||
- 985443f: feat: add backwards compatibility to ethersv5 | ||
- Updated dependencies [985443f] | ||
- @openzeppelin/defender-sdk-base-client@1.13.4 | ||
|
||
## 1.13.3 | ||
|
||
### Patch Changes | ||
|
||
- 2d1655d: feat: Add stackId in update relayer request | ||
feat: Add Auth v2 support with `useCredentialsCaching` to cache access token | ||
- Updated dependencies [2d1655d] | ||
- @openzeppelin/defender-sdk-base-client@1.13.3 | ||
|
||
## 1.13.3 | ||
|
||
### Patch Changes | ||
|
||
- e55d50a: Patch: Fix aws-sdk v3 action error payload | ||
- Updated dependencies [e55d50a] | ||
- @openzeppelin/defender-sdk-base-client@1.13.3 | ||
|
||
## 1.13.0 | ||
|
||
### Minor Changes | ||
|
||
- ff4a967: - feat: add exponential backoff logic for retry | ||
- fix: add conditional imports for v2 and v3 for actions | ||
- chore: add loadbalance example for rate limit number of transactions | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [ff4a967] | ||
- @openzeppelin/defender-sdk-base-client@1.13.0 | ||
|
||
## 1.12.0 | ||
|
||
### Minor Changes | ||
|
||
- 6b45bce: - feat: Support Holesky & Amoy networks. | ||
- chore: Add retries to 520 errors. | ||
- feat: Allow optional httpsAgent options. | ||
- fix: Avoid relaySigner ENS resolution by default. | ||
- chore: Upgrade dependencies. | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [6b45bce] | ||
- @openzeppelin/defender-sdk-base-client@1.12.0 | ||
|
||
## 1.11.0 | ||
|
||
### Minor Changes | ||
|
||
- 49c1994: refactor: Deprecate optimism-goerli network | ||
chore: Enable zkEVM networks | ||
chore: Upgrade npm packages | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [49c1994] | ||
- @openzeppelin/defender-sdk-base-client@1.11.0 | ||
|
||
## 1.10.0 | ||
|
||
### Minor Changes | ||
|
||
- 7e14499: fix: Add missing dependencies for cli tool to manage actions. | ||
fix: Add confirmation property to tx override. | ||
refactor: Remove deprecated config resources | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [7e14499] | ||
- @openzeppelin/defender-sdk-base-client@1.10.0 | ||
|
||
## 1.9.0 | ||
|
||
### Minor Changes | ||
|
||
- ed29a58: - chore: Autotask & actions condition names. | ||
- feat: Add Web3 & list contract examples. | ||
- feat: Add support to Zksync sepolia. | ||
- feat: Upgrade dependencies. | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [ed29a58] | ||
- @openzeppelin/defender-sdk-base-client@1.9.0 | ||
|
||
## 1.8.0 | ||
|
||
### Minor Changes | ||
|
||
- 688e4de: chore: Remove all non-required attributes from artifact | ||
feat: Add new private network endpoints | ||
feat: Add abi configuration for listing contracts | ||
chore: Add missing artifact attributes | ||
chore: Rename simulation transaction type | ||
chore: Add txOverrides parameter | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [688e4de] | ||
- @openzeppelin/defender-sdk-base-client@1.8.0 | ||
|
||
## 1.7.0 | ||
|
||
### Minor Changes | ||
|
||
- 97d593c: Feat: Add support to Base Sepolia & Optimism Sepolia networks. | ||
Feat: Add support to ethers v6 | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [97d593c] | ||
- @openzeppelin/defender-sdk-base-client@1.7.0 | ||
|
||
## 1.6.0 | ||
|
||
### Minor Changes | ||
|
||
- 9583851: Feat: Support Arbitrum sepolia | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [9583851] | ||
- @openzeppelin/defender-sdk-base-client@1.6.0 | ||
|
||
## 1.5.0 | ||
|
||
### Minor Changes | ||
|
||
- 29be958: feat: add environment variable endpoints to actions | ||
feat: add meld network | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [29be958] | ||
- @openzeppelin/defender-sdk-base-client@1.5.0 | ||
|
||
## 1.4.0 | ||
|
||
### Minor Changes | ||
|
||
- c538fb7: - feat: Add support to scroll mainnet | ||
- feat: Added missing actions utilities | ||
- chore: Bump platform SDK dependencies | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [c538fb7] | ||
- @openzeppelin/defender-sdk-base-client@1.4.0 | ||
|
||
## 1.3.0 | ||
|
||
### Minor Changes | ||
|
||
- 001029a: - feat: add scroll sepolia network | ||
- feat: enforce base package to build first | ||
- feat: export created types | ||
- feat: changed sentinel attribute by monitor | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [001029a] | ||
- @openzeppelin/defender-sdk-base-client@1.3.0 | ||
|
||
## 1.2.0 | ||
|
||
### Minor Changes | ||
|
||
- 37edbc7: - feat: forked networks support | ||
- feat: network client | ||
- ci: security updates | ||
- fix: actions example | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [37edbc7] | ||
- @openzeppelin/defender-sdk-base-client@1.2.0 | ||
|
||
## 1.1.0 | ||
|
||
### Minor Changes | ||
|
||
- 0851ae2: - Fix: Create relayer key bug | ||
- Fix: Notification client typo | ||
- Fix: Patch security vulnerabilities | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [0851ae2] | ||
- @openzeppelin/defender-sdk-base-client@1.1.0 | ||
|
||
## 1.0.0 | ||
|
||
### Major Changes | ||
|
||
- 8711a12: - Migrate platform-sdk to defender-sdk | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [8711a12] | ||
- @openzeppelin/defender-sdk-base-client@1.0.0 | ||
|
||
## 0.4.0 | ||
|
||
### Minor Changes | ||
|
||
- be73034: Feat: Support linea & base | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [be73034] | ||
- @openzeppelin/platform-sdk-base-client@0.4.0 | ||
|
||
## 0.3.0 | ||
|
||
### Minor Changes | ||
|
||
- efefd68: feat: Add support of instantiating defender-sdk package from Defender Actions | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [efefd68] | ||
- @openzeppelin/defender-sdk-base-client@0.3.0 | ||
|
||
## 0.2.0 | ||
|
||
### Minor Changes | ||
|
||
- 496f88d: ### CHANGES | ||
|
||
- feat: list network endpoints | ||
- ci: fix ci bugs | ||
- fix: type with actionId | ||
- feat: add support to base mainnet | ||
- feat: add `skipABIValidation` flag to monitor create request | ||
- ci: add changeset actions | ||
- ci: remove provenance | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [496f88d] | ||
- @openzeppelin/defender-sdk-base-client@0.2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Defender SDK Relay Group Client | ||
|
||
The OpenZeppelin Defender provides a security operations (SecOps) platform for Ethereum with built-in best practices. Development teams implement Defender to ship faster and minimize security risks. | ||
|
||
This library provides methods related to relayer groups. See Examples for usage. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('../../jest.config'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"name": "@openzeppelin/defender-sdk-relay-group-client", | ||
"version": "1.14.4", | ||
"description": "", | ||
"main": "./lib/index.js", | ||
"types": "./lib/index.d.ts", | ||
"scripts": { | ||
"build": "rm -rf lib && tsc", | ||
"test": "npm run test:unit", | ||
"test:unit": "jest --verbose --passWithNoTests --forceExit", | ||
"watch": "tsc -w" | ||
}, | ||
"files": [ | ||
"lib", | ||
"!*.test.js", | ||
"!*.test.js.map", | ||
"!*.test.d.ts", | ||
"!*__mocks__" | ||
], | ||
"author": "OpenZeppelin Defender <[email protected]>", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@openzeppelin/defender-sdk-base-client": "^1.14.4", | ||
"axios": "^1.7.2", | ||
"lodash": "^4.17.21" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
} | ||
} |
Oops, something went wrong.