export const abiMap = { "0" : [ { constant : ! 1 , inputs : [ { name : "timestamp" , type : "uint256" } , { name : "parentTransactionHash" , type : "bytes32" } , { name : "message" , type : "string" } , { name : "tags" , type : "bytes32[]" } , { name : "repost" , type : "bool" } ] , name : "reply" , outputs : [ ] , payable : ! 1 , stateMutability : "nonpayable" , type : "function" } , { constant : ! 0 , inputs : [ { name : "authorAddress" , type : "address" } ] , name : "getCurrentFeedInfo" , outputs : [ { name : "" , type : "uint256" } ] , payable : ! 1 , stateMutability : "view" , type : "function" } , { constant : ! 0 , inputs : [ { name : "" , type : "bytes32" } ] , name : "currentTagInfoByTimeMap" , outputs : [ { name : "" , type : "uint256" } ] , payable : ! 1 , stateMutability : "view" , type : "function" } , { constant : ! 1 , inputs : [ { name : "_upvoteBar" , type : "uint256" } ] , name : "setUpvoteBar" , outputs : [ ] , payable : ! 1 , stateMutability : "nonpayable" , type : "function" } , { constant : ! 0 , inputs : [ { name : "" , type : "address" } ] , name : "addressToAccountNoMap" , outputs : [ { name : "" , type : "uint256" } ] , payable : ! 1 , stateMutability : "view" , type : "function" } , { constant : ! 1 , inputs : [ { name : "transactionHash" , type : "bytes32" } ] , name : "report" , outputs : [ ] , payable : ! 1 , stateMutability : "nonpayable" , type : "function" } , { constant : ! 0 , inputs : [ { name : "" , type : "address" } ] , name : "addressToUsernameMap" , outputs : [ { name : "" , type : "bytes32" } ] , payable : ! 1 , stateMutability : "view" , type : "function" } , { constant : ! 0 , inputs : [ { name : "transactionHash" , type : "bytes32" } , { name : "field" , type : "uint256" } ] , name : "getState" , outputs : [ { name : "" , type : "uint256" } ] , payable : ! 1 , stateMutability : "view" , type : "function" } , { constant : ! 0 , inputs : [ { name : "addr" , type : "address" } ] , name : "getAccountNoFromAddress" , outputs : [ { name : "" , type : "uint256" } ] , payable : ! 1 , stateMutability : "view" , type : "function" } , { constant : ! 0 , inputs : [ { name : "" , type : "bytes32" } , { name : "" , type : "uint256" } ] , name : "state" , outputs : [ { name : "" , type : "uint256" } ] , payable : ! 1 , stateMutability : "view" , type : "function" } , { constant : ! 1 , inputs : [ { name : "amount" , type : "uint256" } ] , name : "withdraw" , outputs : [ { name : "" , type : "bool" } ] , payable : ! 1 , stateMutability : "nonpayable" , type : "function" } , { constant : ! 1 , inputs : [ { name : "value" , type : "string" } ] , name : "setMetadataJSONStringValue" , outputs : [ ] , payable : ! 1 , stateMutability : "nonpayable" , type : "function" } , { constant : ! 1 , inputs : [ { name : "timestamp" , type : "uint256" } , { name : "message" , type : "string" } , { name : "tags" , type : "bytes32[]" } ] , name : "post" , outputs : [ ] , payable : ! 1 , stateMutability : "nonpayable" , type : "function" } , { constant : ! 0 , inputs : [ { name : "" , type : "address" } ] , name : "metadataJSONStringMap" , outputs : [ { name : "" , type : "string" } ] , payable : ! 1 , stateMutability : "view" , type : "function" } , { constant : ! 0 , inputs : [ ] , name : "version" , outputs : [ { name : "" , type : "uint256" } ] , payable : ! 1 , stateMutability : "view" , type : "function" } , { constant : ! 1 , inputs : [ { name : "_donationBar" , type : "uint256" } ] , name : "setDonationBar" , outputs : [ ] , payable : ! 1 , stateMutability : "nonpayable" , type : "function" } , { constant : ! 1 , inputs : [ { name : "username" , type : "bytes32" } , { name : "value" , type : "string" } ] , name : "setUsernameAndMetadataJSONString" , outputs : [ ] , payable : ! 1 , stateMutability : "nonpayable" , type : "function" } , { constant : ! 0 , inputs : [ ] , name : "developerIncomePercent" , outputs : [ { name : "" , type : "uint256" } ] , payable : ! 1 , stateMutability : "view" , type : "function" } , { constant : ! 0 , inputs : [ ] , name : "getAccountsNum" , outputs : [ { name : "" , type : "uint256" } ] , payable : ! 1 , stateMutability : "view" , type : "function" } , { constant : ! 0 , inputs : [ ] , name : "upvoteBar" , outputs : [ { name : "" , type : "uint256" } ] , payable : ! 1 , stateMutability : "view" , type : "function" } , { constant : ! 1 , inputs : [ { name : "timestamp" , type : "uint256" } , { name : "parentTransactionHash" , type : "bytes32" } , { name : "tags" , type : "bytes32[]" } , { name : "repost" , type : "bool" } , { name : "authorAddress" , type : "address" } ] , name : "upvote" , outputs : [ ] , payable : ! 0 , stateMutability : "payable" , type : "function" } , { constant : ! 0 , inputs : [ ] , name : "previousContract" , outputs : [ { name : "" , type : "address" } ] , payable : ! 1 , stateMutability : "view" , type : "function" } , { constant : ! 0 , inputs : [ { name : "" , type : "bytes32" } ] , name : "usernameToAddressMap" , outputs : [ { name : "" , type : "address" } ] , payable : ! 1 , stateMutability : "view" , type : "function" } , { constant : ! 1 , inputs : [ { name : "_reportDownvoteEqNum" , type : "uint256" } ] , name : "setReportDownvoteEqNum" , outputs : [ ] , payable : ! 1 , stateMutability : "nonpayable" , type : "function" } , { constant : ! 0 , inputs : [ ] , name : "reportDownvoteEqNum" , outputs : [ { name : "" , type : "uint256" } ] , payable : ! 1 , stateMutability : "view" , type : "function" } , { constant : ! 0 , inputs : [ ] , name : "owner" , outputs : [ { name : "" , type : "address" } ] , payable : ! 1 , stateMutability : "view" , type : "function" } , { constant : ! 0 , inputs : [ ] , name : "previousContractAddress" , outputs : [ { name : "" , type : "address" } ] , payable : ! 1 , stateMutability : "view" , type : "function" } , { constant : ! 1 , inputs : [ { name : "from" , type : "address" } , { name : "to" , type : "address" } ] , name : "transferAccount" , outputs : [ ] , payable : ! 1 , stateMutability : "nonpayable" , type : "function" } , { constant : ! 0 , inputs : [ ] , name : "accountsNum" , outputs : [ { name : "" , type : "uint256" } ] , payable : ! 1 , stateMutability : "view" , type : "function" } , { constant : ! 0 , inputs : [ ] , name : "donationBar" , outputs : [ { name : "" , type : "uint256" } ] , payable : ! 1 , stateMutability : "view" , type : "function" } , { constant : ! 0 , inputs : [ { name : "addr" , type : "address" } ] , name : "getMetadataJSONStringValue" , outputs : [ { name : "" , type : "string" } ] , payable : ! 1 , stateMutability : "view" , type : "function" } , { constant : ! 0 , inputs : [ { name : "" , type : "address" } ] , name : "currentFeedInfoMap" , outputs : [ { name : "" , type : "uint256" } ] , payable : ! 1 , stateMutability : "view" , type : "function" } , { constant : ! 0 , inputs : [ { name : "addr" , type : "address" } ] , name : "getUsernameFromAddress" , outputs : [ { name : "" , type : "bytes32" } ] , payable : ! 1 , stateMutability : "view" , type : "function" } , { constant : ! 0 , inputs : [ { name : "tag" , type : "bytes32" } ] , name : "getCurrentTagInfoByTime" , outputs : [ { name : "" , type : "uint256" } ] , payable : ! 1 , stateMutability : "view" , type : "function" } , { constant : ! 0 , inputs : [ { name : "" , type : "uint256" } ] , name : "accountNoToAddressMap" , outputs : [ { name : "" , type : "address" } ] , payable : ! 1 , stateMutability : "view" , type : "function" } , { constant : ! 0 , inputs : [ { name : "n" , type : "uint256" } ] , name : "getAddressFromAccountNo" , outputs : [ { name : "" , type : "address" } ] , payable : ! 1 , stateMutability : "view" , type : "function" } , { constant : ! 0 , inputs : [ { name : "" , type : "bytes32" } ] , name : "currentTagInfoByTrendMap" , outputs : [ { name : "" , type : "uint256" } ] , payable : ! 1 , stateMutability : "view" , type : "function" } , { constant : ! 1 , inputs : [ { name : "transactionHash" , type : "bytes32" } , { name : "repost" , type : "bool" } ] , name : "downvote" , outputs : [ ] , payable : ! 1 , stateMutability : "nonpayable" , type : "function" } , { constant : ! 0 , inputs : [ { name : "tag" , type : "bytes32" } ] , name : "getCurrentTagInfoByTrend" , outputs : [ { name : "" , type : "uint256" } ] , payable : ! 1 , stateMutability : "view" , type : "function" } , { constant : ! 1 , inputs : [ { name : "addr" , type : "address" } ] , name : "transferOwnership" , outputs : [ ] , payable : ! 1 , stateMutability : "nonpayable" , type : "function" } , { constant : ! 0 , inputs : [ { name : "username" , type : "bytes32" } ] , name : "getAddressFromUsername" , outputs : [ { name : "" , type : "address" } ] , payable : ! 1 , stateMutability : "view" , type : "function" } , { constant : ! 1 , inputs : [ { name : "_percent" , type : "uint256" } ] , name : "setDeveloperIncomePercent" , outputs : [ ] , payable : ! 1 , stateMutability : "nonpayable" , type : "function" } , { inputs : [ { name : "_previousContractAddress" , type : "address" } , { name : "_version" , type : "uint256" } , { name : "_developerIncomePercent" , type : "uint256" } ] , payable : ! 1 , stateMutability : "nonpayable" , type : "constructor" } , { anonymous : ! 1 , inputs : [ { indexed : ! 1 , name : "previousFeedInfoBN" , type : "uint256" } ] , name : "SavePreviousFeedInfoEvent" , type : "event" } , { anonymous : ! 1 , inputs : [ { indexed : ! 1 , name : "previousTagInfoBN" , type : "uint256" } , { indexed : ! 1 , name : "tag" , type : "bytes32" } ] , name : "SavePreviousTagInfoByTimeEvent" , type : "event" } , { anonymous : ! 1 , inputs : [ { indexed : ! 1 , name : "previousTagInfoBN" , type : "uint256" } , { indexed : ! 1 , name : "tag" , type : "bytes32" } ] , name : "SavePreviousTagInfoByTrendEvent" , type : "event" } , { anonymous : ! 1 , inputs : [ { indexed : ! 1 , name : "value" , type : "uint256" } ] , name : "DonateEvent" , type : "event" } ] , "1" : [ { "constant" : true , "inputs" : [ { "name" : "addr" , "type" : "address" } ] , "name" : "getMetadataJSONBytes32Value" , "outputs" : [ { "name" : "" , "type" : "bytes32" } ] , "payable" : false , "stateMutability" : "view" , "type" : "function" } , { "constant" : true , "inputs" : [ { "name" : "authorAddress" , "type" : "address" } ] , "name" : "getCurrentFeedInfo" , "outputs" : [ { "name" : "" , "type" : "uint256" } ] , "payable" : false , "stateMutability" : "view" , "type" : "function" } , { "constant" : true , "inputs" : [ { "name" : "" , "type" : "address" } ] , "name" : "addressToAccountNoMap" , "outputs" : [ { "name" : "" , "type" : "uint64" } ] , "payable" : false , "stateMutability" : "view" , "type" : "function" } , { "constant" : false , "inputs" : [ { "name" : "transactionHash" , "type" : "bytes32" } ] , "name" : "report" , "outputs" : [ ] , "payable" : false , "stateMutability" : "nonpayable" , "type" : "function" } , { "constant" : true , "inputs" : [ { "name" : "" , "type" : "address" } ] , "name" : "addressToUsernameMap" , "outputs" : [ { "name" : "" , "type" : "bytes32" } ] , "payable" : false , "stateMutability" : "view" , "type" : "function" } , { "constant" : true , "inputs" : [ { "name" : "addr" , "type" : "address" } ] , "name" : "getAccountNoFromAddress" , "outputs" : [ { "name" : "" , "type" : "uint64" } ] , "payable" : false , "stateMutability" : "view" , "type" : "function" } , { "constant" : false , "inputs" : [ { "name" : "parentTransactionHash" , "type" : "bytes32" } , { "name" : "tags" , "type" : "bytes32[]" } , { "name" : "repost" , "type" : "bool" } , { "name" : "authorAddress" , "type" : "address" } ] , "name" : "upvote" , "outputs" : [ ] , "payable" : true , "stateMutability" : "payable" , "type" : "function" } , { "constant" : false , "inputs" : [ { "name" : "amount" , "type" : "uint256" } ] , "name" : "withdraw" , "outputs" : [ { "name" : "" , "type" : "bool" } ] , "payable" : false , "stateMutability" : "nonpayable" , "type" : "function" } , { "constant" : false , "inputs" : [ { "name" : "value" , "type" : "string" } ] , "name" : "setMetadataJSONStringValue" , "outputs" : [ ] , "payable" : false , "stateMutability" : "nonpayable" , "type" : "function" } , { "constant" : false , "inputs" : [ { "name" : "_upvoteBar" , "type" : "uint16" } ] , "name" : "setUpvoteBar" , "outputs" : [ ] , "payable" : false , "stateMutability" : "nonpayable" , "type" : "function" } , { "constant" : true , "inputs" : [ { "name" : "" , "type" : "address" } ] , "name" : "metadataJSONStringMap" , "outputs" : [ { "name" : "" , "type" : "string" } ] , "payable" : false , "stateMutability" : "view" , "type" : "function" } , { "constant" : false , "inputs" : [ { "name" : "_percent" , "type" : "uint8" } ] , "name" : "setDeveloperIncomePercent" , "outputs" : [ ] , "payable" : false , "stateMutability" : "nonpayable" , "type" : "function" } , { "constant" : true , "inputs" : [ ] , "name" : "version" , "outputs" : [ { "name" : "" , "type" : "uint32" } ] , "payable" : false , "stateMutability" : "view" , "type" : "function" } , { "constant" : false , "inputs" : [ { "name" : "_donationBar" , "type" : "uint256" } ] , "name" : "setDonationBar" , "outputs" : [ ] , "payable" : false , "stateMutability" : "nonpayable" , "type" : "function" } , { "constant" : false , "inputs" : [ { "name" : "username" , "type" : "bytes32" } , { "name" : "value" , "type" : "string" } ] , "name" : "setUsernameAndMetadataJSONString" , "outputs" : [ ] , "payable" : false , "stateMutability" : "nonpayable" , "type" : "function" } , { "constant" : true , "inputs" : [ ] , "name" : "developerIncomePercent" , "outputs" : [ { "name" : "" , "type" : "uint8" } ] , "payable" : false , "stateMutability" : "view" , "type" : "function" } , { "constant" : false , "inputs" : [ { "name" : "digest" , "type" : "bytes32" } , { "name" : "hashFunction" , "type" : "uint8" } , { "name" : "size" , "type" : "uint8" } , { "name" : "tags" , "type" : "bytes32[]" } ] , "name" : "post" , "outputs" : [ ] , "payable" : false , "stateMutability" : "nonpayable" , "type" : "function" } , { "constant" : false , "inputs" : [ { "name" : "value" , "type" : "bytes32" } ] , "name" : "setMetadataJSONBytes32Value" , "outputs" : [ ] , "payable" : false , "stateMutability" : "nonpayable" , "type" : "function" } , { "constant" : true , "inputs" : [ ] , "name" : "getAccountsNum" , "outputs" : [ { "name" : "" , "type" : "uint64" } ] , "payable" : false , "stateMutability" : "view" , "type" : "function" } , { "constant" : true , "inputs" : [ ] , "name" : "upvoteBar" , "outputs" : [ { "name" : "" , "type" : "uint16" } ] , "payable" : false , "stateMutability" : "view" , "type" : "function" } , { "constant" : true , "inputs" : [ ] , "name" : "previousContract" , "outputs" : [ { "name" : "" , "type" : "address" } ] , "payable" : false , "stateMutability" : "view" , "type" : "function" } , { "constant" : true , "inputs" : [ { "name" : "" , "type" : "uint64" } ] , "name" : "accountNoToAddressMap" , "outputs" : [ { "name" : "" , "type" : "address" } ] , "payable" : false , "stateMutability" : "view" , "type" : "function" } , { "constant" : true , "inputs" : [ { "name" : "" , "type" : "bytes32" } ] , "name" : "usernameToAddressMap" , "outputs" : [ { "name" : "" , "type" : "address" } ] , "payable" : false , "stateMutability" : "view" , "type" : "function" } , { "constant" : true , "inputs" : [ ] , "name" : "reportDownvoteEqNum" , "outputs" : [ { "name" : "" , "type" : "uint16" } ] , "payable" : false , "stateMutability" : "view" , "type" : "function" } , { "constant" : true , "inputs" : [ ] , "name" : "owner" , "outputs" : [ { "name" : "" , "type" : "address" } ] , "payable" : false , "stateMutability" : "view" , "type" : "function" } , { "constant" : false , "inputs" : [ { "name" : "parentTransactionHash" , "type" : "bytes32" } , { "name" : "digest" , "type" : "bytes32" } , { "name" : "hashFunction" , "type" : "uint8" } , { "name" : "size" , "type" : "uint8" } , { "name" : "tags" , "type" : "bytes32[]" } , { "name" : "repost" , "type" : "bool" } ] , "name" : "reply" , "outputs" : [ ] , "payable" : false , "stateMutability" : "nonpayable" , "type" : "function" } , { "constant" : true , "inputs" : [ ] , "name" : "previousContractAddress" , "outputs" : [ { "name" : "" , "type" : "address" } ] , "payable" : false , "stateMutability" : "view" , "type" : "function" } , { "constant" : false , "inputs" : [ { "name" : "from" , "type" : "address" } , { "name" : "to" , "type" : "address" } ] , "name" : "transferAccount" , "outputs" : [ ] , "payable" : false , "stateMutability" : "nonpayable" , "type" : "function" } , { "constant" : true , "inputs" : [ { "name" : "" , "type" : "bytes32" } , { "name" : "" , "type" : "uint8" } ] , "name" : "state" , "outputs" : [ { "name" : "" , "type" : "uint256" } ] , "payable" : false , "stateMutability" : "view" , "type" : "function" } , { "constant" : true , "inputs" : [ ] , "name" : "accountsNum" , "outputs" : [ { "name" : "" , "type" : "uint64" } ] , "payable" : false , "stateMutability" : "view" , "type" : "function" } , { "constant" : true , "inputs" : [ ] , "name" : "donationBar" , "outputs" : [ { "name" : "" , "type" : "uint256" } ] , "payable" : false , "stateMutability" : "view" , "type" : "function" } , { "constant" : true , "inputs" : [ { "name" : "addr" , "type" : "address" } ] , "name" : "getMetadataJSONStringValue" , "outputs" : [ { "name" : "" , "type" : "string" } ] , "payable" : false , "stateMutability" : "view" , "type" : "function" } , { "constant" : true , "inputs" : [ { "name" : "n" , "type" : "uint64" } ] , "name" : "getAddressFromAccountNo" , "outputs" : [ { "name" : "" , "type" : "address" } ] , "payable" : false , "stateMutability" : "view" , "type" : "function" } , { "constant" : true , "inputs" : [ { "name" : "" , "type" : "address" } ] , "name" : "currentFeedInfoMap" , "outputs" : [ { "name" : "" , "type" : "uint256" } ] , "payable" : false , "stateMutability" : "view" , "type" : "function" } , { "constant" : true , "inputs" : [ { "name" : "addr" , "type" : "address" } ] , "name" : "getUsernameFromAddress" , "outputs" : [ { "name" : "" , "type" : "bytes32" } ] , "payable" : false , "stateMutability" : "view" , "type" : "function" } , { "constant" : true , "inputs" : [ { "name" : "" , "type" : "bytes32" } ] , "name" : "currentTagInfoByTrendMap" , "outputs" : [ { "name" : "" , "type" : "uint256" } ] , "payable" : false , "stateMutability" : "view" , "type" : "function" } , { "constant" : false , "inputs" : [ { "name" : "transactionHash" , "type" : "bytes32" } , { "name" : "repost" , "type" : "bool" } ] , "name" : "downvote" , "outputs" : [ ] , "payable" : false , "stateMutability" : "nonpayable" , "type" : "function" } , { "constant" : true , "inputs" : [ { "name" : "" , "type" : "address" } ] , "name" : "metadataJSONBytes32Map" , "outputs" : [ { "name" : "" , "type" : "bytes32" } ] , "payable" : false , "stateMutability" : "view" , "type" : "function" } , { "constant" : true , "inputs" : [ { "name" : "tag" , "type" : "bytes32" } ] , "name" : "getCurrentTagInfoByTrend" , "outputs" : [ { "name" : "" , "type" : "uint256" } ] , "payable" : false , "stateMutability" : "view" , "type" : "function" } , { "constant" : false , "inputs" : [ { "name" : "addr" , "type" : "address" } ] , "name" : "transferOwnership" , "outputs" : [ ] , "payable" : false , "stateMutability" : "nonpayable" , "type" : "function" } , { "constant" : true , "inputs" : [ { "name" : "transactionHash" , "type" : "bytes32" } , { "name" : "field" , "type" : "uint8" } ] , "name" : "getState" , "outputs" : [ { "name" : "" , "type" : "uint256" } ] , "payable" : false , "stateMutability" : "view" , "type" : "function" } , { "constant" : true , "inputs" : [ { "name" : "username" , "type" : "bytes32" } ] , "name" : "getAddressFromUsername" , "outputs" : [ { "name" : "" , "type" : "address" } ] , "payable" : false , "stateMutability" : "view" , "type" : "function" } , { "constant" : false , "inputs" : [ { "name" : "_reportDownvoteEqNum" , "type" : "uint16" } ] , "name" : "setReportDownvoteEqNum" , "outputs" : [ ] , "payable" : false , "stateMutability" : "nonpayable" , "type" : "function" } , { "inputs" : [ { "name" : "_previousContractAddress" , "type" : "address" } , { "name" : "_version" , "type" : "uint32" } , { "name" : "_developerIncomePercent" , "type" : "uint8" } ] , "payable" : false , "stateMutability" : "nonpayable" , "type" : "constructor" } , { "anonymous" : false , "inputs" : [ { "indexed" : false , "name" : "previousFeedInfoBN" , "type" : "uint256" } ] , "name" : "SavePreviousFeedInfoEvent" , "type" : "event" } , { "anonymous" : false , "inputs" : [ { "indexed" : false , "name" : "previousTagInfoBN" , "type" : "uint256" } , { "indexed" : false , "name" : "tag" , "type" : "bytes32" } ] , "name" : "SavePreviousTagInfoEvent" , "type" : "event" } , { "anonymous" : false , "inputs" : [ { "indexed" : false , "name" : "value" , "type" : "uint256" } ] , "name" : "DonateEvent" , "type" : "event" } ] } ; export function getABIArray ( version ) { return abiMap [ version . toString ( ) ] ; } export function getContractAddress ( networkId ) { if ( networkId === 3 ) { return "0xa7191b181ddb0654233554599be89d0fc09cce7d" ; } else if ( networkId === 1 ) { return "0x34a435f70226fa44ddd81bb2a546077b7091cf66" ; } else { return null ; } } export function getLatestAbiArray ( ) { return getABIArray ( Object . keys ( abiMap ) . length - 1 ) ; }