You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In web3java, i can deploy a smart contract by following the methods
Create .bin and .abi files from solidity file using solcjs library.
Create java file using .abi and .bin files.
Java file contains deploy() method to deploy a smart contract on Ethereum network.
Now in web3swift i don't see any method to deploy smart contract. I know there will be any other way of deploying but i don't know. can anyone please help in this regard?
The text was updated successfully, but these errors were encountered:
Hello.
You can try using one of the following options.
There is definitely an improvement for that API coming but I cannot tell when exactly that will be done.
Options:
Create the whole transaction
// Some smart contract instanceletcontract= web3Instance.contract(...)// A transaction ready to be signed and executedletwriteTransaction= contract.prepareDeploy(bytecode: yourScBytecode)...
Create only encoded data - how a transaction object will be created is up to you.
// It throws only if you give two functions with exactly the same name and input but different output.// That's an invalid overloading of a function. We're safe here thus using `try!`.letcontract=try!EthereumContract(abi:[])// There is also an option to pass constructor and input argumentsletencodedData= contract.deploy(smartContractBytecode)...
In web3java, i can deploy a smart contract by following the methods
deploy()
method to deploy a smart contract on Ethereum network.Now in web3swift i don't see any method to deploy smart contract. I know there will be any other way of deploying but i don't know. can anyone please help in this regard?
The text was updated successfully, but these errors were encountered: