Dimfred / imxpy

MIT License
9 stars 1 forks source link

missing headers in transfer tokens #2

Open vasyapeteckin opened 1 year ago

vasyapeteckin commented 1 year ago

IMX updated the parameters for the transfer of tokens, and now it is required to add parameters to the header, where can I do this?

client = IMXClient( net="main", n_workers=1, pk="PRIVATE_KEY")

token_gods = ERC20(symbol='GODS', quantity=1, type="ERC20", decimals=18, contract_addr='0xccc8cb5229b0ac8069c51fd58367fd1e622afd97')

some_params = TransferParams(sender=sender_address, receiver=receiver_address, token=token_gods) future = client.transfer(params=some_params) res = future.result() print(res) returns: {'status': 'error', 'result': 'x-imx-eth-signature and x-imx-eth-address headers both required'}

Dimfred commented 1 year ago

Hey thank you, feel free to provide a PR to fix this, I am kinda busy rn, but will fix it once I find time.

LeapGamer commented 1 year ago

Hey im getting the same thing. If I figure a solution ill post it, @vasyapeteckin did you end up solving it?

Dimfred commented 1 year ago

So if anyone finds time, the first step would probably be to upgrade the imx-sdk to the most recent version, I am pretty sure a very old one is currently installed. Yeah and then basically work from there.