Giter Site home page Giter Site logo

Comments (3)

neeboo avatar neeboo commented on August 31, 2024

in newTx. We accept both 0xchecksumed and bech32 addr. In contract params, currently it supports 0xchecksumed addr.

To convert address format for now. we can use crypto.getAddress(addr).checksum to convert.

I can convert the address internally when constructing the params. However there are risks such as user input raw base16(without checksumed).

I need further discussion about this issue, because currently encoding solidity contract is using eth‘s method.

from sdk.

neeboo avatar neeboo commented on August 31, 2024

one more thing.

const tx = contract.methods.transfer(address, parseInt(amount)).send({
        from: active.address, // <--- address is of 0x format
        gasLimit: '1000000',
        gasPrice: new hmy.utils.Unit('10').asGwei().toWei(),
    })

The from here is not necessarily needed. Because when the txn is signed, it will be replaced as signer’s address.

from sdk.

neeboo avatar neeboo commented on August 31, 2024

@mattlockyer would you try this branch to see if it works for you.

https://github.com/harmony-one/sdk/tree/neeboo/contract

from sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.