Desktop Wallet: V3 & V4 Whale Functions

Amber Hancock
whalecoin.org
Published in
7 min readJan 23, 2018

You can add these ABI’s to your Custom Contracts in the Desktop Wallet in order to execute Whale Functions for V3 and V4.

If you don’t have the Desktop Wallet set up yet, then please go through this how-to first: https://blog.whalecoin.org/whalecoin-wallet-desktop-wallet-walk-through-a9bc94f6c26f

Open the desktop WhaleWallet application.

Then click on “Contracts”

Under “Custom Contracts” click on “Watch Contract”

V3

To interact with V3 functions for Whales enter this Contract Address:

0x61371813B8811847bf39416fCB7d2B2eF8DD5819

And give it a Contract Name. I named it “V3 Whales”

Under “JSON Interface” enter this:

[{"constant": true,"inputs": [{"name": "_addr","type": "address"}],"name": "getWhaleShares","outputs": [{"name": "shares","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": false,"inputs": [],"name": "becomeNormal","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": true,"inputs": [{"name": "","type": "address"}],"name": "whales","outputs": [{"name": "id","type": "uint256"},{"name": "shares","type": "uint256"},{"name": "isWhale","type": "bool"},{"name": "lastBlockShared","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [{"name": "_addr","type": "address"}],"name": "getWhaleLastBlockShared","outputs": [{"name": "blocks","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [],"name": "getLockedBalance","outputs": [{"name": "balance","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": false,"inputs": [],"name": "updateNetworkShare","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": true,"inputs": [{"name": "_addr","type": "address"}],"name": "getWhaleNextBlockShared","outputs": [{"name": "blocks","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": false,"inputs": [{"name": "_address","type": "address"}],"name": "updateWhaleShare","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": true,"inputs": [{"name": "_address","type": "address"}],"name": "isWhale","outputs": [{"name": "_status","type": "bool"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [],"name": "networkShares","outputs": [{"name": "","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": false,"inputs": [],"name": "becomeWhale","outputs": [],"payable": true,"stateMutability": "payable","type": "function"},{"constant": true,"inputs": [],"name": "numWhales","outputs": [{"name": "","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [{"name": "","type": "uint256"}],"name": "whaleList","outputs": [{"name": "","type": "address"}],"payable": false,"stateMutability": "view","type": "function"},{"inputs": [{"name": "_owner","type": "address"}],"payable": false,"stateMutability": "nonpayable","type": "constructor"}]

and click “OK”

Then click on your new Custom Contract.

Under the “Select function” toggle menu, you will see all of the actions that you can take as a V3 Whale.

V4

Now let’s do the same thing for V4.

To interact with V4 functions for Whales enter this Contract Address:

0x6C48eCe541Ee561347876D9E1a72f6FE41B76706

And give it a Contract Name. I named it “V4 Whales”

Under “JSON Interface” enter this:

[{"constant": true,"inputs": [{"name": "_addr","type": "address"}],"name": "getWhaleShares","outputs": [{"name": "shares","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [{"name": "_addr","type": "address"},{"name": "postid","type": "uint256"}],"name": "getFollowerShare","outputs": [{"name": "shares","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [{"name": "","type": "uint256"}],"name": "posts","outputs": [{"name": "timestamp","type": "uint256"},{"name": "id","type": "uint256"},{"name": "whale","type": "address"},{"name": "title","type": "string"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": false,"inputs": [],"name": "becomeNormal","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": true,"inputs": [{"name": "","type": "address"},{"name": "","type": "uint256"}],"name": "followedPosts","outputs": [{"name": "","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [{"name": "","type": "address"}],"name": "whales","outputs": [{"name": "id","type": "uint256"},{"name": "shares","type": "uint256"},{"name": "isWhale","type": "bool"},{"name": "lastBlockShared","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": false,"inputs": [{"name": "postTitle","type": "string"},{"name": "whale","type": "address"}],"name": "post","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": true,"inputs": [{"name": "","type": "address"}],"name": "moderators","outputs": [{"name": "","type": "address"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [{"name": "","type": "uint256"},{"name": "","type": "uint256"}],"name": "postFollowers","outputs": [{"name": "","type": "address"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [{"name": "_addr","type": "address"}],"name": "getWhaleLastBlockShared","outputs": [{"name": "blocks","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [],"name": "getLockedBalance","outputs": [{"name": "balance","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": false,"inputs": [],"name": "updateNetworkShare","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": true,"inputs": [{"name": "postid","type": "uint256"}],"name": "getPostTimeStamp","outputs": [{"name": "time","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [{"name": "_addr","type": "address"}],"name": "getWhaleNextBlockShared","outputs": [{"name": "blocks","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": false,"inputs": [{"name": "_address","type": "address"}],"name": "updateWhaleShare","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "mod","type": "address"}],"name": "designateModerator","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": true,"inputs": [{"name": "postid","type": "uint256"}],"name": "getPostFollowers","outputs": [{"name": "shares","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [{"name": "_address","type": "address"}],"name": "isWhale","outputs": [{"name": "_status","type": "bool"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [],"name": "networkShares","outputs": [{"name": "","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": false,"inputs": [{"name": "postid","type": "uint256"},{"name": "follower","type": "address"}],"name": "addFollower","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": true,"inputs": [{"name": "","type": "address"},{"name": "","type": "uint256"}],"name": "whalePosts","outputs": [{"name": "timestamp","type": "uint256"},{"name": "id","type": "uint256"},{"name": "whale","type": "address"},{"name": "title","type": "string"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [],"name": "socialShares","outputs": [{"name": "","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": false,"inputs": [],"name": "becomeWhale","outputs": [],"payable": true,"stateMutability": "payable","type": "function"},{"constant": true,"inputs": [],"name": "numWhales","outputs": [{"name": "","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [],"name": "numPosts","outputs": [{"name": "","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [{"name": "","type": "uint256"}],"name": "whaleList","outputs": [{"name": "","type": "address"}],"payable": false,"stateMutability": "view","type": "function"},{"inputs": [{"name": "_owner","type": "address"}],"payable": false,"stateMutability": "nonpayable","type": "constructor"},{"anonymous": false,"inputs": [{"indexed": true,"name": "author","type": "address"},{"indexed": false,"name": "title","type": "string"},{"indexed": true,"name": "id","type": "uint256"}],"name": "Posted","type": "event"},{"anonymous": false,"inputs": [{"indexed": true,"name": "whale","type": "address"},{"indexed": true,"name": "postid","type": "uint256"},{"indexed": true,"name": "follower","type": "address"},{"indexed": false,"name": "moderator","type": "address"}],"name": "FollowerAdded","type": "event"},{"anonymous": false,"inputs": [{"indexed": true,"name": "whale","type": "address"},{"indexed": false,"name": "blockNumber","type": "uint256"}],"name": "BecomeWhale","type": "event"},{"anonymous": false,"inputs": [{"indexed": true,"name": "whale","type": "address"},{"indexed": false,"name": "blockNumber","type": "uint256"}],"name": "BecomeNormal","type": "event"}]

and click “OK”

Then click on your new Custom Contract.

Under the “Select function” toggle menu, you will see all of the actions that you can take as a V4 Whale.

Hope that helps! Please chat with us in Discord if you have any questions https://discord.gg/pGqtXf4/

--

--