Closed molecula451 closed 1 month ago
! action returned an unexpected value
Perhaps solhint or https://github.com/solhint-community/solhint-community fork could be integrated after all rules are agreed:
Example settings:
https://github.com/PaulRBerg/foundry-template/blob/main/.solhint.json
There are differences in so called 'best practices' rules, it would be good to fully review and decide on which subset or superset of rules to use.
https://github.com/protofire/solhint/blob/develop/docs/rules.md#best-practise-rules
vs
https://github.com/solhint-community/solhint-community/blob/master/docs/rules.md#best-practise-rules
Perhaps solhint or https://github.com/solhint-community/solhint-community fork could be integrated after all rules are agreed:
Example settings:
https://github.com/PaulRBerg/foundry-template/blob/main/.solhint.json
There are differences in so called 'best practices' rules, it would be good to fully review and decide on which subset or superset of rules to use.
https://github.com/protofire/solhint/blob/develop/docs/rules.md#best-practise-rules
vs
https://github.com/solhint-community/solhint-community/blob/master/docs/rules.md#best-practise-rules
! action returned an unexpected value
There are differences in so called 'best practices' rules, it would be good to fully review and decide on which subset or superset of rules to use.
lol thats unfortunate.
I just asked ChatGPT and it says that the following rules are
avoid-call-value
avoid-low-level-calls
avoid-sha3
avoid-suicide
avoid-throw
avoid-tx-origin
check-send-result
compiler-version
func-visibility
multiple-sends
no-complex-fallback
no-inline-assembly
not-rely-on-block-hash
reentrancy
state-visibility
max-states-count
no-console
no-empty-blocks
no-global-import
no-unused-import
no-unused-vars
payable-fallback
reason-string
quotes
const-name-snakecase
contract-name-camelcase
event-name-camelcase
func-name-mixedcase
use-forbidden-name
var-name-mixedcase
imports-on-top
visibility-modifier-order
mark-callable-contracts (recommended in "community.md" as deprecated)
not-rely-on-time (not recommended in "community.md")
I will need to research the rules at a later time but upon first pass:
Enabled | Rule | Comment |
---|---|---|
❌ | max-states-count | not sure what this is |
❌ | no-console | |
✅ | no-empty-blocks | |
✅ | no-global-import | not sure what this is but globals are bad in javascript so I assume it's bad here too |
✅ | no-unused-import | |
✅ | no-unused-vars | |
✅ | payable-fallback | i think this means something about the contract being able to handle eth? |
❌ | reason-string | |
❌ | quotes | |
❌ | const-name-snakecase | |
❌ | contract-name-camelcase | shouldn't these normally be pascal case? |
❌ | event-name-camelcase | |
❌ | func-name-mixedcase | |
❌ | use-forbidden-name | |
❌ | var-name-mixedcase | |
✅ | imports-on-top | |
❌ | visibility-modifier-order |
Enabled | Rule | Comment |
---|---|---|
❌ | mark-callable-contracts (recommended in "community.md" as deprecated) | no idea what this is |
❌ | not-rely-on-time (not recommended in "community.md") | no idea what this is |
It's nice the recopilation, but we should follow the convention by 50% or own judment, the reason?
an e.g
no-inline-assembly
We have inline assembly in diamond, and there is no issue with that, as much as it shows as recommended, it can be turned off.. This is one of many others
The idea (my idea) it's to stylize the code more and enforce the rules, but still many of these can be turned off
sha3? no body uses sha3 (in solidity) anymore, i don't see any good judment on solidity code writing sha3.. for e.g
! action returned an unexpected value
! action returned an unexpected value
! action returned an unexpected value
Currently trying to debug this but I'm only seeing it in this repo so I'm debugging in production now. Sorry for the incoming notifications.
{
log: 'action has an uncaught error',
level: 'error',
metadata: {
logReturn: TypeError: Cannot read properties of undefined (reading 'created_at')
at checkTaskToUnassign (/var/task/.netlify/functions/webhooks/webhooks.js:192291:60)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Promise.all (index 0)
at checkTasksToUnassign (/var/task/.netlify/functions/webhooks/webhooks.js:192241:27)
at logAnyReturnFromHandlers (/var/task/.netlify/functions/webhooks/webhooks.js:192652:24)
at bindEvents (/var/task/.netlify/functions/webhooks/webhooks.js:192645:5)
at async Promise.all (index 0)
at Runtime.handler (/var/task/.netlify/functions/webhooks/webhooks.js:192748:5) {
[stack]: "TypeError: Cannot read properties of undefined (reading 'created_at')\n at checkTaskToUnassign (/var/task/.netlify/functions/webhooks/webhooks.js:192291:60)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async Promise.all (index 0)\n at checkTasksToUnassign (/var/task/.netlify/functions/webhooks/webhooks.js:192241:27)\n at logAnyReturnFromHandlers (/var/task/.netlify/functions/webhooks/webhooks.js:192652:24)\n at bindEvents (/var/task/.netlify/functions/webhooks/webhooks.js:192645:5)\n at async Promise.all (index 0)\n at Runtime.handler (/var/task/.netlify/functions/webhooks/webhooks.js:192748:5)",
[message]: "Cannot read properties of undefined (reading 'created_at')"
},
handlerType: { type: 'wildcard', actions: [ [AsyncFunction: checkTasksToUnassign] { [length]: 1, [name]: 'checkTasksToUnassign', [Symbol(Symbol.toStringTag)]: 'AsyncFunction' }, [length]: 1 ] },
activeHandler: 'checkTasksToUnassign',
error: { name: 'TypeError', message: "Cannot read properties of undefined (reading 'created_at')", stack: "TypeError: Cannot read properties of undefined (reading 'created_at')\n at checkTaskToUnassign (/var/task/.netlify/functions/webhooks/webhooks.js:192291:60)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async Promise.all (index 0)\n at checkTasksToUnassign (/var/task/.netlify/functions/webhooks/webhooks.js:192241:27)\n at logAnyReturnFromHandlers (/var/task/.netlify/functions/webhooks/webhooks.js:192652:24)\n at bindEvents (/var/task/.netlify/functions/webhooks/webhooks.js:192645:5)\n at async Promise.all (index 0)\n at Runtime.handler (/var/task/.netlify/functions/webhooks/webhooks.js:192748:5)" },
caller: 'renderCatchAll',
revision: '05a143c'
}
}
# Comment event received without a recognized user command.
! action has an uncaught error
# Comment event received without a recognized user command.
test
# Comment event received without a recognized user command.
test
/help
! action has an uncaught error
Command | Description | Example |
---|---|---|
/start |
Assign yourself to the issue. | /start |
/stop |
Unassign yourself from the issue. | /stop |
/help |
List all available commands. | /help |
/autopay |
Toggle automatic payment for the completion of the current issue. | /autopay true |
/query |
Returns the user's wallet, access, and multiplier information. | /query @user |
/ask |
Ask a context aware question. | /ask is x or y the best approach? |
/multiplier |
Set the task payout multiplier for a specific contributor, and provide a reason for why. | /multiplier @user 0.5 "multiplier reason" |
/labels |
Set access control, for admins only. | /labels @user priority time price |
/authorize |
Approve a label change, for admins only. | /authorize |
/wallet |
Register your wallet address for payments. | /wallet ubq.eth |
test
! action has an uncaught error
test
! action has an uncaught error
test
test
/help
Command | Description | Example |
---|---|---|
/start |
Assign yourself to the issue. | /start |
/stop |
Unassign yourself from the issue. | /stop |
/help |
List all available commands. | /help |
/autopay |
Toggle automatic payment for the completion of the current issue. | /autopay true |
/query |
Returns the user's wallet, access, and multiplier information. | /query @user |
/ask |
Ask a context aware question. | /ask is x or y the best approach? |
/multiplier |
Set the task payout multiplier for a specific contributor, and provide a reason for why. | /multiplier @user 0.5 "multiplier reason" |
/labels |
Set access control, for admins only. | /labels @user priority time price |
/authorize |
Approve a label change, for admins only. | /authorize |
/wallet |
Register your wallet address for payments. | /wallet ubq.eth |
test
test
/help
Command | Description | Example |
---|---|---|
/start |
Assign yourself to the issue. | /start |
/stop |
Unassign yourself from the issue. | /stop |
/help |
List all available commands. | /help |
/autopay |
Toggle automatic payment for the completion of the current issue. | /autopay true |
/query |
Returns the user's wallet, access, and multiplier information. | /query @user |
/ask |
Ask a context aware question. | /ask is x or y the best approach? |
/multiplier |
Set the task payout multiplier for a specific contributor, and provide a reason for why. | /multiplier @user 0.5 "multiplier reason" |
/labels |
Set access control, for admins only. | /labels @user priority time price |
/authorize |
Approve a label change, for admins only. | /authorize |
/wallet |
Register your wallet address for payments. | /wallet ubq.eth |
test
Netlify logs just stopped outputting any of my logs suddenly...
test
# Comment event received without a recognized user command.
/help
Command | Description | Example |
---|---|---|
/start |
Assign yourself to the issue. | /start |
/stop |
Unassign yourself from the issue. | /stop |
/help |
List all available commands. | /help |
/autopay |
Toggle automatic payment for the completion of the current issue. | /autopay true |
/query |
Returns the user's wallet, access, and multiplier information. | /query @user |
/ask |
Ask a context aware question. | /ask is x or y the best approach? |
/multiplier |
Set the task payout multiplier for a specific contributor, and provide a reason for why. | /multiplier @user 0.5 "multiplier reason" |
/labels |
Set access control, for admins only. | /labels @user priority time price |
/authorize |
Approve a label change, for admins only. | /authorize |
/wallet |
Register your wallet address for payments. | /wallet ubq.eth |
@@ No latest assign event found. @@
test
# Comment event received without a recognized user command.
@@ No latest assign event found. @@
@@ No latest assign event found. @@
that might be it - > nobody was assigned yet in this case reduce returns nothing and it may fail at (just guessing by looking at code)
const latestAssignEventTime = new Date(latestAssignEvent.created_at).getTime();
# Comment event received without a recognized user command.
@@ No latest assign event found. @@
test
# Comment event received without a recognized user command.
@@ No latest assign event found. @@
test
# Comment event received without a recognized user command.
@@ No latest assign event found. @@
/help
https://github.com/ubiquity/ubiquity-dollar/pull/848#issuecomment-1852582043