contract FirstContract {
function createOtherContract() payable returns(address) {
// this function is payable. I want to take this
// value and use it when creating an instance of
// SecondContract
}
}
contract SecondContract {
function SecondContract() payable {
// SecondContract's constructor which is also payable
}
function acceptEther() payable {
// Some function which accepts ether
}
}
FirstContract will be created from the js app when the user clicks a button on the website. then I want to create an instance of the second contract and pass the ether along to the new contract. I cant figure out how to call SecondContract's constructor from the first contract while sending ether.