Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Get started with Lilypad v1
The cloud is just somebody else's computer...
This guide will take you through
Setting up Metamask Wallet for the Lilypad Lalechuza (eth) Testnet
Funding your wallet with Lilypad Testnet tokens from the faucet.
Running a Hello, (cow) World! Example
Docker & Lilypad, Private Key
Supported platforms: Linux, macOS, WSL2 on both x86_64 and arm64
Get your private key from MetaMask: Accounts -> Account Details -> Show private key
Set your private key in terminal
You can verify you have set it with:
Docker installed & running
With testnet Lilypad ETH
To obtain funds, connect to the Lilypad Lalechuza network on your wallet and head to the faucet at http://faucet.lilypad.tech
Faucet: http://faucet.lilypad.tech
Copy your MetaMask wallet address into the bar and click request.
A cowsay job
To Run from a smart contract skip to the section [Smart Contract] Run "Hello, World!" Job
Start Docker
Open a Terminal window and run the following command:
Ensure your user is in the docker group if necessary on your platform
Results:
Navigate to the IPFS CID result output in the Results -> https://ipfs.io/ipfs/QmNjJUyFZpSg7HC9akujZ6KHWvJbCEytre3NRSMHzCA6NR
Patience! This could take up to a minute to propagate through the IPFS network.
Then click on the stdout folder and you should see the job result!
How to run a cowsay job from a Smart contract!
Open the Contract
Click this link to open the ExampleClient.sol contract in remix
Alternatively, open the Remix IDE in your browser and copy in the below ExampleClient.sol contract:
Connect to the Testnet
Connect MetaMask to the Lalechuza testnet & ensure you have testnet lilETH funds.
In the deploy tab in remix [fourth tab in the side bar], ensure you set the environment to "Injected Provider - MetaMask"
Deploy the Contact In remix, compile the ExampleClient.sol contract [third tab in the side bar]
Deploy a new contract by pasting in the Modicum contract address (found here) to the constructor
Deploy an existing ExampleClient.sol contract by using the "At Address" with the following pre-deployed contract address: 0x035C7593D3355b9bE0459dF2296053f887d051f1
Call the runCowsay function
The moment of truth! Let's run the cowsay example!!
Then add the string parameter for what you want the cow to say and click the transact button! Your MetaMask wallet should pop up asking you to confirm the transaction.
Wait a couple of minutes for the job to complete on the compute network. Then you will be able to click the fetchAllResults button to get your IPFS CID result.
Open the string starting with "https://ipfs.io/" in your browser which contains the output of the compute job:
The cowsay result is found under "stdout"
Congrats!
Run a node to provide job services
Currently runs on Linux, macOS, WSL2 - but only x86_64 architectures
To contribute your resources to the network and get paid:
That's it! This will run a Lilypad docker node on your local machine which can accept and run jobs.
As a resource provider:
I register my resource offer and send my deposit against that single offer
The offer is matched with a job and I run the job
if I ran the job properly - I get my deposit back AND the cost of the job
if I was caught cheating - I will lose my deposit
Connecting to LaLechuza Testnet
Next, add the Lalechuza testnet chain to MetaMask.
Network name: Lilypad Lalechuza testnet
New RPC URL: http://testnet.lilypadnetwork.org:8545
Chain ID: 1337
Currency symbol: lilETH
Block explorer URL: (leave blank)
To do this, open MetaMask then click on the network button at the top left of the popup (in the menu bar):
Then click the "Add Network" Button.
Next, click on "Add a network manually" at the bottom of the page and enter the Lilypad Testnet details:
Yay we're rich!
The following is how to run the "Hello, World!" Job from the Lilypad CLI.
First, ensure you set remix to pay 2 lilETH to the function by setting the "value" field
See the Results
Install MetaMask Extension
Click Save.