Skip to content
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

I cannot see full error message #124

Open
b3lowster opened this issue May 5, 2024 · 1 comment
Open

I cannot see full error message #124

b3lowster opened this issue May 5, 2024 · 1 comment

Comments

@b3lowster
Copy link

That's my code:

ApiWrapper client = ApiWrapper.ofNile(hexPrivateKey);
ApiWrapper client = getApiWrapper(privateKeyAsHexExternal);
            Response.TransactionExtention response = client.delegateResourceV2(addressExternalWallet, 500L, 1, addressInternalWallet, false, 0L);
Chain.Transaction transaction = client.signTransaction(response);
String txid = client.broadcastTransaction(transaction);
client.close();

I can see the following piece of message:
OTHER_ERROR, <ByteString@7bae6e72 size=80 contents="Contract validate error : delegateBalance must ...">
But the full message is the following:
"Contract validate error : delegateBalance must be greater than or equal to 1 TRX"

@endiaoekoe
Copy link
Contributor

That's my code:

ApiWrapper client = ApiWrapper.ofNile(hexPrivateKey);
ApiWrapper client = getApiWrapper(privateKeyAsHexExternal);
            Response.TransactionExtention response = client.delegateResourceV2(addressExternalWallet, 500L, 1, addressInternalWallet, false, 0L);
Chain.Transaction transaction = client.signTransaction(response);
String txid = client.broadcastTransaction(transaction);
client.close();

I can see the following piece of message: OTHER_ERROR, <ByteString@7bae6e72 size=80 contents="Contract validate error: delegateBalance must ..."> But the full message is the following: "Contract validate error: delegateBalance must be greater than or equal to 1 TRX"

hi, @b3lowster
From the messages you provided above, the return message of the delegateResourceV2 RPC calling is obvious, which indicates that there is something wrong with the param 'delegateBalance' you put in. The value of delegateBalance should be >=1 TRX.
here in method delegateResourceV2, the unit of param 'delegateBalance ' is sun,and 1 TRX = 1,000,000 SUN .

I think you may misunderstand the unit here and may confused with the error message. just replace the value of parm ‘delegateBalance ’ from 1 to 1000000 and try again.
hope it helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants