I have domain registry kadena pact smartcontract that am trying to test using REPL file. I've uploaded the whole project on my github account with this link "https://github.com/advanztek/domain-registry". The pact folder contains the name.pact (main contract), name.repl (REPL) and the root folder which contains the used coin modules. Am trying to test the domain name register function in the name.pact (testingdomain module) by loading the name.repl file using (load "name.repl"). Somehow I keep ending up with the error below.
And this is the link to the name.pact file "https://github.com/advanztek/domain-registry/blob/main/pact/name.pact"
After cloning the repository
cd pact
Then run
pact (load "name.repl")
Then i get the error below.
pact> (load "name.repl")
"Loading name.repl..."
"Begin Tx 0: Load modules"
"Setting transaction data"
"Namespace defined: free"
"Loading root/fungible-v2.pact..."
"Loaded interface fungible-v2"
"Loading root/fungible-xchain-v1.pact..."
"Loaded interface fungible-xchain-v1"
"Loading root/coin-v5.pact..."
"Loaded module coin, hash b05fAfvjpnvnl_ssUgyTNkOIAN398ecTuTsUlW_RKyg"
"TableCreated"
"TableCreated"
"Loading name.pact..."
"Namespace set to free"
"Keyset defined"
Warning: using deprecated native overload for *: decimal/integer operator overload is deprecated
"Loaded module free.testingdomain, hash F-bf3MGSDKBq090p9Rig-f7mfAQO0Boh-YdjeFvSejk"
"Commit Tx 0: Load modules"
"Begin Tx 1: Create KDA accounts"
"Write succeeded"
"Write succeeded"
"Setting transaction data"
"Capability acquired"
"Write succeeded"
"Commit Tx 1: Create KDA accounts"
"Begin Tx 2: Try buying a domain name"
"Using free.testingdomain"
"Setting transaction signatures/caps"
root/coin-v5.pact:350:6: with-read: row not found: k:36990b871267ec4532551e505260806d7f39378cebb5ea2c998c80301c5a100f
at root/coin-v5.pact:350:6: (with-read (deftable coin-table:(defschema coin-schema "The c... "k:36990b871267ec4532551e505260806d7f39378cebb5ea2... ({g:<ah> "guard"} [(coin.credit "k:36990b871267ec4...)
at root/coin-v5.pact:348:4: (with-capability (coin.TRANSFER "alice" "k:36990b871267ec4532551e50... [(coin.debit "alice" 1.0) (native `with-read` Spe...)
at name.pact:224:6: (transfer "alice" "k:36990b871267ec4532551e505260806d7f39378cebb5ea2... 1.0)
at name.pact:222:4: (with-capability (free.testingdomain.MAPPING) [(coin.transfer "alice" "k:36990b871267ec4532551e5...)
at name.pact:221:4: (with-capability (free.testingdomain.NAME_UPSERT "elijahd.kda") [(native `with-capability` Specifies and requests...)
at name.pact:220:4: (with-capability (free.testingdomain.ACCOUNT_GUARD "alice") [(native `with-capability` Specifies and requests...)
at name.pact:219:4: (with-capability (free.testingdomain.NAME_AVAILABLE "elijahd.kda") [(native `with-capability` Specifies and requests...)
at name.repl:58:0: (register "alice" "k:2cf3e52a1e9e961257599a5155cc5ef3e836fc8f70b7edf... "elijahd.kda" 365)
pact>
I've tried to load the name.repl file multiple times but I keep getting the error displayed above instead of it registering the domain.
I will really appreciate any help offered from the community, thank you.
GITHUB REPOSITORY LINK >>> https://github.com/advanztek/domain-registry
The reason you getting this error (row does not exist
) is because the account k:36990b871267ec4532551e505260806d7f39378cebb5ea2c998c80301c5a100f does not exist but you specify you will transfer coins to it.
You can create the account by adding to the .repl:
(coin.create-account "k:36990b871267ec4532551e505260806d7f39378cebb5ea2c998c80301c5a100f" (read-keyset "domain-admin-gov-keyset"))