Skip to content

Commit

Permalink
GitLab auto-update. Pipeline - 1852. Job - 9376
Browse files Browse the repository at this point in the history
  • Loading branch information
ci-robot committed Nov 21, 2022
1 parent 42b0ab4 commit 5322159
Show file tree
Hide file tree
Showing 46 changed files with 4,854 additions and 3,833 deletions.
9 changes: 9 additions & 0 deletions .mocharc.e2e.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"diff": true,
"full-trace": true,
"timeout": 3600000,
"require": ["ts-node/register", "test/tokenized.staking/e2e.hooks.ts"],
"reporter": "mocha-multi-reporters",
"reporter-option": "configFile=reporterConfig.json",
"extension": ["ts"]
}
9 changes: 9 additions & 0 deletions .mocharc.tokenized.staking.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"diff": true,
"full-trace": true,
"timeout": 3600000,
"require": ["ts-node/register", "test/tokenized.staking/hooks.ts"],
"reporter": "mocha-multi-reporters",
"reporter-option": "configFile=reporterConfig.json",
"extension": ["ts"]
}
131 changes: 112 additions & 19 deletions environments.json
Original file line number Diff line number Diff line change
@@ -1,55 +1,148 @@
{
"defaultEnvName": "custom",
"custom": {
"accounts": ["neo", "morpheus", "trinity", "max", "thomas", "gerry", "jack", "lease_node_1"],
"leasingNode": {
"infraFee": 250,
"maxInfraFee": 10000
},
"assets": [
{
"name": "USDN",
"description": "Neutrino USD",
"quantity": 1000000000000000,
"decimals": 6,
"assetId": ""
},
{
"name": "WBTC",
"description": "Wrapped BTC",
"quantity": 100000000000000000,
"decimals": 8,
"assetId": ""
},
{
"name": "WETH",
"description": "Wrapped ETH",
"quantity": 100000000000000000,
"decimals": 8,
"assetId": ""
}
],
"accounts": ["neo", "morpheus", "trinity", "max", "thomas", "gerry", "jack", "lease_node_1", "tech_acc", "manager", "tech1", "tech2", "tech3", "tech4"],
"amountPerAccount": 22000000000000,
"contracts": ["waves_staking", "technical"],
"contracts": ["tokenized_staking", "leasing_node_new", "waves_staking_adapter", "multisig", "technical"],
"contractsPath": "ride/",
"contractsExtention": ".ride",
"amountPerContract": 10000000000,
"amountPerContract": 50000000000000,
"amountPerAsset": 22000000000000,
"hotWallet": "3MNyNA5QedugKn2G2RcBbMqq4HFNdg5mLwH",
"nonceOffset": 1,
"network": {
"apiKey": "waves-private-node",
"WavesTransferFee": 100000,
"WavesInvokeFee": 500000,
"name": "custom",
"nodeAPI": "http://localhost:6869",
"nodeTimeout": 10000,
"chaidID": "R"
"chainID": "R",
"apiKey": "waves-private-node",
"transferFee": 100000,
"invokeFee": 500000,
"additionalFee": 400000,
"issueFee": 100000000,
"setScriptFee": 1400000
}
},
"testnet": {
"accounts": ["neo", "morpheus", "trinity", "max", "thomas", "gerry", "jack", "lease_node_1"],
"leasingNode": {
"infraFee": 2500,
"maxInfraFee": 10000
},
"assets": [
{
"name": "USDN",
"description": "Neutrino USD",
"quantity": 1000000000000000,
"decimals": 6,
"assetId": ""
},
{
"name": "WBTC",
"description": "Wrapped BTC",
"quantity": 100000000000000000,
"decimals": 8,
"assetId": ""
},
{
"name": "WETH",
"description": "Wrapped ETH",
"quantity": 100000000000000000,
"decimals": 8,
"assetId": ""
}
],
"accounts": ["neo", "morpheus", "trinity", "max", "thomas", "gerry", "jack", "lease_node_1", "tech_acc", "manager", "tech1", "tech2", "tech3", "tech4"],
"amountPerAccount": 100000000000,
"contracts": ["waves_staking", "technical"],
"contracts": ["tokenized_staking", "leasing_node_new", "waves_staking_adapter", "multisig", "technical"],
"contractsPath": "ride/",
"contractsExtention": ".ride",
"amountPerContract": 10000000000,
"nonceOffset": 1,
"network": {
"apiKey": "waves-private-node",
"WavesTransferFee": 100000,
"WavesInvokeFee": 500000,
"name": "testnet",
"nodeAPI": "https://nodes-testnet.wavesnodes.com",
"nodeTimeout": 30000,
"chaidID": "T"
"chainID": "T",
"apiKey": "waves-private-node",
"transferFee": 100000,
"invokeFee": 500000,
"additionalFee": 400000,
"issueFee": 100000000,
"setScriptFee": 1400000
}
},
"mainnet": {
"accounts": ["neo", "morpheus", "trinity", "max", "thomas", "gerry", "jack", "lease_node_1"],
"leasingNode": {
"infraFee": 2500,
"maxInfraFee": 10000
},
"assets": [
{
"name": "USDN",
"description": "Neutrino USD",
"quantity": 1000000000000000,
"decimals": 6,
"assetId": ""
},
{
"name": "WBTC",
"description": "Wrapped BTC",
"quantity": 100000000000000000,
"decimals": 8,
"assetId": ""
},
{
"name": "WETH",
"description": "Wrapped ETH",
"quantity": 100000000000000000,
"decimals": 8,
"assetId": ""
}
],
"accounts": ["neo", "morpheus", "trinity", "max", "thomas", "gerry", "jack", "lease_node_1", "tech_acc", "manager", "tech1", "tech2", "tech3", "tech4"],
"amountPerAccount": 100000000000,
"contracts": ["waves_staking", "technical"],
"contracts": ["tokenized_staking", "leasing_node_new", "waves_staking_adapter", "multisig", "technical"],
"contractsPath": "ride/",
"contractsExtention": ".ride",
"amountPerContract": 10000000000,
"network": {
"apiKey": "waves-private-node",
"WavesTransferFee": 100000,
"WavesInvokeFee": 500000,
"name": "mainnet",
"nodeAPI": "https://nodes.wavesnodes.com'",
"nodeTimeout": 60000,
"chaidID": "W"
"chainID": "W",
"apiKey": "waves-private-node",
"transferFee": 100000,
"invokeFee": 500000,
"additionalFee": 400000,
"issueFee": 100000000,
"setScriptFee": 1400000
}
}
}
22 changes: 11 additions & 11 deletions migrations/1_init.ts
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
import { deployScript, ProofsGenerator } from '../utils/script';
import { data, transfer } from '../utils/transaction';
import path = require('path');
import {
WavesNetwork,
WavesSetScriptFee,
WavesInvokeFee,
} from '../utils/network';
NetworkConfig,
deployScript,
ProofsGenerator,
data,
transfer,
} from '@pepe-team/waves-sc-test-utils';
import path = require('path');
import { address, seedWithNonce, keyPair } from '@waves/ts-lib-crypto';

