Skip to content

createcampgn ​

Summary ​

This action will allow manager to create a new campaign

Action Parameters ​

Property NameC++ TypeJavaScript TypeDescription
campaigneosio::nameStringThe name of the campaign
managereosio::nameStringThe account that will act as manager of the campaign

Required Permissions: manager

CLI - cleos ​

shell
cleos push action ultra.rgrab createcampgn '["testcampaign", "manager"]' -p manager

Javascript - eosjs ​

typescript
(async () => {
    const result = await api.transact(
        {
            actions: [
                {
                    account: 'ultra.rgrab',
                    name: 'createcampgn',
                    authorization: [
                        {
                            actor: 'manager',
                            permission: 'active',
                        },
                    ],
                    data: {
                        campaign: 'testcampaign',
                        manager: 'manager'
                    },
                },
            ],
        },
        {
            blocksBehind: 3,
            expireSeconds: 30,
        }
    );
})();