0

What is the simplest way of interacting with a Deployed contract, considering that I am the owner of the contract (Token Contract).

I use Truffle/Solidity0.5.0/Open-Zeppelin/node10.15.0 nothing extra nothing else (web3 was installed during the deployment but no idea of how to use it)

https://ropsten.etherscan.io/token/0x975FB1824F82E446DD3F5c4cb04474468ED7d878

I mostly need to call functions mint() and burn().

Would appreciate if you can suggest me simplest ways of doing so.

1

In your Truffle test, you can do something like:

const CONTRACT_ADDRESS = "0x975FB1824F82E446DD3F5c4cb04474468ED7d878";

contract("MyContractTest", function(accounts) {
    let myContract;

    before(async function() {
        myContract = await artifacts.require("MyContractName").at(CONTRACT_ADDRESS);
    });

    it("test", async function() {
        // Here, you can feel free to use myContract
    });
});

You can do something similar in your Truffle deployment script, just keep in mind that function at is an asynchronous function.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.