export default async function (
deployerSeed: string,
appliedNonce: number,
network: WavesNetwork,
network: NetworkConfig,
proofsGenerator: ProofsGenerator
) {
const deployerPrivateKey = keyPair(deployerSeed).privateKey;
const contract = keyPair(seedWithNonce(deployerSeed, appliedNonce + 1));
const contractAddress = address(
{ publicKey: contract.publicKey },
network.chaidID
network.chainID
);

await transfer(
{
amount: WavesSetScriptFee + WavesInvokeFee,
amount: network.setScriptFee + network.invokeFee,
recipient: contractAddress,
},
deployerPrivateKey,
Expand All @@ -49,7 +49,7 @@ export default async function (
{
key: 'OWNER',
type: 'string',
value: address(deployerSeed, network.chaidID),
value: address(deployerSeed, network.chainID),
},
],
},
Expand Down
26 changes: 13 additions & 13 deletions migrations/2_multisig.ts
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
import path = require('path');
import { deployScript, ProofsGenerator } from '../utils/script';
import { transfer, data, invoke } from '../utils/transaction';
import {
WavesInvokeFee,
WavesNetwork,
WavesNetworkMainnet,
WavesSetScriptFee,
} from '../utils/network';
deployScript,
ProofsGenerator,
invoke,
transfer,
NetworkConfig,
} from '@pepe-team/waves-sc-test-utils';
import { address, seedWithNonce, keyPair } from '@waves/ts-lib-crypto';

export default async function (
deployerSeed: string,
appliedNonce: number,
network: WavesNetwork,
network: NetworkConfig,
proofsGenerator: ProofsGenerator
) {
const deployerPrivateKey = keyPair(deployerSeed).privateKey;
const contract = keyPair(seedWithNonce(deployerSeed, appliedNonce + 1));
const contractAddress = address(
{ publicKey: contract.publicKey },
network.chaidID
network.chainID
);
console.log('Multisig contract address =', contractAddress);

await transfer(
{
amount: WavesSetScriptFee + WavesInvokeFee,
amount: network.setScriptFee + network.invokeFee,
recipient: contractAddress,
},
deployerPrivateKey,
Expand All @@ -35,8 +35,8 @@ export default async function (
});

let defaultQuorum = 0;
switch (network) {
case WavesNetworkMainnet:
switch (network.name) {
case 'mainnet':
defaultQuorum = 3;
break;
default:
Expand Down Expand Up @@ -89,7 +89,7 @@ export default async function (
},
],
},
fee: 100500000,
fee: 500000,
},
deployerPrivateKey,
network,
Expand Down
Loading

0 comments on commit 5322159

Please sign in to comment.