Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gakonst/VyperWeb3Deploy
Wrapper for compiling Vyper smart contracts in javascript and automatically deploying them via web3.js
https://github.com/gakonst/VyperWeb3Deploy
Last synced: 3 months ago
JSON representation
Wrapper for compiling Vyper smart contracts in javascript and automatically deploying them via web3.js
- Host: GitHub
- URL: https://github.com/gakonst/VyperWeb3Deploy
- Owner: gakonst
- Created: 2017-11-15T16:06:35.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-06T16:32:59.000Z (over 5 years ago)
- Last Synced: 2024-05-16T07:32:59.391Z (6 months ago)
- Language: JavaScript
- Homepage:
- Size: 13.7 KB
- Stars: 18
- Watchers: 4
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Viper Web3 Deploy
Requires Viper (https://github.com/ethereum/vyper/) installed (https://vyper.readthedocs.io/en/latest/installing-vyper.html)
Using *[email protected]*! Does not work with latest web3 as the syntax is a little different.Javascript wrapper for the Viper Compiler: `./utils/Wrapper.js`
Automatic web3 deployment of Viper Contract: `./utils/Deployer.js`
Ideally this can be used to integrate Vyper contracts in truffle-compile (https://github.com/trufflesuite/truffle-compile/) and thus in truffle-framework
### Installing
```
npm install
```### Test
(launch ganache)
```
node example.js -f contracts/greeter.v.py -h http://localhost:8545
```### Usage:
## Vyper compiler wrapper for Javascript
```javascript
Vyper = require("./utils/Wrapper.js")
Vyper.compileAll(FILENAME, function(compiled_contract) {
abi = JSON.parse(compiled_contract['abi'])
bytecode = '0x' + compiled_contract['bytecode']
// do whatever you want
});
```## Automatic Deployment
```javascript
Deployer = require("./utils/Deployer.js")
Deployer.deployContract(FILENAME, RPC_ADDRESS, function(contractInstance) {// do whatever you want
});
```