Closed bxlkm closed 2 years ago
Hello @bxlkm
Can you please tell me more?
Would you like that we create a Java example using neow3j to cancel a vote?
@gsmachado Yes, examples of canceling voting and withdrawing awards。ths!!!
@bxlkm you can find an example on how to vote for a pubKey candidate in this file.
If you would like to withdraw GAS, you just need to make a GAS transfer to another Neo address. You can find an example here.
If you want to check the GAS balance of your wallet, you can use the GasToken
class (check the available methods).
@mialbu any example on how to cancel a vote?
Correct me if I'm wrong, but to cancel a vote someone could simply give null
to the "candidateKey" param on the .vote()
method here... right?
@bxlkm, to cancel a vote do this with neow3j:
NeoSendRawTransaction response = new NeoToken(neow3j)
.invokeFunction("vote", hash160(account.getScriptHash()), any(null))
.signers(AccountSigner.calledByEntry(account))
.sign()
.send();
@csmuller @mialbu thank you very much!
@csmuller @mialbu How to write the GAS Claim code?
You can do it by transferring any amount of NEO to yourself. In the example below, a transfer from account
to itself is made assuming that its balance is 1 or higher.
new NeoToken(neow3j).transfer(account, account.getScriptHash(), BigInteger.ONE)
.sign()
.send();
@csmuller ths。
@bxlkm I will close this issue. If any questions remain, please re-open it. Thanks! 👍
please help me ths!