0
% swanky --version
@astar-network/swanky-cli/1.0.0-beta.4 darwin-x64 node-v16.4.0
  • I used "swanky cli" to deploy the contract to swanky-node.
% swanky contract deploy flipper --gas 10000000000 --args false --account alice
✔ Initialising OK
✔ Getting WASM OK
✔ Connecting to node OK
✔ Deploying OK
✔ Writing config OK
Contract deployed!
Contract address: 5EbFSCUyZvigPoYnRbQfqKPCANBEt35HauFD7Q1CLRY7BjK8
  • I want to call this contract using the "swanky conatract call" command.
  • When I call the "swanky contract call" command without the -t option, I get the following error.
% swanky contract call --contractName=flipper -m get -g 10000000000     
ERROR: Module error: Contracts: ContractNotFound

No contract was found at the specified address.
    Error: Command failed: cargo contract call --contract 5E5Wf6XHHcqZr3wbeqJsVeh4E3aFYA7rgrJ34Yjyu8EZBTZ7 --message get  
    --suri //Alice --gas 10000000000 --url ws://127.0.0.1:9944 
  • I think I need to use the -t option to specify the contract I just deployed, but I don't know how to specify it.
  • Looking at the standard out of swanky node, I can't find anything that looks like a timestamp.
  • Can you tell me the correct way to specify this parameter?

1 Answer 1

1
  • I found a destination for timestamps on deploy.
  • It's "swanky.config.json"!
  • Each time I deploy it adds a contract address and a timestamp.
1
  • You're right - there's a field in swanky.config.json -> contracts -> [contract_name] -> deployments[] that keeps track of where and when you deployed. Note on the call command though - it's only a proxy to cargo contract call for now (will be switched to polkadot-api), so you can actually just use that directly if you need more flexibility.
    – codespool
    Commented Nov 25, 2022 at 8:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.