Step 7: Embracing Bots on

A bounty to build a community fishing bot

The idea for a fishing bot came to me after seeing this wonderful thread from Alex Van de Sande about what blockchain games should focus on:

I think fits this list really well, but I want to see someone from the Ethereum community #buidl a bot that can catch fish and earn copper.


Looking for a community member to design a bot that will demonstrate how to catch and sell fish for copper automatically on


Write a script that interfaces with the smart contracts currently deployed to Ropsten.
It should complete the following actions:

Purchase a Dogger from the Harbor if one is not currently in your inventory: This means calling the buyShip(bytes32 model) function in the Harbor contract. Please load the Harbor contract address dynamically by calling getContract(bytes32 name) in the Galleass contract. (The Galleass contract addresses can be found here:

Embark! (Put your Dogger into the Sea): This means calling the embark(uint256 shipId) function in the Sea contract.

Set sail toward the fish you wish to catch: This means calling setSail(bool direction) in the Sea contract. You can sail east (true) or west (false) depending on what fish are available to catch. You can parse events to determine which fish to catch.
First, look through all Fish events:
event Fish(bytes32 id, uint256 timestamp, address species, bytes32 image);
Then, remove any that have already been caught:
event Catch(address account, bytes32 id, uint256 timestamp, address species);

After sailing to the target fish, drop anchor: Your ship will sail a small distance with each block that is mined. You can get your location by calling shipLocation(address owner) in the Sea contract. When you are ready, call dropAnchor() in the Sea contract.

Cast your line using a random bait hash: Call the castLine(bytes32 baitHash) function in the Sea contract. The contract uses a commit/reveal scheme for randomness so you will need to generate a random SHA256 called the “reveal” and then hash the reveal as your baitHash.

Attempt to reel in the fish: Call the reelIn(bytes32 fish, bytes32 bait) function in the Sea contract. The bait is your “reveal” from the previous step.

If a fish is caught, sell it to the Fish Monger: Call the sellFish(address _species,uint256 _amount) function in the Fish Monger contract.

Return to the Harbor and Disembark: Set sail toward the harbor and call the disembark(uint256 shipId) function in the Sea contract when you are close enough. This will return the Dogger to your inventory.

Austin Thomas Griffith

Written by

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade