Open laurenluz opened 5 months ago
@laurenluz I received the optimism one, but around 2 hours later than the transaction time. cc @mohammadranjbarz
We shouldn't have received email for gnosis notify reward because I made it manually myself, and the script is not executed for it.
For the migration I think first we need to define an Ortto activity for this, but Mitch knows better than me. @divine-comedian wdyt?
If we want to do it outside of the dapp mailer service (which I think we should move everything to Ortt) then yes.
Will also define a new source that will have its own API key.
What information fields need to be included in the response? what type are they? number/string etc..
well the email basically has this info:
@mohammadranjbarz maybe you can give info on the type of fields, number string etc. that this email contains?
is it ready to be picked up @divine-comedian @RamRamez
I need the details of what information fields need to be included so I can make the activity in Ortto
@mohammadranjbarz can you give the informatino fields? I don't know how to answer this question
I need the details of what information fields need to be included so I can make the activity in Ortto
@divine-comedian The table that Lauren has sent is enough, the left column is name of the fields, and you can assume all fields are string
Here's the sample code you'll need to send in an https request to the ortto API @RamRamez knows how to format and send this.
You'll also need a new API key for this one as I've distinguished it as a new source. I will DM it to you.
When you send this http request with the info it will trigger the email sending to the specified contact
https.request('https://api-us.ortto.app/v1/activities/create
headers: {
'Content-Type': 'application/json',
'X-Api-Key': '{{ APIKey }}',
'Content-Length': data.length
}
{
"activities": [
{
"activity_id": "act:cm:notify-reward",
"attributes": {
"dtz:cm:date": {
"year": 2024,
"month": 6,
"day": 12,
"timezone": "UTC"
},
// this is a number
"int:cm:round": 1718236417,
// these are strings
"str:cm:amount": "example string value",
"str:cm:contractaddress": "example string value",
"str:cm:farm": "example string value",
"str:cm:message": "example string value",
"str:cm:network": "example string value",
"str:cm:script": "example string value",
"str:cm:transactionhash": "example string value"
},
"fields": {
"str::email": "contact@email.com"
},
}
],
"merge_by": [
"str::email"
]
}
@ae2079 please take this if you have bandwidth FYI @jainkrati I assigned this issue to Ali
@ae2079 There is the code we use it https://github.com/Giveth/giv-token-contracts/blob/main/deployments/notifyRewardAmount/optimism/givpower_distribute_extended_may_2024.js#L64-L72
https://github.com/Giveth/giv-token-contracts/blob/main/deployments/mailService/mailService.js
We should change it to instead of requesting to dappmailer use ortto and also there are some scripts in the server ( that are not in the codes) we should all recipient emails there
@ae2079 was this finished?
@ae2079 was this finished?
@laurenluz Yes it's done, we just need to deploy and test it together, maybe Sunday we will do it
they need to test it together - they have a call for it today - when we merge PR we test it on staging
it is from notify-reward bot, Ali has been onboarded. Better for someone to coach him, someone needs to have a call with Ali to test on staging before merging to giv-token-contract
.
@aminlatifi should coordinate with devops to get access to server
We can test when a candidate server is introduced by DevOps team for running the staging script. cc @mhmdksh @ae2079
hey @geleeroyale could you pls help
Sure - we have a server up and running for this kind of thing.
@aminlatifi You have access to services.giveth.io which I would recommend. However - please ping me when you want to do it so we can do it together.
@geleeroyale Can you please send me the credentials to access this server?
still in backlog until QACC is done
As discussed in the last GIVeconomy call and in the discord
there was an issue with the last notify reward call where emails were not sent to Lauren & Amin (but mohammad got them!)
we are sun-setting dapp-mailer and so will need to migrate these emails to Ortto. The expectation is that an email gets sent to specific people (me, @aminlatifi & @mohammadranjbarz) each time notify reward gets called on either gnosis chain or optimism, so we can track it.
it should look like this:
@mohammadranjbarz who should take this issue?