Skip to content

Commit c8521f9

Browse files
authored
feat: allow deploying to a different defaultAdmin (#447)
* feat: allow deploying to a different defaultAdmin * make primary_sale_recipient optional
1 parent cbb7ff2 commit c8521f9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+217
-1387
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
THIRDWEB_API_SECRET_KEY="<your-thirdweb-api-secret-key>"
55
# The connection url for your running postgres instance, defaults to localhost postgres
66
POSTGRES_CONNECTION_URL="postgresql://postgres:postgres@localhost:5432/postgres?sslmode=disable"
7-
# The admin wallet that will be able to connect to engine from the dashboard
7+
# The admin wallet that will be able to connect to Engine from the dashboard
88
ADMIN_WALLET_ADDRESS="<your-admin-wallet-address>"
99

1010
# =====[ Optional Configuration ]=====

README.md

Lines changed: 27 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,25 @@
88
<h1 align="center"><a href='https://thirdweb.com/'>thirdweb</a> Engine</h1>
99

1010
<p align="center">
11+
<a href="https://hub.docker.com/r/thirdweb/engine">
12+
<img alt="Latest Docker version" src="https://img.shields.io/docker/v/thirdweb/engine?sort=semver&label=docker&logo=docker"/>
13+
</a>
1114
<a href="https://discord.gg/thirdweb">
12-
<img alt="Join our Discord!" src="https://img.shields.io/discord/834227967404146718.svg?color=7289da&label=discord&logo=discord&style=flat"/>
15+
<img alt="Join the thirdweb Discord" src="https://img.shields.io/discord/834227967404146718.svg?color=7289da&label=discord&logo=discord&style=flat"/>
1316
</a>
1417
</p>
1518

16-
Engine is a backend HTTP server that calls smart contracts with your managed backend wallets.
19+
Engine is an open-source, backend HTTP server that provides a production-ready interface to read, write, and deploy contracts on the blockchain.
1720

18-
[**Read the documentation**](https://portal.thirdweb.com/engine) for features, setup, configuration, guides, and references.
21+
<p align="center">
22+
<img src="./docs/images/engine-overview.webp" alt="Overview" width="400">
23+
</p>
1924

20-
<!-- Source: https://whimsical.com/engine-architecture-2G6rXEvUM2HFmVwKxPWyzS -->
21-
<img src="./docs/images/overview.png" alt="Overview" width="820">
25+
## Quick links
26+
27+
- [Documentation](https://portal.thirdweb.com/engine)
28+
- [Self-host instructions](https://portal.thirdweb.com/engine/self-host)
29+
- [Get Engine hosted by thirdweb](https://thirdweb.com/dashboard/engine?requestCloudHosted)
2230

2331
## Features
2432

@@ -30,41 +38,23 @@ Engine is a backend HTTP server that calls smart contracts with your managed bac
3038
- Wallet and contract webhooks
3139
- And [much more!](https://portal.thirdweb.com/engine)
3240

33-
## Quickstart
34-
35-
1. Install [Docker](https://docs.docker.com/get-docker/).
36-
1. Run Postgres.
37-
```bash
38-
docker run -p 5432:5432 -e POSTGRES_PASSWORD=postgres -d postgres
39-
```
40-
1. Run Engine.
41-
```bash
42-
docker run \
43-
-e ENCRYPTION_PASSWORD="<encryption_password>" \
44-
-e THIRDWEB_API_SECRET_KEY="<thirdweb_secret_key>" \
45-
-e ADMIN_WALLET_ADDRESS="<admin_wallet_address>" \
46-
-e POSTGRES_CONNECTION_URL="postgresql://postgres:postgres@host.docker.internal:5432/postgres?sslmode=disable" \
47-
-e ENABLE_HTTPS=true \
48-
-p 3005:3005 \
49-
--pull=always \
50-
--cpus="0.5" \
51-
thirdweb/engine:latest
52-
```
53-
1. Navigate to the [Engine dashboard](https://thirdweb.com/dashboard/engine).
54-
- CORS error? Load https://localhost:3005 in your browser first.
55-
1. Create or import a [local wallet](https://portal.thirdweb.com/engine/backend-wallets).
56-
57-
Learn more: [Getting Started](https://portal.thirdweb.com/engine/getting-started)
58-
59-
> **Production:** Deploy Postgres and Engine to your cloud provider. Consider creating [KMS backend wallets](https://portal.thirdweb.com/engine/backend-wallets).
60-
61-
## Self Host
62-
63-
[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/EASlyJ)
41+
## Get Engine
42+
43+
### Self-host
44+
45+
Host Engine on your own instructure for free. [View self-host instructions](https://portal.thirdweb.com/engine/self-host).
46+
47+
Other deployment options:
48+
49+
- [Deploy on Railway](https://railway.app/template/EASlyJ)
50+
51+
### Cloud-host
52+
53+
[Get Engine hosted and managed by thirdweb](https://thirdweb.com/dashboard/engine?requestCloudHosted).
6454

6555
## Contributing
6656

67-
We welcome external contributions! See [how to contribute to thirdweb repos]. Please try to follow the existing code style and conventions.
57+
We welcome contributions! See [How to contribute](./contributing.md).
6858

6959
## Get in touch
7060

contributing.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# How to contribute
2+
3+
The thirdweb team welcomes contributions!
4+
5+
## Workflow
6+
7+
For OSS contributions, we use a [Forking Workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow). Develop locally on your own fork and submit a PR to the main repo when you're ready for your changes to be reviewed.
8+
9+
1. [Create a fork](https://github.com/thirdweb-dev/engine/fork) of this repository to your own GitHub account.
10+
1. [Clone your fork](https://help.github.com/articles/cloning-a-repository/) to your local machine.
11+
1. Create a new branch on your fork to start working on your changes:
12+
13+
```bash
14+
git checkout -b MY_BRANCH_NAME
15+
```
16+
17+
1. Install the dependencies:
18+
19+
```bash
20+
yarn install
21+
```
22+
23+
1. Make changes on your branch.
24+
1. Make a pull request to the `thirdweb-dev/engine:main` branch.
25+
26+
## Test Your Changes
27+
28+
Please run Engine locally to test your changes.
29+
30+
```bash
31+
yarn dev
32+
```
33+
34+
You should be able to make requests to Engine locally and import it to the [thirdweb dashboard](https://thirdweb.com/dashboard/engine).

docs/1-user-guide.md

Lines changed: 0 additions & 203 deletions
This file was deleted.

docs/2-smart-wallets.md

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)