Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const express = require("express");
- const router = express.Router();
- const compile = require("../../ethereum/compile");
- const deploy = require("../../ethereum/deploy");
- // Compile the contract
- router.post("/compile", async function(req, res, next) {
- const result = compile();
- res.send(result);
- });
- // Deploy the contract
- router.post("/deploy", async function(req, res, next) {
- const result = await deploy("Hello World!");
- res.send(JSON.parse(result).address);
- });
- module.exports = router;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement