// This script can be used to deploy the "PayableWorld" contract using ethers.js library. // Please make sure to compile "./contracts/1_PayableWorld.sol" file before running this script. // And use Right click -> "Run" from context menu of the file to run the script. Shortcut: Ctrl+Shift+S import { deploy } from './web3-lib' (async () => { try { const accounts = web3.eth.getAccounts() const result = await deploy('PayableWorld', []) console.log(`address: ${result.address}`) const string = await result.print() console.log(`result: ${string}`) const sent = await result.send({from: accounts[0], gas: 1500000}) // , gasPrice '30000000000'}) console.log(`sent: ${sent}`) // const amount = await result.withdraw() //const parsed = JSON.parse(amount) //console.log(`amount: ${amount}/${parsed}`) } catch (e) { console.log(e.message) } })()