Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/DNAProject/DNA
/ SafeAdd
Function
SafeAdd
common/safeMath.go:34–36 ·
view source on GitHub ↗
(x, y uint64)
Source
from the content-addressed store, hash-verified
32
}
33
34
func
SafeAdd(x, y uint64) (uint64, bool) {
35
return
x + y, y > MAX_UINT64-x
36
}
37
38
func
SafeMul(x, y uint64) (uint64, bool) {
39
if
x == 0 || y == 0 {
Callers
3
GasInit
Function · 0.92
NextBytes
Method · 0.85
Skip
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected