Skip to content

Commit

Permalink
ci: updated artifacts version and CLI msig for hypha
Browse files Browse the repository at this point in the history
  • Loading branch information
theblockstalk committed Sep 30, 2024
1 parent 27b53c9 commit b3e92b0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
run: ./Tonomy-Contracts/contracts/vesting.tmy/build.sh local

- name: Add Tonomy-Contracts dir to artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Tonomy-Contracts
path: ./Tonomy-Contracts
Expand Down
2 changes: 2 additions & 0 deletions src/cli/msig/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { setResourceConfig } from './setResourceConfig';
import { setBlockchainConfig } from './setBlockchainConfig';
import { addProd, changeProds, removeProd } from './producers';
import { hyphaAccountsCreate } from './hyphaAccountsCreate';
import { sleep } from '../../sdk/util';

const eosioMsigContract = EosioMsigContract.Instance;

Expand Down Expand Up @@ -358,6 +359,7 @@ export async function executeProposal(

try {
for (let i = 0; i < 2; i++) {
await sleep(1000);
await eosioMsigContract.approve(
proposer,
proposalName,
Expand Down
17 changes: 10 additions & 7 deletions src/cli/msig/newAccount.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import { Authority } from '../../sdk/services/blockchain';
import { StandardProposalOptions, createProposal, executeProposal } from '.';

// @ts-expect-error args not used
export async function newAccount(args: { governanceAccounts: string[] }, options: StandardProposalOptions) {
const newAccount = 'advteam.tmy';
const accountName = 'login.hypha';

const activeAuth = Authority.fromAccount({ actor: 'team.tmy', permission: 'active' });
const additionalAuthority = options.test ? args.governanceAccounts[2] : '11.found.tmy';
const active = Authority.fromKey('EOS5DMPJ4DsJ2Vc4f7g5o8z9o5HswcpXrE4C58r7wxxzZgYxQn8rB');

active.addAccount({ actor: 'gov.tmy', permission: 'active' });

const owner = active;

activeAuth.addAccount({ actor: additionalAuthority, permission: 'active' });
const action = {
account: 'tonomy',
name: 'newaccount',
Expand All @@ -23,9 +26,9 @@ export async function newAccount(args: { governanceAccounts: string[] }, options
],
data: {
creator: 'tonomy',
name: newAccount,
owner: Authority.fromAccount({ actor: 'team.tmy', permission: 'owner' }),
active: activeAuth,
name: accountName,
owner,
active,
},
};

Expand Down

0 comments on commit b3e92b0

Please sign in to comment.