Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yosriady/serverless-ethers
Serverless smart contract automation service, built on the Serverless framework.
https://github.com/yosriady/serverless-ethers
ethereum serverless solidity
Last synced: about 2 hours ago
JSON representation
Serverless smart contract automation service, built on the Serverless framework.
- Host: GitHub
- URL: https://github.com/yosriady/serverless-ethers
- Owner: yosriady
- Created: 2020-07-02T03:01:53.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-10-21T03:25:12.000Z (28 days ago)
- Last Synced: 2024-10-21T06:33:07.803Z (28 days ago)
- Topics: ethereum, serverless, solidity
- Homepage: https://yos.io/2020/07/04/serverless-smart-contract-automation/
- Size: 76.2 KB
- Stars: 35
- Watchers: 5
- Forks: 16
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# serverless-ethers
Learn more by reading the blog post: [Serverless Smart Contract Automation](https://yos.io/2020/07/04/serverless-smart-contract-automation/).
## Table of Contents
| | Description | Stack |
| ----------------------------------- | ------------------------------------------- | --------------------- |
| [`contracts`](contracts) | ๐ผ Smart contract ABIs | `json`, `ethereum` |
| [`functions`](functions) | ๐ Lambda functions | `node`, `js` |## Prerequisites
Install the [Serverless Framework CLI](https://www.serverless.com/framework/docs/getting-started/).
## Getting Started
```bash
git clone [email protected]:yosriady/serverless-ethers.git
cd serverless-ethers
nvm use
npm install
```### Set your environment variables
You can find and update the function's configuration in [`serverless.yml`](https://github.com/yosriady/serverless-ethers/blob/master/serverless.yml):
```yml
service: serverless-ethers
provider:
name: aws
runtime: nodejs12.x
region: ap-southeast-1
timeout: 30
environment:
DEFAULT_GAS_PRICE: 60000000000
MNEMONIC: ...
```This example uses the following environment variables:
- `DEFAULT_GAS_PRICE`: Default gas price used when making write transactions.
- `MNEMONIC`: 12-word mnemonic used to derive an Ethereum address, make sure it's funded with Ether if you intend to write data to Ethereum!
- `SLACK_HOOK_URL`: The example sends messages to Slack using [Incoming Webhooks](https://api.slack.com/messaging/webhooks). You can get this URL from your Slack dashboard. (Optional)> You can change your deployed function's environment variables on the fly from the AWS Lambda console.
### Triggering the function locally
```bash
serverless invoke local --function exec
```This will execute the smart contract function from your local machine.
Great for debugging and testing.### Deploying to AWS
```bash
serverless deploy
```## Thanks
**serverless-ethers** 2020+, Yos Riady. Released under the [MIT] License.
Authored and maintained by Yos Riady with help from contributors ([list][contributors]).> [yos.io](http://yos.io) ย ยทย
> GitHub [@yosriady](https://github.com/yosriady)[MIT]: http://mit-license.org/
[contributors]: http://github.com/yosriady/serverless-ethers/contributors