Urgent: you’ll need to claim dividends before August 14th @ 8:50 AM UTC

Etheroll made its first dividend payout to DICE token hodlers available on August 7th @ 08:55 AM UTC. Schwiing! But — you have to manually claim them by interacting with the contract on the blockchain. You also have to do so before August 14th @ 8:50 AM UTC or you forfeit them. Damn girl… That gives you 1 week — so be prepared.

Luckily — using ETHEREST we can automate this quarterly collection of your dividends so you never have to worry about missing a pay out again.

So how do I collect my dividends?

As per the Etheroll site — you have to send a transaction to the ‘getMyReward’ method at contract address 0xa4463f9Ff0d87531232c8c4819B536c332DA6EAc.

Okay.. So now I have to re-sync my light node, run geth and bash out some broken solidity right..

Well no actually. You could connect through an Ethereum enabled browser to Etheroll’s website. Or even more simply you can send the getMyReward transaction with ETHEREST.

Go to www.etherest.app and search for the Etheroll contract 0xa4463f9Ff0d87531232c8c4819B536c332DA6EAc and enter ‘getMyReward’ as the Method.

Tick the box that says this ‘Method requires a transaction’ and then enter your privateKey, yourAddress, value=0, gasPrice=20 and gasLimit=250000 as below. (Note: You must use the address and private key from which you hold your DICE tokens.)

Click the big blue submit button on the right, and there you have it — you have claimed your Etheroll dividends!

You can take the response transaction hash and put it into Etherscan to check the status of your getMyReward transaction and your dividends.

Well that was easy. But what if I run the method in my narsty spaghetti code?

For any task you want to automate or do programmatically you can use the ETHEREST API:

A contract method transaction with the ETHEREST API has the same URL structure as a method call GET request. However a transaction must be a POST request and contain certain post data, namely your wallet address, private key, transaction value (in ether), gas price (in gwei) and gas limit.

Nice. Very nice. But can you just give me a specific curl request to get my Etheroll moola?

The getMyReward method has no input or output parameters, the POST request is just:

But I still have to remember to run this post request every 3 months or lose my dividends?

If you want to automate this for each quarterly dividend then combine it with Zapier.

Zapier sounds like a cleaning product..

No, Zapier lets you link and schedule applications. You should make a ‘Zap’ that uses ‘Schedule’ as the Trigger, a ‘Filter’ and a ‘Webhooks’ POST as the Action.

TRIGGER: ‘Schedule’ once per month — select the 10th of the month and time 9am.

2. FILTER: Add a filter to the result of scheduler as the seconds step. This will make the post request execute only on dividend months and not every month. You should enter an ‘only continue if…’:

Date Month, (Text) Contains, 8

Then press +OR 3 more times and add Date Month, (Text) Contains for each one with the values 11, 2 and 5 for the other dividend months of the year.

3. ACTION: ‘Webhooks’ POST request — include the same URL and data as the ETHEREST ‘getMyReward’ post request above. The data is privateKey=<privateKey>, yourAddress=<yourAddress>, value=0, gasPrice=20, gasLimit=250000.

Done. API calls to ETHEREST combined with Zapier like this could be used to allow easy automation of interaction with any smart contract with minimal technical knowledge required! Okay great, BYE!