Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #160 from nearprotocol/initial-balance
Browse files Browse the repository at this point in the history
Set initialBalance for create_account - 1 NEAR
  • Loading branch information
vgrichina authored Oct 16, 2019
2 parents 4b79b9c + 6715697 commit 654baa6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bin/near
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const createAccount = {
.option('initialBalance', {
desc: 'Number of tokens to transfer to newly created account',
type: 'string',
required: true
default: '1000000000000000000'
}),
handler: (argv) => exitOnError(main.createAccount(argv))
};
Expand Down
6 changes: 0 additions & 6 deletions blank_project/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,13 @@
nodeUrl: 'https://rpc.nearprotocol.com',
contractName: CONTRACT_NAME,
walletUrl: 'https://wallet.nearprotocol.com',
initialBalance: 100000000,
};
case 'staging':
return {
networkId: 'staging',
nodeUrl: 'https://staging-rpc.nearprotocol.com/',
contractName: CONTRACT_NAME,
walletUrl: 'https://near-wallet-staging.onrender.com',
initialBalance: 100000000,
};
case 'local':
return {
Expand All @@ -29,15 +27,13 @@
keyPath: `${process.env.HOME}/.near/validator_key.json`,
walletUrl: 'http://localhost:4000/wallet',
contractName: CONTRACT_NAME,
initialBalance: 100000000,
};
case 'test':
return {
networkId: 'local',
nodeUrl: 'http://localhost:3030',
contractName: CONTRACT_NAME,
masterAccount: 'test.near',
initialBalance: 100000000,
};
case 'test-remote':
case 'ci':
Expand All @@ -46,15 +42,13 @@
nodeUrl: 'http://shared-test.nearprotocol.com:3030',
contractName: CONTRACT_NAME,
masterAccount: 'test.near',
initialBalance: 100000000,
};
case 'ci-staging':
return {
networkId: 'shared-test-staging',
nodeUrl: 'http://staging-shared-test.nearprotocol.com:3030',
contractName: CONTRACT_NAME,
masterAccount: 'test.near',
initialBalance: 100000000,
};
default:
throw Error(`Unconfigured environment '${env}'. Can be configured in src/config.js.`);
Expand Down
4 changes: 2 additions & 2 deletions test/test_account_operations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ echo Create account
echo Get account state
RESULT=$(../bin/near state $testaccount | strip-ansi)
echo $RESULT
EXPECTED=".+Account $testaccount.+amount:.+'100000000'.+ "
EXPECTED=".+Account $testaccount.+amount:.+'1000000000000000000'.+ "
if [[ ! "$RESULT" =~ $EXPECTED ]]; then
echo FAILURE Unexpected output from near state
exit 1
fi

../bin/near delete_account $testaccount test.near
../bin/near delete_account $testaccount test.near

0 comments on commit 654baa6

Please sign in to comment.