Search code examples
blockchainpactkadena

Unable to deploy Kadena Smart Contract to testnet with yaml script


I have been using this gist to deploy to the Kadena testnet. The following requirements have not been supremely clear to me:
That "testing" is the account paying for gas (aka the "sender") on the Testnet network. To create a Testnet account and fund it some coins, navigate to the Testnet Coin Faucet. You will need to have generated an ED22519 public-private key pair to use the faucet. You can use pact -g to generate this key pair. Make sure to save it somewhere save.
That the key pair specified in "keyPairs" corresponds to the key pair used to create the gas payer account, which in this example is "testing". This must change from the defaults provided.

I have no idea what an example for "sender" should look like. Is it something like the private key for the deployer, or is it the "name" of the account as seen on chainweaver, which can be pretty much anything.


Solution

  • The sender should be the accountname, alike you see displayed in Chainweaver, of an account with funds for which you can sign (you have the keys) or one which does not require signature (gas stations). Most people use an accountname of the form k: + a public key: the public key of the corresponding keypair.

    You can create a keypair and fund an accountname (type k: and paste your public key) for it with the faucet. You can then go on and use the keypair in the yaml file to deploy the contract. You cannot use your chainweaver based account because the key is not available in plain for use in yaml files.

    You can add the account created using the faucet to Chainweaver using "watch account". It will show "owner: no".

    If not working, please display the details of your example on testnet.