Skip to content

Conversation

@danielailie
Copy link
Contributor

No description provided.

@danielailie danielailie self-assigned this Apr 15, 2025
@danielailie danielailie changed the base branch from feat/next to TOOL-329-add-mustisig-factory April 16, 2025 10:31
@andreibancioiu andreibancioiu changed the title Add mustisig controller Add multisig controller Apr 17, 2025
Base automatically changed from TOOL-329-add-mustisig-factory to feat/next April 29, 2025 13:15
private readonly abi: Abi;

constructor(options: { abi: Abi }) {
this.abi = options?.abi;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think this is necessary.

this.type = MultisigActionEnum.SendTransferExecuteEsdt;
this.receiver = data.to;
this.tokens = data.tokens.map(
(token: { token_identifier: any; nonce: any; amount: any }) =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have the types more precise? e.g. token_identifier: string, nonce: number, amount: bigint.

transaction.guardian = options.guardian ?? Address.empty();
transaction.relayer = options.relayer ?? Address.empty();
transaction.nonce = nonce;
this.setTransactionGasOptions(transaction, options);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here and for the other controllers, we should also handle transaction options for guarded transactions and for hash signing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll do this in a different pr

/**
* Creates a transaction for deploying a new multisig contract
*/
async createTransactionForMultisigDeploy(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should also implement parseDeploy, and awaitCompletedDeploy.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll do that in the next pr

/**
* Awaits the completion of a propose add board member action
*/
async awaitCompletedProposeAddBoardMember(txHash: string): Promise<number> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on sdk-py, I simply added one parse_propose_action method that can be used to get the proposal id of any proposal, instead of having separate methods for each proposal.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

next pr

private multisigFactory: MultisigTransactionsFactory;
private multisigParser: MultisigTransactionsOutcomeParser;

constructor(options: { chainID: string; networkProvider: INetworkProvider; abi: Abi }) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should also have an optional addressHrp parameter, that can be used instead of altering the LibraryConfig.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be discussed, if decided so will do in a different pr


/**
* Awaits the completion of a propose SC upgrade from source action
* Awaits the completion of a propose Contract upgrade from source action
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Titlecase not needed; here and above etc.

private readonly argSerializer: ArgSerializer;

constructor(options: { config: TransactionsFactoryConfig; abi?: Abi }) {
constructor(options: { config: TransactionsFactoryConfig; abi: Abi }) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

this.receiver = data.to;
this.tokens = data.tokens.map(
(token: { token_identifier: any; nonce: any; amount: any }) =>
(token: { token_identifier: string; nonce: bigint; amount: bigint }) =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Above, classes aren't separated by newlines (formatting).

@danielailie danielailie merged commit fac8604 into feat/next May 6, 2025
5 checks passed
@danielailie danielailie deleted the TOOL-329-add-mustisig-controller branch May 6, 2025 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants