Skip to content

Commit

Permalink
chore: update test4.gno.land backup
Browse files Browse the repository at this point in the history
  • Loading branch information
gfanton authored and github-actions[bot] committed Oct 2, 2024
1 parent a24123b commit bc921a5
Show file tree
Hide file tree
Showing 34 changed files with 4,360 additions and 7 deletions.
12 changes: 6 additions & 6 deletions test4.gno.land/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## TXs
```
19834
19849
```

## addpkgs
Expand All @@ -11,12 +11,12 @@

## top realm calls
```
4300 "gno.land/r/demo/wugnot"
4304 "gno.land/r/demo/wugnot"
1142 "gno.land/r/gnoswap/gns"
874 "gno.land/r/gnoswap/v2/gns"
876 "gno.land/r/gnoswap/v2/gns"
764 "gno.land/r/gnoswap/router"
755 "gno.land/r/gnoswap/position"
700 "gno.land/r/gnoswap/v2/router"
702 "gno.land/r/gnoswap/v2/router"
654 "gno.land/r/gnoswap/gnft"
613 "gno.land/r/onbloc/usdc"
586 "gno.land/r/onbloc/foo"
Expand All @@ -31,8 +31,8 @@
113 "gno.land/r/g17ernafy6ctpcz6uepfsq2js8x2vz0wladh5yc3/zentasktic_core"
112 "gno.land/r/gnoswap/pool"
92 "gno.land/r/gov/dao"
86 "gno.land/r/demo/users"
85 "gno.land/r/teritori/social_feeds"
87 "gno.land/r/demo/users"
86 "gno.land/r/teritori/social_feeds"
70 "gno.land/r/g1ngywvql2ql7t8uzl63w60eqcejkwg4rm4lxdw9/candy20"
42 "gno.land/r/gnoswap/v2/pool"
30 "gno.land/r/onbloc/qux"
Expand Down
15 changes: 15 additions & 0 deletions test4.gno.land/backup_2106339-2138070.jsonl

Large diffs are not rendered by default.

62 changes: 62 additions & 0 deletions test4.gno.land/extracted/p/ecodevx/alerts/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
Copyright (c) 2024. All rights reserved.

Project Owner:
NewTendermint, LLC

Project Maintainer:
İlker Göktuğ ÖZTÜRK. <[email protected]>, <[email protected]>

Your access to this Project and your contributions to this Project are subject
to the following terms:

* You hereby grant to the listed Owner and Maintainer of this Project the
worldwide, irrevocable and royalty-free right to use, publish, relicense and
sublicense your contributions under any non-exclusive license of their
choosing for commercial and non-commercial purposes.
* You shall not attempt to bring any intellectual property infringement or
misappropriation claims against the Owner or Maintainer of this Project
relating to or arising from your contributions.
* You represent that you are the sole owner of all rights in your
contributions and that no third party has any rights or interests therein.

FOR THE SCOPE OF THIS LICENSE, A CONTRIBUTION IS DEFINED TO INCLUDE ANY WORKS,
IDEAS, CODE, PROCESSES, OR APIS MADE AVAILABLE TO VIEW BY THE GENERAL PUBLIC
(INCLUDING ANY PUBLICLY ACCESSIBLE INTERNET FORUMS AND CHAT SERVERS WHERE
ACCESS IS AVAILABLE FOR FREE WITH REGISTRATION) OR PRIVATELY TO THIS PROJECT'S
OWNER AND MAINTAINERS; INCLUDING WORKS, IDEAS, CODE, PROCESSES, AND APIS THAT
ARE ABOUT THIS PROJECT AND ITS CONTRIBUTIONS, OR MENTIONED IN REFERENCE TO
THIS PROJECT, WHERE SUCH WORKS, IDEAS, CODE, PROCESSES, AND APIS ARE MATERIAL
TO THE SUCCESS, IMPROVEMENT, OR COMPLETION OF THIS PROJECT, AS DETERMINED BY
THE OWNER OF THIS PROJECT.

Contributions may come in any form, and include (but are not limited to):

* pull requests
* diff patches
* commentary
* example code

If you do not want your contribution to become incorporated into this Project,
do not make contributions to this Project. The creation of contributions that
may in the future become known to this Project's Owner and Maintainer
constitutes a willing contribution to this Project in accordance with this
license.

THIS PROJECT AND THE WORKS AVAILABLE THROUGH THIS PROJECT ARE PROVIDED “AS IS”
AND WITHOUT WARRANTY OF ANY KIND. IN NO EVENT SHALL THE OWNER OR MAINTAINER OF
THIS PROJECT BE LIABLE TO YOU OR ANY THIRD PARTY FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THIS PROJECT OR THE WORKS AVAILABLE THROUGH
THIS PROJECT. YOU AGREED TO INDEMNIFY, DEFEND AND HOLD THE OWNER AND
MAINTAINER FROM AND AGAINST ANY CLAIMS, LOSSES OR DAMAGES ARISING FROM YOUR
USE OF THIS PROJECT OR THE WORKS AVAILABLE THROUGH THIS PROJECT.

This license is subject to change at any time by the Project Owner or
Maintainer.

Your continued access to or use of this Project or any works
available through this Project shall be subject to the then-current version
of this license.

The Project Owner and Maintainer reserve the right to change this license
without needing the consent of the contributors to this Project.
64 changes: 64 additions & 0 deletions test4.gno.land/extracted/p/ecodevx/alerts/alerts.gno
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
package alerts

import (
"gno.land/p/demo/ufmt"
)

const (
TypeError Type = "alerts-error"
TypeWarning Type = "alerts-warning"
)

const (
StyleError = `
.alerts-error {
padding: .75rem 1.25rem;
border: 1px solid #f5c6cb;
background-color: #f8d7da;
color: #721c24;
border-radius: .25rem;
}
`
StyleWarning = `
.alerts-warning {
padding: .75rem 1.25rem;
border: 1px solid #ffeeba;
background-color: #fff3cd;
color: #856404;
border-radius: .25rem;
}
`
)

// Type defines the type of alerts.
type Type string

// NewAlert returns HTML for an alert.
func NewAlert(t Type, content string) string {
var css string
switch t {
case TypeWarning:
css = StyleWarning
case TypeError:
css = StyleError
default:
panic("unknown alert type")
}

return "\n\n" + ufmt.Sprintf(`<p class="%s">%s</p><style>%s</style>`, string(t), content, css) + "\n\n"
}

// NewWarning returns HTML for a warning alert.
func NewWarning(content string) string {
return NewAlert(TypeWarning, content)
}

// NewError returns HTML for an error alert.
func NewError(content string) string {
return NewAlert(TypeError, content)
}

// NewLink returns an HTML link.
func NewLink(href, label string) string {
return ufmt.Sprintf(`<a href="%s">%s</a>`, href, label)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"creator":"g147ah9520z0r6jh9mjr6c75rv6l8aypzvcd3f7d","deposit":"1ugnot"}
62 changes: 62 additions & 0 deletions test4.gno.land/extracted/p/ecodevx/blog/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
Copyright (c) 2024. All rights reserved.

Project Owner:
NewTendermint, LLC

Project Maintainer:
İlker Göktuğ ÖZTÜRK. <[email protected]>, <[email protected]>

Your access to this Project and your contributions to this Project are subject
to the following terms:

* You hereby grant to the listed Owner and Maintainer of this Project the
worldwide, irrevocable and royalty-free right to use, publish, relicense and
sublicense your contributions under any non-exclusive license of their
choosing for commercial and non-commercial purposes.
* You shall not attempt to bring any intellectual property infringement or
misappropriation claims against the Owner or Maintainer of this Project
relating to or arising from your contributions.
* You represent that you are the sole owner of all rights in your
contributions and that no third party has any rights or interests therein.

FOR THE SCOPE OF THIS LICENSE, A CONTRIBUTION IS DEFINED TO INCLUDE ANY WORKS,
IDEAS, CODE, PROCESSES, OR APIS MADE AVAILABLE TO VIEW BY THE GENERAL PUBLIC
(INCLUDING ANY PUBLICLY ACCESSIBLE INTERNET FORUMS AND CHAT SERVERS WHERE
ACCESS IS AVAILABLE FOR FREE WITH REGISTRATION) OR PRIVATELY TO THIS PROJECT'S
OWNER AND MAINTAINERS; INCLUDING WORKS, IDEAS, CODE, PROCESSES, AND APIS THAT
ARE ABOUT THIS PROJECT AND ITS CONTRIBUTIONS, OR MENTIONED IN REFERENCE TO
THIS PROJECT, WHERE SUCH WORKS, IDEAS, CODE, PROCESSES, AND APIS ARE MATERIAL
TO THE SUCCESS, IMPROVEMENT, OR COMPLETION OF THIS PROJECT, AS DETERMINED BY
THE OWNER OF THIS PROJECT.

Contributions may come in any form, and include (but are not limited to):

* pull requests
* diff patches
* commentary
* example code

If you do not want your contribution to become incorporated into this Project,
do not make contributions to this Project. The creation of contributions that
may in the future become known to this Project's Owner and Maintainer
constitutes a willing contribution to this Project in accordance with this
license.

THIS PROJECT AND THE WORKS AVAILABLE THROUGH THIS PROJECT ARE PROVIDED “AS IS”
AND WITHOUT WARRANTY OF ANY KIND. IN NO EVENT SHALL THE OWNER OR MAINTAINER OF
THIS PROJECT BE LIABLE TO YOU OR ANY THIRD PARTY FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THIS PROJECT OR THE WORKS AVAILABLE THROUGH
THIS PROJECT. YOU AGREED TO INDEMNIFY, DEFEND AND HOLD THE OWNER AND
MAINTAINER FROM AND AGAINST ANY CLAIMS, LOSSES OR DAMAGES ARISING FROM YOUR
USE OF THIS PROJECT OR THE WORKS AVAILABLE THROUGH THIS PROJECT.

This license is subject to change at any time by the Project Owner or
Maintainer.

Your continued access to or use of this Project or any works
available through this Project shall be subject to the then-current version
of this license.

The Project Owner and Maintainer reserve the right to change this license
without needing the consent of the contributors to this Project.
88 changes: 88 additions & 0 deletions test4.gno.land/extracted/p/ecodevx/blog/asserts.gno
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
package blog

import (
"crypto/sha256"
"encoding/hex"
"net/url"
"regexp"
"strings"
)

var (
hostnameRe = regexp.MustCompile(`^(?i)[a-z0-9-]+(\.[a-z0-9-]+)+\.?$`)
sha256Re = regexp.MustCompile(`^[a-f0-9]{64}$`)
slugRe = regexp.MustCompile(`^[a-z0-9\p{L}]+(?:-[a-z0-9\p{L}]+)*$`)
)

// AssertIsSlug asserts that a URL slug is valid.
func AssertIsSlug(slug string) {
if !IsSlug(slug) {
panic("URL slug is not valid")
}
}

// AssertContentSha256Hash asserts that a hex hash is a valid SHA256 hash.
func AssertIsSha256Hash(hexHash string) {
if !IsSha256Hash(hexHash) {
panic("invalid sha256 hash")
}
}

// AssertIsContentURL asserts that a URL is a valid link to a content.
// URL must have a path to ve valid. Website URLs will fail.
func AssertIsContentURL(url string) {
if !IsURL(url, true) {
panic("content URL is not valid, make sure path to content is specified")
}
}

// AssertTitleIsNotEmpty asserts that a title is not an empty string.
func AssertTitleIsNotEmpty(title string) {
if strings.TrimSpace(title) == "" {
panic("title is empty")
}
}

// AssertContentSha256Hash asserts that the SHA256 hash of a content matches a hash.
func AssertContentSha256Hash(content, hash string) {
if hash != GetHexSha256Hash(content) {
panic("content sha256 checksum is not valid")
}
}

// IsSlug checks if a string is a valid URL slug.
func IsSlug(slug string) bool {
return slugRe.MatchString(slug)
}

// IsSha256Hash checks is a hex hash is a valid SHA256 hash.
func IsSha256Hash(hexHash string) bool {
return sha256Re.MatchString(strings.ToLower(hexHash))
}

// IsURL checks if a URL is valid.
// URL path availability can optionally be enforced.
func IsURL(rawURL string, requirePath bool) bool {
u, err := url.ParseRequestURI(rawURL)
if err != nil {
return false
}

if requirePath && u.Path == "" || u.Path == "/" {
return false
}

if u.Scheme != "https" && u.Scheme != "http" {
return false
}

hostname := u.Hostname()
return hostname != "" && hostnameRe.MatchString(hostname)
}

// GetHexSha256Hash returns the hexadecimal encoding of the string's SHA256 hash.
// An empty string is returned when the argument is an empty string.
func GetHexSha256Hash(s string) string {
sum := sha256.Sum256([]byte(s))
return hex.EncodeToString(sum[:])
}
Loading

0 comments on commit bc921a5

Please sign in to comment.