When signing a transaction, you need to verify each byte of the transaction payload. On legacy hardware wallets, this is nearly impossible because you will have to scroll through and verify a couple of bytes of a long hex string at a time - from which you don't get any security benefit at all, as you don't really know what you're signing. Ethereum smart contract ABI (Application Binary Interface) definitions fix exactly that - they translate the hex string to human-readable text so you can make sure you're signing exacly what you want to sign. The Lattice1 is the first hardware wallet with support for smart contract definitions.
Here's an example of a parsed transaction request from Uniswap:
Now, let's have a look at how to load contract ABIs into your Lattice1 and manage them. Go to the GridPlus Web Wallet and login to get started!
Next, go to the Contract Data tab in the menu on the left. As you can see, you can choose from Packs, Address and Manual. Let's have a look at each one.
We offer ABI contract packs we have compiled for you for various projects that you can download to your Lattice1 with a few clicks from the Web Wallet. Here's how:
1. Simply choose the contract definition pack you'd like to download to your Lattice1. You can choose from the following DeFi apps:
2. Once you've selected the pack you want to use, click on Check latest and then Install. We'll go with Uniswap contract definitions as an example. The Web Wallet will now look like this:
3. Your Lattice1 will prompt you to approve installing the contract definitions - tap on Yes. If you take too long, you will have to retry as there's a rather short time window in which you have to approve this.
4. The device will now start adding the contract function definitions, two at a time. When this is done, you will have to approve new definitions that were not seen before, so simply tap on Approve until you go through all of them.
6. And you're done!
7. You can now start working with the DeFi app you've selected, all transaction requests will now look like this instead of a hex string (this is a Uniswap token swap request):
You can get all contract definitions associated with a single smart contract through the Address tab.
1. To do this, head to Etherscan and look for the app/token you want to add contract definitions for - let's go with our GRID token as an example. You need to look up the token and then copy the address of the smart contract that tracks the token - you can find it under Profile Summary.
2. Paste the smart contract address to the Contract address window and press enter, if the Web Wallet finds the contract, it will show you how many contract definitions are available and you will be now able to install them. When you click on Install, you will have to approve this on your Lattice1 screen.
3. And you're done!
The Manual tab lets you add separate ABIs directly. This is the most advanced option we offer for adding smart contract function definitions.
1.To get started, find the smart contract on Etherscan and go to the Contract tab.
2. Scroll down until you find the Contract ABI section and copy it to clipboard or select seperate ABI definitions you want to use and copy these.
3. Paste what you copied into the window for contract ABI definitions and the Web Wallet will go through them automatically and tell you how many functions can be added to your Lattice1. Click on Install to get them and approve on your Lattice1 screen.
4. And you're done!
If you want to clear out contract definitions you've saved on your Lattice1, simply tap on Settings, select Smart contracts and tap on Remove all.