Coder Social home page Coder Social logo

Comments (4)

gogolevdms avatar gogolevdms commented on June 30, 2024 3

I wrote script:

async function test() {
    await web3.setProvider('my node'); // shard 1, https://api.harmony.one is not correct, because shard 0

    let abi = [
        {
            "constant": true,
            "inputs": [],
            "name": "owner",
            "outputs": [
                {
                    "name": "",
                    "type": "address"
                }
            ],
            "payable": false,
            "type": "function"
        },
        {
            "inputs": [],
            "payable": false,
            "type": "constructor"
        }
    ];
    console.log('balance', await web3.eth.getBalance('0xFc1AC22d172C782747E8337908923Cc19a421acF')); // is owner, for check node connection
    let MyContract = await new web3.eth.Contract(abi, '0xefcaC5a8B9ff964EA46705840fe3dD137ae3308E');

    let owner = await MyContract.methods.owner().call();
    console.log("owner = ", owner);
}

test();

You can see output:
photo_2022-05-02_14-39-01

from explorer-v2-frontend.

gogolevdms avatar gogolevdms commented on June 30, 2024 2

photo_2022-05-02_14-47-34

I have some contracts... for example, you can see in attach another address

from explorer-v2-frontend.

victaphu avatar victaphu commented on June 30, 2024 1

I'll take a look at this

from explorer-v2-frontend.

victaphu avatar victaphu commented on June 30, 2024 1

@gogolevdms this should now be fixed, please check it out. I verified with a simpletoken contract.

from explorer-v2-frontend.

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.