I am trying to deploy contracts determinsitically using 'salt' via brownie. I would like to be able to do something like this:
>>> helloContract = Hello.deploy({'from':accounts[0],'salt':123456})
More details:
For example, I am able to deploy my "Hello" Contract deterministically using a factory contract and a salt as below.
pragma solidity ^0.8.0;
contract Hello {
string public hello = "Hello";
}
contract HelloFactory {
function createHelloWithSalt ( uint _salt ) public returns (address) {
Hello helloContract = new Hello {salt: bytes32(_salt)} ();
return address(helloContract);
}
}
Using the above Factory, I can create Hello contracts determinsitically through the below code in brownie console.
>>> HF = HelloFactory.deploy({'from':accounts[0]})
>>> hello = HF.createHelloWithSalt(123456,{'from':accounts[0]})
>>> # this works
Is there any way for me to replicate directly in brownie CLI the same using something like
>>> Hello.deploy({'from':accounts[0],'salt':123456)
>>> # doesn't work