Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gnoland doesn't start #184

Closed
r3v4s opened this issue May 10, 2022 · 4 comments
Closed

gnoland doesn't start #184

r3v4s opened this issue May 10, 2022 · 4 comments
Labels
🐞 bug Something isn't working

Comments

@r3v4s
Copy link
Contributor

r3v4s commented May 10, 2022

to start local test-net, cd ~/gno; ./build/gnoland used to work with previous commit.

but with current master branch, gnoland won't start due to error shown below.

ERROR LOG: recovered: gno.land/r/foo20/foo.gno:1: unknown import path gno.land/r/users
# 6 {"msg":[{"@type":"/vm.m_addpkg","creator":"g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5","package":{"Name":"foo20","Path":"gno.land/r/foo20","Files":[{"Name":"foo.gno","Body":"package foo20\n\nimport (\n\t\"std\"\n\t\"strings\"\n\n\tgrc20 \"gno.land/p/grc/grc20/impl\"\n\t\"gno.land/p/ufmt\"\n\t\"gno.land/r/users\"\n)\n\nvar foo *grc20.Token\nvar admin std.Address = \"g1us8428u2a5satrlxzagqqa5m6vmuze025anjlj\" // TODO: helper to change admin\n\nfunc init() {\n\tfoo = grc20.NewToken(\"Foo\", \"FOO\", 4)\n\tfoo.Mint(admin, 1000000*10000)                                    // @administrator (1M)\n\tfoo.Mint(\"g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq\", 10000*10000) // @manfred (10k)\n}\n\n// method proxies as public functions.\n//\n\n// getters.\n\nfunc TotalSupply() uint64 {\n\treturn foo.TotalSupply()\n}\n\nfunc BalanceOf(owner users.AddressOrName) uint64 {\n\treturn foo.BalanceOf(owner.Resolve())\n}\n\nfunc Allowance(owner, spender users.AddressOrName) uint64 {\n\treturn foo.Allowance(owner.Resolve(), spender.Resolve())\n}\n\n// setters.\n\nfunc Transfer(to users.AddressOrName, amount uint64) {\n\tcaller := std.GetCallerAt(2)\n\tfoo.Transfer(caller, to.Resolve(), amount)\n}\n\nfunc Approve(spender users.AddressOrName, amount uint64) {\n\tcaller := std.GetCallerAt(2)\n\tfoo.Approve(caller, spender.Resolve(), amount)\n}\n\nfunc TransferFrom(from, to users.AddressOrName, amount uint64) {\n\tcaller := std.GetCallerAt(2)\n\tfoo.TransferFrom(caller, from.Resolve(), to.Resolve(), amount)\n}\n\n// administration.\n\nfunc Mint(address users.AddressOrName, amount uint64) {\n\tcaller := std.GetCallerAt(2)\n\tassertIsAdmin(caller)\n\tfoo.Mint(address.Resolve(), amount)\n}\n\nfunc Burn(address users.AddressOrName, amount uint64) {\n\tcaller := std.GetCallerAt(2)\n\tassertIsAdmin(caller)\n\tfoo.Burn(address.Resolve(), amount)\n}\n\n// render.\n//\n\nfunc Render(path string) string {\n\tparts := strings.Split(path, \"/\")\n\tc := len(parts)\n\n\tswitch {\n\tcase path == \"\":\n\t\treturn foo.RenderHome()\n\tcase c == 2 \u0026\u0026 parts[0] == \"balance\":\n\t\towner := users.AddressOrName(parts[1])\n\t\tbalance := foo.BalanceOf(owner.Resolve())\n\t\treturn ufmt.Sprintf(\"%d\\n\", balance)\n\tdefault:\n\t\treturn \"404\\n\"\n\t}\n}\n\nfunc assertIsAdmin(address std.Address) {\n\tif address != admin {\n\t\tpanic(\"restricted access\")\n\t}\n}\n"}]},"deposit":""}],"fee":{"gas_wanted":"50000","gas_fee":"1gnot"},"signatures":[{"pub_key":null,"signature":null}],"memo":""}
panic: internal error
@r3v4s r3v4s changed the title gnoland doesn't start with latest commit gnoland doesn't start May 10, 2022
@r3v4s
Copy link
Contributor Author

r3v4s commented May 10, 2022

until commit 0df05b7 works fine,
but from 081442c, gnoland won't boot up

@r3v4s
Copy link
Contributor Author

r3v4s commented May 10, 2022

doesn't work
fresh clone > checkout 081442c > make all > ./build/gnoland

seems to work
fresh clone > checkout working commit, 0df05b7 > make all > ./build/gnoland > checkout 081442c > make all > ./build/gnoland

@jackthgu
Copy link
Contributor

I pr the solution to this. The procedure to regenerate testdir/config/genesis.json is required after modifying the contents of pr. #185

@r3v4s
Copy link
Contributor Author

r3v4s commented May 10, 2022

fixed. closing issue.

@r3v4s r3v4s closed this as completed May 10, 2022
@moul moul added the bug label May 10, 2022
@moul moul added this to the 🏗2️⃣ test2.gno.land milestone Oct 20, 2022
@ajnavarro ajnavarro added 🐞 bug Something isn't working and removed bug labels May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

4 participants