Skip to content

Object deployment seed generation with multisig publisher #198

@cisok

Description

@cisok

If I want to have a setup where there is a multisig address (created with multisig_v2 module) capable of making multiple object deployments, looking at the seed generation, the derived address would always be the same, since the multisig account's sequence number does not change.

inline fun object_seed(publisher: address): vector<u8> {
let sequence_number = account::get_sequence_number(publisher) + 1;
let seeds = vector[];
vector::append(
&mut seeds, bcs::to_bytes(&OBJECT_CODE_DEPLOYMENT_DOMAIN_SEPARATOR)
);
vector::append(&mut seeds, bcs::to_bytes(&sequence_number));
seeds
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions