MCPcopy Create free account
hub / github.com/PolymathNetwork/polymath-core / startScript

Function startScript

CLI/commands/transfer_ownership.js:10–20  ·  view source on GitHub ↗
(contractAddress, transferTo)

Source from the content-addressed store, hash-verified

8//////////////////////////////////////////ENTRY INTO SCRIPT//////////////////////////////////////////
9
10async function startScript(contractAddress, transferTo) {
11
12 if (!web3.utils.isAddress(contractAddress) || !web3.utils.isAddress(transferTo)) {
13 console.log(chlak.red(`Please enter valid addresses`));
14 } else {
15 let ownableABI = abis.ownable();
16 contract = new web3.eth.Contract(ownableABI, contractAddress);
17 contract.setProvider(web3.currentProvider);
18 transferOwnership(transferTo);
19 }
20}
21
22async function transferOwnership(transferTo) {
23 // Check if Issuer is the current owner

Callers 1

Calls 1

transferOwnershipFunction · 0.85

Tested by

no test coverage detected