Created
February 14, 2020 06:33
-
-
Save ilblackdragon/e709f18fea7faa55f090ac2cc1ec4c9d to your computer and use it in GitHub Desktop.
Truffle example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment