-
Notifications
You must be signed in to change notification settings - Fork 18
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
Need help to interact with a contract #212
Comments
Hello, I see a few mixups here and there! The function will ship in next version of libjs which is imminent I believe.
|
Hello. const authorizedKeys = [
{
publicKey: seed, // It should be the authorized public key and not the seed
encryptedSecretKey: Crypto.ecEncrypt(secretKey, seed), // The second parameter of the function should be the authorized public key
},
]; You can also note that: But I don't see the contract's interaction you mentioned in your title ? |
Thank you both for your replies. @bchamagne I'll probably take the first option and wait, because I think I'm having trouble understanding the path from the secret key to the signing of the transaction. @samuelmanzanera I'm trying to interact with the dex , with the aeETH/UCO pool , to create a swap // UCO --> aeETH
const poolAddressesUcoAeETH =
'000090C5AFCC97C2357E964E3DDF5BE9948477F7C1DE2C633CDFC95B202970AEA036'; to interact with the dex contract, is this the right way to do it? to send UCOs and receive aeETHs? archethic.transaction
.new()
.setType('transfer')
.addUCOTransfer(poolAddressesUcoAeETH, Utils.toBigInt(1))
.addOwnership(cipher, authorizedKeys)
.build(seed,0)
.originSign(originPrivateKey) |
I'd suggest to test on the testnet first ;) archethic.transaction
.new()
.setType('transfer')
.addUCOTransfer(poolAddressesUcoAeETH, Utils.toBigInt(1))
.addRecipient(poolAddressesUcoAeETH "swap", [minAmountToReceive]);
.build(seed,0)
.originSign(originPrivateKey) |
Hello, I've seen a lot of documentation, I think it's very good but unfortunately I still can't sign a transaction. I've come here in the hope that someone will be able to help me. I'll try to describe my problem as fully as possible.
my userseed looks like this : "pirate bateau chimie .... "
my seed looks like this : "0000FD163D0CAD7CF62A6239A037EDABC27AD8467AD2898F899A88C7F9B52D771792"
I know that this code is not at all correct, and that I don't understand all these different keys, if anyone can help me.
The text was updated successfully, but these errors were encountered: