You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can find and update the function's configuration in [`serverless.yml`](https://github.com/yosriady/serverless-ethers/blob/master/serverless.yml):
26
+
27
+
```yml
28
+
service: serverless-ethers
29
+
provider:
30
+
name: aws
31
+
runtime: nodejs12.x
32
+
region: ap-southeast-1
33
+
timeout: 30
34
+
environment:
35
+
DEFAULT_GAS_PRICE: 60000000000
36
+
MNEMONIC: ...
37
+
```
38
+
39
+
This example uses the following environment variables:
40
+
41
+
- `DEFAULT_GAS_PRICE`: Default gas price used when making write transactions.
42
+
- `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!
43
+
- `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)
44
+
45
+
> You can change your deployed function's environment variables on the fly from the AWS Lambda console.
46
+
47
+
### Triggering the function locally
48
+
49
+
```bash
50
+
serverless invoke local --function exec
51
+
```
52
+
53
+
This will execute the smart contract function from your local machine.
54
+
Great for debugging and testing.
55
+
56
+
### Deploying to AWS
57
+
58
+
```bash
59
+
serverless deploy
60
+
```
61
+
62
+
## Thanks
63
+
64
+
**serverless-ethers** 💌 2020+, Yos Riady. Released under the [MIT] License.<br>
65
+
Authored and maintained by Yos Riady with help from contributors ([list][contributors]).
0 commit comments