-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Signing and Sending Transaction with ContractExecuteTransaction Error #128
Comments
mojowlekaz
changed the title
Signing and Sending Trasaction with ContractExecuteTransaction Error
Signing and Sending Transaction with ContractExecuteTransaction Error
Aug 20, 2022
You are not initializing hashconnect - please read docs |
I did initialise Hashconnect
You can send me a link to that if I'm getting something wrong.
…On Sat, 20 Aug 2022, 3:08 pm Tyler Cote, ***@***.***> wrote:
You are not initializing hashconnect - please read docs
—
Reply to this email directly, view it on GitHub
<#128 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWGVSZLJ6QHD67KN2CT2Z6LV2DREHANCNFSM57DBLOQA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
You are literally not calling .init() |
Oh..
I did that and I'm not sure what the error is about, could you show me how
it'll be written properly?
…On Sat, 20 Aug 2022, 3:12 pm Tyler Cote, ***@***.***> wrote:
You are literally not calling .init()
—
Reply to this email directly, view it on GitHub
<#128 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWGVSZPMDVX7BSSXWT2ARW3V2DRURANCNFSM57DBLOQA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
read the docs |
Top the worst response I have ever seen on github.. great job |
Thank you |
Fixed it by following the examples: Still the documentation is lacking. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is my Code
async function run() {
let contractId = ContractId.fromString("0.0.47907889");
let accountId = "0.0.47905112"
const privateKey = PrivateKey.fromString("302e020100300506032b657004220420341b71552663fe46c2cec11d71dda6a5f804e704760f7e625ba59165a56d1a59");
const provider = hashconnect.getProvider('testnet', saveData.topic, accountId)
const signer = hashconnect.getSigner(provider)
let balance = await provider.getAccountBalance(accountId)
const stakeTx = await new ContractExecuteTransaction()
.setContractId(contractId)
.setGas(500000)
.setPayableAmount(50)
.setFunction("stakeTokens")
.freezeWithSigner(signer);
const result = await stakeTx.executeWithSigner(signer)
console.log(result)
}
when i run this, it gives me an error "Error: SimpleCrypto object MUST BE initialised with a SECRET KEY."
The text was updated successfully, but these errors were encountered: