Skip to content

Commit

Permalink
Add some more end to end tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkeating committed Jul 26, 2021
1 parent 4a62f67 commit f3a414c
Show file tree
Hide file tree
Showing 8 changed files with 583 additions and 496 deletions.
22 changes: 11 additions & 11 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
module.exports = {
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
}
},
rules: {
semi: [2, 'always'],
indent: [2, 'tab'],
}
parserOptions: {
ecmaVersion: 2020,
sourceType: "module",
ecmaFeatures: {
jsx: true
}
},
rules: {
semi: [2, "always"],
indent: [2, "space"]
}
};
3 changes: 2 additions & 1 deletion clean.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
MOLOCH_ACCOUNT_ID=$(grep MOLOCH_ACCOUNT_ID .env | cut -d "=" -f2)
FDAI_ACCOUNT_ID=$(grep FDAI_ACCOUNT_ID .env | cut -d "=" -f2)

near delete $MOLOCH_ACCOUNT_ID.mrkeating.testnet mrkeating.testnet
near delete fdai.mrkeating.testnet mrkeating.testnet
near delete $FDAI_ACCOUNT_ID.mrkeating.testnet mrkeating.testnet

9 changes: 5 additions & 4 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# Make sure that a near account is created and that
MOLOCH_ACCOUNT_ID=$(grep MOLOCH_ACCOUNT_ID .env | cut -d "=" -f2)
FDAI_ACCOUNT_ID=$(grep FDAI_ACCOUNT_ID .env | cut -d "=" -f2)

# a subaccount is made for each subsequent deploy
#
# ten second periods, voting period 20 seconds grace 10 seconds
near create-account $MOLOCH_ACCOUNT_ID.mrkeating.testnet --master-account mrkeating.testnet
near create-account fdai.mrkeating.testnet --master-account mrkeating.testnet
near deploy --wasmFile res/test_fungible_token.wasm --accountId fdai.mrkeating.testnet
near call fdai.mrkeating.testnet new_default_meta --accountId fdai.mrkeating.testnet --args '{"owner_id":"mrkeating.testnet","total_supply":"1000000000"}'
near create-account $FDAI_ACCOUNT_ID.mrkeating.testnet --master-account mrkeating.testnet
near deploy --wasmFile res/test_fungible_token.wasm --accountId $FDAI_ACCOUNT_ID.mrkeating.testnet
near call $FDAI_ACCOUNT_ID.mrkeating.testnet new_default_meta --accountId $FDAI_ACCOUNT_ID.mrkeating.testnet --args '{"owner_id":"mrkeating.testnet","total_supply":"1000000000"}'

near deploy --wasmFile res/moloch.wasm --accountId $MOLOCH_ACCOUNT_ID.mrkeating.testnet
near call $MOLOCH_ACCOUNT_ID.mrkeating.testnet new --accountId $MOLOCH_ACCOUNT_ID.mrkeating.testnet --args '{"summoner": "mrkeating.testnet", "approved_token": "fdai.mrkeating.testnet", "period_duration": "10000000000", "voting_period_length": "2", "grace_period_length": "1", "abort_window": "2", "proposal_deposit": "10", "dilution_bound": "1", "processing_reward": "1"}'
near call $MOLOCH_ACCOUNT_ID.mrkeating.testnet new --accountId $MOLOCH_ACCOUNT_ID.mrkeating.testnet --args '{"summoner": "mrkeating.testnet", "approved_token": "fdaiv3.mrkeating.testnet", "period_duration": "10000000000", "voting_period_length": "2", "grace_period_length": "1", "abort_window": "2", "proposal_deposit": "10", "dilution_bound": "1", "processing_reward": "1"}'
Loading

0 comments on commit f3a414c

Please sign in to comment.