When you have completed Step 2 - Deploying the Ethereum Adapter with Cloudformation, you may configure the adapter for use.
1. Find the product management URL
You can find the product management url, or public ipv4 address of the deployed EC2 instance either in the EC2 instance details, or with the deployed stack in CloudFormation, in your stack look for "output".
CloudFormation automatically assigns a public ipv4 address to your instance, and it will also create a URL for you in the format ec2-18.104.22.168.region.compute.amazonaws.com. You may use either.
When you visit the address you'll be presented with a screen like shown here:
2. Setup TLS (optional, recommended)
Depending how you have setup your VPC and connect to the adapter you may or may not already have a secure connection to our product. If you don't know, you should probably assume you don't.
Unchain can automatically fetch a certificate for you
To let unchain automatically fetch a certificate for you, the first thing you'll need to do is point a domain name of your own to the IP address of the adapter. This may be a subdomain of a domain you already own. e.g. adapter01.yourdomain.com -> 22.214.171.124
When you visit your site, prefixed with https:// for the first time, we'll detect that a certificate is required and fetch one from LetsEncrypt automatically. Please note: since this takes a while your first request may time out. When successful you should notice the secure lock icon?.
Note: you cannot use one of the AWS assigned dns names, such as ending with compute-1.amazonaws.com, as these have been blacklisted for security reasons.
3. Configure the connection to the Ethereum Node
- After you enter the admin password you selected when deploying the Ethereum Adapter you'll be presented with the Ethereum Adapter main screen.
- To enter configuration mode, select "edit config", you'll be presented a wizard asking you a number of questions:
The Ethereum Node address. This should be the accessible http RPC port on the Ethereum node (typically Geth or Parity).
- Basic Auth is supported by including it in the URL e.g. like https://user:firstname.lastname@example.org:8545
- You may test if the node is reachable from our adapter. -- This is particularly useful if you deployed in a private VPC
A Private key. In order to sign transactions we need a private key which has some balance on the Ethereum network.
- We'll keep your private key secure! -- it's stored in AWS Secrets Manager, which is in turn backed by a Hardware Security Module (HSM). We don't store it on disk anywhere else, not even in the adapter.
- We'll never return the private key back to you through this interface.
- We'll generate the wallet address from your private key for you.
- You may check your balance. This is a good indication everything is setup correctly so far.
Deploy a new, or select existing contract. You may now either deploy a new contract (click browse), or connect to an existing contract.
- We don't save the contract until you press "Save"
- When you're deploying a new contract select "submit transaction for mining"
- Depending on the speed, setup, traffic and timing it may take a while for the contract to be mined (persisted into the blockchain). On a private blockchain this is usually within a few minutes.
- When you're connecting to an existing contract you can still check the contract address exists.
- We don't have a way to validate whether the ABI you supply matches the contract address, so you'll want to check that they do.
- API Key for the Ethereum API. This key is the one you'll use to connect TO the Ethereum Adapter. You may choose one or have one randomly generated.
Well done! You have successfully configured the unchain Ethereum Adapter to connect to your Ethereum network.