Closed duongvansang closed 5 years ago
Gas is greater than the current block gasLimit, so not adoptable now.
Build contract creation clause is one option, but there is another tool for contracts, check this out https://inspector.vecha.in
Gas is greater than the current block gasLimit, so not adoptable now.
Build contract creation clause is one option, but there is another tool for contracts, check this out https://inspector.vecha.in
Blockchain network will adjust gasLimit, so it is not adoptable now, the tx has the chance to be adopted. We will take this suggestion and consider improving that in the future.
Check the Deploy tab in the header.
Oh, responsive issue, when open Sync with small width, tabs is disappear, cannot see any tab
actually, when open developer console
Blockchain network will adjust gasLimit, so it is not adoptable now, the tx has the chance to be adopted. We will take this suggestion and consider improving that in the future.
Check the Deploy tab in the header.
@libotony There is any way to pass arguments (init data) to create smart contract, I don't see any of it in Transaction Signing Request object on document.
@duongvansang You can use remix
to produce deployment data.
In the right panel, switch to Run
and select your contract, then expand Deploy
section:
Fill in your constructor args, and click Encode values of input fields & copy to clipboard
, then you get deployment data.
@duongvansang You can use
remix
to produce deployment data.In the right panel, switch to
Run
and select your contract, then expandDeploy
section:Fill in your constructor args, and click
Encode values of input fields & copy to clipboard
, then you get deployment data.
Thank you very much, there is any way to run it from code? it's more flexible and I can develop API, actually the initing values are input by users, it's too difficult for them to use Remix or something like that.
Here is a piece of demo code in typescript https://gist.github.com/qianbin/3d4734643e8446f76f06cabce0c0c948
The last line updated
const dataToDeploy = byteCode + coder.encode(1).slice(10 /* remove 0x prefix and 4bytes sig */)
The last line updated
const dataToDeploy = byteCode + coder.encode(1).slice(10 /* remove 0x prefix and 4bytes sig */)
It could be work around solution. But I think it's better for developer if you add argument to Transaction Signing Request object, or add a method for encoding data object with both data and argument like encodeABI of web3js
@duongvansang
It's a rare case for an app to provide contract deployment.
Connex does not intent to be an all-in-one utility like web3, but keeps simple, flexible and stable to app developers.
@duongvansang It's a rare case for an app to provide contract deployment. Connex does not intent to be an all-in-one utility like web3, but keeps simple, flexible and stable to app developers.
maybe yes, but how about send a transaction to call smart contract method with parameters?
@duongvansang It's a rare case for an app to provide contract deployment. Connex does not intent to be an all-in-one utility like web3, but keeps simple, flexible and stable to app developers.
maybe yes, but how about send a transaction to call smart contract method with parameters?
const method = connex.thor.account(address).method(ABI)
const clause = method.asClause(args) // this will pack args into one clause
signingService.request([
clause
]).then(result=>{
console.log(result)
})
address
Ok thank you very much
I tried to deploy smart contract by using Thor.Vendor.TXSigningService, but I got ERROR[03-05|15:48:32] executing transaction error="tx not adoptable now".