-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* implemented SubscriptionManager class and createSubscription method * regenerated package-lock.json * added recompilation in separate command * regenerated package-lock.json * added env var during hardhat compilation * ran prettier * fixed corrupted package-lock.json
- Loading branch information
Showing
19 changed files
with
4,061 additions
and
1,268 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
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 |
---|---|---|
@@ -1,3 +1,19 @@ | ||
# functions-toolkit | ||
|
||
An NPM package with collection of functions that can be used for working with Chainlink Functions. | ||
|
||
## Functions Billing Subscription Management | ||
|
||
The `SubscriptionManager` class is used to manage the billing subscription used to pay for Functions requests. Create an instance of this class by passing an instance of the [Ethers.js Signer class](https://docs.ethers.org/v5/api/signer/#Signer) with a connected provider and the address of the [Functions Oracle proxy and the Functions Oracle Registry proxy](https://docs.chain.link/chainlink-functions/supported-networks) contracts on the desired network. | ||
|
||
> const subscriptionManager = new SubscriptionManager( | ||
> signer: [Signer](https://docs.ethers.org/v5/api/signer/#Signer), | ||
> [functionsOracleProxyAddress](https://docs.chain.link/chainlink-functions/supported-networks): string, | ||
> [functionsOracleRegistryProxyAddress](https://docs.chain.link/chainlink-functions/supported-networks): string | ||
> ) | ||
### Create Subscription | ||
|
||
> subscriptionManager.createSubscription() => Promise\<BigInt> | ||
Creates a new Functions billing subscription using the Functions Oracle Registry contract and returns the subscription ID. |
Oops, something went wrong.