This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Metric | CO2Eq | |
|---|---|---|
| blocks | 1 | |
| bounce_drops | 2 | |
| bounces | 2 | |
| clicks | 2 | |
| deferred | 2 | |
| delivered | 20 | |
| invalid_emails | 0 | |
| opens | 10 | |
| processed | 15 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let totalco=0; | |
| for(let i=0;i<mailStats.length;i++) { | |
| for(let j=0;j<mailStats[i].stats.length;j++) { | |
| for (const [key, value] of Object.entries(mailStats[i].stats[j].metrics)) { | |
| if(key == "blocks") totalco2+=1 | |
| if(key == "bounce_drops") totalco2+=2 | |
| if(key == "bounces") totalco2+=2 | |
| if(key == "clicks") totalco2+=2 | |
| if(key == "deferred") totalco2+=2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const sendgridAPIKey = 'YOUR_SENDGRID_API_KEY'; | |
| const rapidAPIKey = 'YOUR_RAPIDAPI_KEY'; | |
| const fromDate = new Date(new Date().getTime() - (7*87600000)).toISOString().split('T')[0]; // last 7 days | |
| const axios = require("axios"); | |
| // Retrieve Statistics from Sendgrid | |
| const sendgridStatsResponds = await axios.get("https://sendgrid.com/v3/stats?start_date="+fromDate,{ | |
| headers: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const app = async function() { | |
| const sendgridAPIKey = process.env.sendgridAPIKey; | |
| const rapidAPIKey = process.env.rapidAPIKey; | |
| const fromDate = new Date(new Date().getTime() - (7*87600000)).toISOString().split('T')[0]; // last 7 days | |
| const axios = require("axios"); | |
| // Retrieve Statistics from Sendgrid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| openapi: 3.0.0 | |
| info: | |
| title: ID-Ideal - AP8 | |
| description: > | |
| Sample Requests using the [Corrently Ecosystem](https://corrently.io) as implementation. You might get an `account` using the [Create Stromkonto Endpoint](https://api.corrently.io/v2.0/stromkonto/create) or use one from an existing eWallet. | |
| [](https://god.gw.postman.com/run-collection/15081091-766401d6-06c2-47a3-bb3e-35aac41992d9?action=collection%2Ffork&collection-url=entityId%3D15081091-766401d6-06c2-47a3-bb3e-35aac41992d9%26entityType%3Dcollection%26workspaceId%3D9bdc41fc-ebac-4de7-96fb-4e7650494186) | |
| contact: {} | |
| version: '1.0' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pragma solidity ^0.8.0; | |
| import "./espledger.sol"; | |
| contract espaccounting { | |
| mapping (address => espledger) public ledgers; | |
| function transfer(address from,address to, uint256 value) public returns (bool success) { | |
| espledger ledger = ledgers[msg.sender]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pragma solidity ^0.8.0; | |
| contract espledger { | |
| mapping (address => uint256) public balanceDebit; | |
| mapping (address => uint256) public balanceCredit; | |
| uint256 public totalSupply = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [{"id":"db85efb31b8d6c63","type":"tab","label":"Presentation Processing Service","disabled":false,"info":""},{"id":"bc8ea23eafbd50c9","type":"SmartContract","z":"db85efb31b8d6c63","name":"Alice","Connection":"709fcd56ae2bfcc5","Contract":"446e716af8a146aa","Resolver":"79856bb80496c409","AllowInject":"","RetryTX":true,"rapidAPIkey":"","pps":"","x":490,"y":100,"wires":[[],[],["8b80cd4520f6c3f6"],[]]},{"id":"55bf9f3bf037d791","type":"inject","z":"db85efb31b8d6c63","name":"Buy MegaConcert Ticket","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"presentation\":{\"event\":\"Mega Concert\"}}","payloadType":"json","x":290,"y":100,"wires":[["bc8ea23eafbd50c9"]]},{"id":"8b80cd4520f6c3f6","type":"debug","z":"db85efb31b8d6c63","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":650,"y":100,"wires":[]},{"id":"709fcd56ae2bfcc5","type":"DLTConnection","name":"Integr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [{"id":"db85efb31b8d6c63","type":"tab","label":"Presentation Processing Service","disabled":false,"info":""},{"id":"bc8ea23eafbd50c9","type":"SmartContract","z":"db85efb31b8d6c63","name":"Alice","Connection":"709fcd56ae2bfcc5","Contract":"446e716af8a146aa","Resolver":"79856bb80496c409","AllowInject":"","RetryTX":true,"rapidAPIkey":"","pps":"","x":490,"y":100,"wires":[[],[],["902e10e94df6036e"],[]]},{"id":"55bf9f3bf037d791","type":"inject","z":"db85efb31b8d6c63","name":"Buy MegaConcert Ticket","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"presentation\":{\"event\":\"Mega Concert\"}}","payloadType":"json","x":290,"y":100,"wires":[["bc8ea23eafbd50c9"]]},{"id":"902e10e94df6036e","type":"SmartContract","z":"db85efb31b8d6c63","name":"TicketA","Connection":"d26ccfb316876b3e","Contract":"446e716af8a146aa","Resolver":"79856bb80496c409","AllowInject":"","RetryTX":true,"rapidAPIkey":"","pps":"http://localhost:1880/eventPPS","x":680,"y":1 |