The create_marketing CLI tool
./create_marketing
What is the id number of your campaign?
123
What type of campaign is this? banner, social, or text
banner
Enter a keyword, can be up to 40 characters
blockchains
Enter the location the ad was displayed, can be up to 100 characters
coolblockchainwebsite.com
How many times was the ad viewed? (0 to 255)
1
How many times was the ad clicked? (0 to 255)
1
What is the value of each impression? (1.25)
0.48
What is the value of each click? (1.25)
1.49
Please enter the amount for the fee: (eg. 1.09)
1
The create_marketing output:
transaction: {
"txtype": 5,
"timestamp": 1711555548,
"campaign": 123,
"ad_type": "banner",
"keyword": "blockchains ",
"displayed": "coolblockchainwebsite.com ",
"impression": 1,
"click": 1,
"impression_value": 48,
"click_value": 149,
"advertiser": "CLC024317262f00570608aabfcdacebc0fe9def7b6529f072b7a5e3a2b68136c984a7",
"txfee": 100000000,
"hash": "887317b44b2e8899943d66e2a05390c13e46137c1f2c0f41e2016be904b0c63f",
"signature": "cb7d3e6f35f92d40c2edfd15c2e87dd3bcfb16cfa312c7f7334e7354f6e19aee3dbaeccddeb7a73cff5fb37844d95dffa6ad03218bd8a25859bbb99a7ae89938"
}
Output is also saved to transactions:
ls transactions/
887317b44b2e8899943d66e2a05390c13e46137c1f2c0f41e2016be904b0c63f.json
To broadcast transaction after creating simply issue:
./broadcast_transaction ./transactions/887317b44b2e8899943d66e2a05390c13e46137c1f2c0f41e2016be904b0c63f.json