{"size": 856, "ext": "js", "max_stars_repo_path": "examples/00_Getting_started/migrations/2_deploy_contracts.js", "max_stars_repo_name": "cfelde/Using-AKAP", "max_stars_repo_stars_event_min_datetime": "2020-05-04T02:25:36.000Z", "max_stars_repo_stars_event_max_datetime": "2020-05-04T02:25:36.000Z", "max_issues_repo_path": "examples/00_Getting_started/migrations/2_deploy_contracts.js", "max_issues_repo_name": "cfelde/Using-AKAP", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "examples/00_Getting_started/migrations/2_deploy_contracts.js", "max_forks_repo_name": "cfelde/Using-AKAP", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 34.24, "max_line_length": 83, "alphanum_fraction": 0.6857476636}
const exampleZero = artifacts.require("ExampleZero");

function akapAddress(network) {
    let officialAddress = "0xaacCAAB0E85b1EfCEcdBA88F4399fa6CAb402349";
    let testNetworkAddress = "REPLACE ME WITH YOUR TESTNET AKAP ADDRESS";

    switch(network) {
        case "goerli": return officialAddress;
        case "rinkeby": return officialAddress;
        case "kovan": return officialAddress;
        case "ropsten": return officialAddress;
        case "mainnet": return officialAddress;
        default: return testNetworkAddress;
    }
}

module.exports = function(deployer, network, accounts) {
    deployer.then(async () => {
        let instance = await deployer.deploy(exampleZero, akapAddress(network));
        let nodeId = await instance.node();

        console.log("Contract created with node id = " + web3.utils.toHex(nodeId));
    });
};
