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

senderAddress should automatically convert hex format to base58 #2

Open
hayeah opened this Issue Dec 28, 2017 · 8 comments

Comments

Projects
None yet
2 participants
@hayeah
Collaborator

hayeah commented Dec 28, 2017

The qtumd RPC does not support senderAddress in hexadecimal format. This makes the qtumjs API rather awkward when senderAddress is involved.

Should detect hex address and convert that automatically to base58 format.

@pplam

This comment has been minimized.

pplam commented Jan 10, 2018

@hayeah hey man, did you fix the bug? Can it deal with overloaded methods now?

@hayeah

This comment has been minimized.

Collaborator

hayeah commented Jan 10, 2018

the qtumd core team is adding hex address support, I am waiting on that.

what do you mean by overloaded methods?

@pplam

This comment has been minimized.

pplam commented Jan 15, 2018

Suppose I have two methods share the same name in my abi, i.e. transfer(address,amount) and tansfer(address,amount,data), your qtumjs doesn't work. I have figured it out in a issue before, but somehow it was deleted. Please have a look at here:

qtumjs/src/Contract.ts

Lines 195 to 204 in dea61dd

for (const methodABI of info.abi) {
const name = methodABI.name
// Allow sendToContract only for non-constant methods
if (!methodABI.constant) {
this.sendMethodsMap[name] = methodABI
}
this.callMethodsMap[name] = methodABI
}

@pplam

This comment has been minimized.

pplam commented Jan 15, 2018

And another issue, I don't know why some events are decoded to null, so I have to use ethjs-abi to decode them manually

@hayeah

This comment has been minimized.

Collaborator

hayeah commented Jan 16, 2018

can you give me the Solidity example where the events are decoded to null?

I'll debug it. I've created an issue for this problem: #4

@hayeah

This comment has been minimized.

Collaborator

hayeah commented Jan 22, 2018

@pplam method overloading support is added. see:

https://qtumproject.github.io/qtumjs-doc/#method-overloading

i'll close this issue in favour of #4

@hayeah hayeah closed this Jan 22, 2018

@hayeah hayeah reopened this May 30, 2018

@hayeah

This comment has been minimized.

Collaborator

hayeah commented May 30, 2018

actually this problem is not solved

@hayeah

This comment has been minimized.

Collaborator

hayeah commented May 30, 2018

perhaps a stop-gap solution is to detect hex address and implicitly make an RPC call to convert it to base58 format

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment