this
?
but in the script that uses ethersjs there is 1 line that says
await contract.deployed()
(async function() {
try {
const metadata = JSON.parse(await remix.call('fileManager', 'getFile', 'browser/artifacts/CustomERC20.json'))
// the variable web3Provider is a remix global variable object
const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner()
// Create an instance of a Contract Factory
let factory = new ethers.ContractFactory(metadata.abi, metadata.data.bytecode.object, signer);
// Notice we pass the constructor's parameters here
let contract = await factory.deploy('Mask', 'N95');
// The address the Contract WILL have once mined
console.log(contract.address);
// The transaction that was sent to the network to deploy the Contract
console.log(contract.deployTransaction.hash);
// The contract is NOT deployed yet; we must wait until it is mined
await contract.deployed()
// Done! The contract is deployed.
console.log('contract deployed')
} catch (e) {
console.log(e.message)
}
})();
Uncaught (in promise) Error: source-verification plugin is already rendered
(async () => {
try {
const accounts = await web3.eth.getAccounts()
console.log(accounts)
} catch (e) {
console.log(e.message)
}
})()
Hi @xiaods this contains the instructions you need, https://remix-plugins-directory.readthedocs.io/en/latest/
ethereum/remix-plugins-directory#226 add or for conflux remix plugin