https://github.com/justdvnsh/solidity-online-compiler-frontend
The frontend aspect of the Solidity Online Compiler
https://github.com/justdvnsh/solidity-online-compiler-frontend
compiler ethereum online react reactjs solc solidity web3js
Last synced: about 2 months ago
JSON representation
The frontend aspect of the Solidity Online Compiler
- Host: GitHub
- URL: https://github.com/justdvnsh/solidity-online-compiler-frontend
- Owner: justdvnsh
- Created: 2018-06-20T09:24:38.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-03T11:17:48.000Z (almost 8 years ago)
- Last Synced: 2025-04-01T13:27:46.479Z (about 1 year ago)
- Topics: compiler, ethereum, online, react, reactjs, solc, solidity, web3js
- Language: JavaScript
- Size: 321 KB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Solidity-Online-Compiler-Frontend

This is the frontend code for the solidity online compiler. This compiler is under heavy developement and will be made publicly available in a short amount of time.
---
## Getting Started
Easily deploy your Solidity smart-contracts against the Mainnet without actually needing shell/rpc access to a synced ethereum server!
###dependencies
(install nodejs and npm, latest versions if you can)
npm i -g ethereumjs-testrpc # for testrpc localhost testing
npm i -g ethereumjs-util # for testrpc localhost testing, see note below
npm i -g truffle # a useful Solidity-language tool
Metamask browser plugin # for auto-signing of contracts (manual private-key signing not enabled yet)
solc (solidity compiler) # needed for localhost compiling, instructions: https://solidity.readthedocs.io/en/v0.3.3/installing-solidity.html
note: it's harder to install solc on centos/amazonAMI linux, of course, You to install solidity from source, and update boost by hand:
wget http://repo.enetres.net/x86_64/boost-devel-1.59.0-1.x86_64.rpm
yum --nogpgcheck localinstall boost-devel-1.59.0-1.x86_64.rpm
You also need to make sure that /usr/local/lib was the last line in /etc/ld.so.conf
and also run 'sudo ldconfig' afterwards for the system to notice...
then installed solc from source via:
git clone --recursive https://github.com/ethereum/solidity.git
cd solidity/
git submodule update --init --recursive
mkdir build
cd build
cmake3 .. # needed sudo yum install cmake3 for this
make
sudo make install # so that the apache user can access the solc compiler
### How to install
git clone https://www.github.com/justdvnsh/solidity-onlinr-compiler-frontend
cd solidity-onlinr-compiler-frontend
npm i
npm start # for testing mode
npm run build # for live server hosting mode, use apache/httpd/nginx or similar routing tool for local path/URL customization
### How to Use
install metamask browser plugin (see https://metamask.io), and connect to either mainnet, or localhost:8545 (local node / testrpc server)
note: metamask seems bad at remembering your password! remember to keep your 12-word-passphrase!!
make sure you can see accounts in metamask, and they should either be live accounts with real ether, or match your testrpc local testing accounts
'npm start' will tell you the local port number and try to open the browser to the test server hosted page
otherwise, 'npm run build', customize path via passenger/apache, and visit the page
copy/paste your solidity contract into the box and press 'Compile & Deploy', you will be prompted for gas payment via metamask plugin
if you are running testrpc on localhost:8545, you can turn metamask off, or connect it to localhost:8545 and it will prompt you for testnet gas payment! (see notes below)
Your Solidity language contract is now deployed on either testnet or Ethereum mainnet (if you paid real ether!)
links are displayed for the TXID and Contract address. You will need to WAIT about 30s for the next block, for the tx/address to appear, on mainnet
use the web console debugger tool for console messages and debugging, please submit updates/upgrades, bug reports, feature requests THROUGH THE GITHUB ISSUES TOOL FOR THIS REPO!
Useful tool info and examples for learning to write Ethereum smart-contracts, to accompany my articles
truffle commands:
truffle init
truffle compile
truffle migrate
truffle console
### testrpc startup with pre-set seed phrase and pre-defined networkID
COMMAND FROM DEMO ARTICLE: testrpc -m "sample dog come year spray crawl learn general detect silver jelly pilot" --network-id 20
important note!: networkID needs to be below decimal(108) for tx signature to work properly (tx.v must be one byte only)
outdated note (?): ethereumjs-testrpc depends on OUTDATED ethereumjs-util, which has a signing bug which prevents Metamask from signing properly LOCALLY,
but it works ok on mainnet. In order to fix this for localhost testing, you can do this:
npm i -g ethereumjs-util@latest # separately from ethereumjs-testrpc
now: you need to find where ethereumjs-testrpc and ethereumjs-util actually got installed, then go to the
cd path-to/ethereumjs-util/node_modules
mv ethereumjs-util ethereumjs-util_old
ln -s path-to/ethereumjs-util .
for me it was:
ln -s /usr/local/lib/node_modules/ethereumjs-util/ /usr/local/lib/node_modules/ethereumjs-testrpc/node_modules/ethereumjs-util
this symlink will TRICK ethereumjs-testrpc into using the latest version of ethereumjs-util, and solve the "signing bug" for local deployment
---