Post
Topic
Board Announcements (Altcoins)
Re: [PTA] Petrachor | PoS Ariel Protocol | Smart Contract Platform | BLS | BLS12-381
by
Eika4
on 18/05/2019, 13:24:09 UTC
I want to send PTA, I failed to send with this command.

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_sendTransaction","params":[{"from": "0xf1714d1d16087b379a317b32019236337fa18661", "to": "0x7a9ee17c2221296adad0b4a1337d0d18b935f46c", "value": "100"}],"id":1}' 127.0.0.1:8545

The error message is as follows:curl: (7) Failed to connect to 127.0.0.1 port 8545: Connection refused


Please help me!

1. In order to broadcast your transaction, you must be running the Petrachor node, and it must be synced with the network. If your Petrachor node is not running, or you have not turned on the json RPC, then you cannot broadcast a transaction. Make sure your json RPC port is listening on the default port 8545 ./petrachor -j -v 8

2. Once your node is running and has imported all blocks, you can now broadcast a transaction. Make sure you do not close the terminal window that is running the Petrachor node, or else it will kill the program. One option for doing this is running the application "screen" (you can find instructions here). Another option is to open a second terminal window, so that you have the Petrachor node in one terminal and the command line in the second terminal. I would suggest using two terminal windows because if you are not mining, you will need to enter the master passphrase for your wallet, and your key passphrase if you created one, after you enter the sendTransaction command.

3. Make sure all values are in hexadecimal format. Your "value" must be converted to hexadecimal, so for sending 100 PTA you will use 0x56BC75E2D63100000

Your command should look like this:

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_sendTransaction","params":[{"from": "0xf1714d1d16087b379a317b32019236337fa18661", "to": "0x7a9ee17c2221296adad0b4a1337d0d18b935f46c", "value": "0x56BC75E2D63100000"}],"id":1}' 127.0.0.1:8545