Skip to content

Commit 5320462

Browse files
committed
add broadcast operations for WHALESHARES blockchain
1 parent 622d9a8 commit 5320462

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

Tools/ChainOperations/ChainOperations.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
class ChainOperations
77
{
88
const OPERATION_VOTE = 'vote';
9-
const OPERATION_COMMENT = 'comment'; //STEEM/GOLOS
9+
const OPERATION_COMMENT = 'comment'; //STEEM/GOLOS/whaleshares
1010
const OPERATION_CONTENT = 'content'; //only for VIZ
1111
const OPERATION_TRANSFER = 'transfer';
1212
const OPERATION_CUSTOM_JSON = 'custom_json';
1313

1414
const OPERATIONS_IDS = [
1515
self::OPERATION_VOTE => 0,
16-
self::OPERATION_COMMENT => 1,//STEEM/GOLOS
16+
self::OPERATION_COMMENT => 1,//STEEM/GOLOS/whaleshares
1717
self::OPERATION_CONTENT => 1,//only for VIZ
1818
self::OPERATION_TRANSFER => 2,
1919
self::OPERATION_CUSTOM_JSON => 18

Tools/Transaction.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@
1515

1616
class Transaction
1717
{
18-
const CHAIN_STEEM = ConnectorInterface::PLATFORM_STEEMIT;
19-
const CHAIN_GOLOS = ConnectorInterface::PLATFORM_GOLOS;
20-
const CHAIN_VIZ = ConnectorInterface::PLATFORM_VIZ;
21-
const CHAIN_ID = [
22-
self::CHAIN_GOLOS => '782a3039b478c839e4cb0c941ff4eaeb7df40bdd68bd441afd444b9da763de12',
23-
self::CHAIN_STEEM => '0000000000000000000000000000000000000000000000000000000000000000',
24-
self::CHAIN_VIZ => '2040effda178d4fffff5eab7a915d4019879f5205cc5392e4bcced2b6edda0cd'
18+
const CHAIN_STEEM = ConnectorInterface::PLATFORM_STEEMIT;
19+
const CHAIN_GOLOS = ConnectorInterface::PLATFORM_GOLOS;
20+
const CHAIN_VIZ = ConnectorInterface::PLATFORM_VIZ;
21+
const CHAIN_WHALESHARES = ConnectorInterface::PLATFORM_WHALESHARES;
22+
const CHAIN_ID = [
23+
self::CHAIN_GOLOS => '782a3039b478c839e4cb0c941ff4eaeb7df40bdd68bd441afd444b9da763de12',
24+
self::CHAIN_STEEM => '0000000000000000000000000000000000000000000000000000000000000000',
25+
self::CHAIN_VIZ => '2040effda178d4fffff5eab7a915d4019879f5205cc5392e4bcced2b6edda0cd',
26+
self::CHAIN_WHALESHARES => 'de999ada2ff7ed3d3d580381f229b40b5a0261aec48eb830e540080817b72866'
2527
];
2628

2729
public static function getChainId($chainName)
@@ -194,7 +196,7 @@ protected static function signOperation($msg, $privateWif)
194196

195197
$serializedSig = null;
196198
$recid = 0;
197-
secp256k1_ecdsa_recoverable_signature_serialize_compact($context, $serializedSig, $recid,$signatureRec);
199+
secp256k1_ecdsa_recoverable_signature_serialize_compact($context, $serializedSig, $recid, $signatureRec);
198200

199201
$serializedSig = hex2bin(base_convert($recid + 4 + 27, 10, 16)) . $serializedSig;
200202
$length = strlen($serializedSig);

0 commit comments

Comments
 (0)