Skip to content

Instantly share code, notes, and snippets.

@ilblackdragon
Created February 14, 2020 06:33
Show Gist options
  • Select an option

  • Save ilblackdragon/e709f18fea7faa55f090ac2cc1ec4c9d to your computer and use it in GitHub Desktop.

Select an option

Save ilblackdragon/e709f18fea7faa55f090ac2cc1ec4c9d to your computer and use it in GitHub Desktop.

Revisions

  1. ilblackdragon created this gist Feb 14, 2020.
    33 changes: 33 additions & 0 deletions truffle.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,33 @@
    const { NearProvider, nearlib } = require('near-web3-provider');
    const web3 = require('web3');

    ACCOUNT_ID = 'illia'
    const fileKeyStore = new nearlib.keyStores.UnencryptedFileSystemKeyStore('neardev');
    const networkId = 'default';
    const defaultAccount = web3.utils.keccak256(ACCOUNT_ID).slice(26, 66);

    module.exports = {
    networks: {
    near: {
    network_id: '99',
    provider: function() {
    return new NearProvider('https://rpc.nearprotocol.com', fileKeyStore, ACCOUNT_ID, networkId, 'denver-evm');
    },
    from: defaultAccount,
    skipDryRun: true
    },

    development: {
    host: '127.0.0.1',
    port: 7545,
    network_id: '*' // Match any network id
    }
    },

    // Configure your compilers
    compilers: {
    solc: {
    version: '0.5.12', // Fetch exact version from solc-bin (default: truffle's version)
    }
    }
    };