// 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 './ethers-lib' (async () => { try { 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}/${this.balance}`) } catch (e) { console.log(e.message) } })()