I'm running a geth node in a private network, and running swarm in singleton mode on that network. I'm deploying contracts via JSON-RPC; I'm not using JavaScript.
I run the command solc --optimize --metadata --bin -o . ./coin.sol
which produces the files Coin_metadata.json
and Coin.bin
The file Coin.bin
contains the string:
60606040...a165627a7a723058208686fb331b117b51a664d9295258b00944f066540bfda4eef32934b197d5cbf60029
Solidity documentation says
So in order to retrieve the data, the end of the deployed bytecode can be checked to match that pattern and use the Swarm hash to retrieve the file.
So, the Swarm hash is
8686fb331b117b51a664d9295258b00944f066540bfda4eef32934b197d5cbf6
My question is: What content must I upload to Swarm, via command line, to get exactly the previous hash?
I've upload all files individually and the directory containing them, but any upload produces the previous hash.
Thanks in advance.