Created
January 12, 2020 05:07
-
-
Save mightybyte/bffac53ab2c2638026774cb4460a6163 to your computer and use it in GitHub Desktop.
Example template for safe transactions on Kadena
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
code: |- | |
(coin.transfer-create "alice" "bob" (read-keyset "ks") 100.1) | |
(coin.transfer "bob" "alice" 0.1) | |
data: | |
ks: | |
keys: [0ba113d8a84c307ebc2ace5090f117d921c43d9d3011e9cb9e030cb8ea5502eb] | |
pred: "keys-all" | |
publicMeta: | |
chainId: "0" | |
sender: alice | |
gasLimit: 1200 | |
gasPrice: 0.0000000001 | |
ttl: 7200 | |
networkId: "mainnet01" | |
signers: | |
- public: 7daf9c06b7b6aff27fb2adf6f9cd3fd592b57a6aaa0f933cdcf08a88a52c2f24 | |
caps: | |
- name: "coin.TRANSFER" | |
args: ["alice", "bob", 100.1] | |
- name: "coin.GAS" | |
args: [] | |
- public: 0ba113d8a84c307ebc2ace5090f117d921c43d9d3011e9cb9e030cb8ea5502eb | |
caps: | |
- name: "coin.TRANSFER" | |
args: ["bob", "alice", 0.1] | |
type: exec |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo Sending file $2 to chain $1 | |
curl -s -X POST https://us-e1.chainweb.com/chainweb/0.0/mainnet01/chain/$1/pact/api/v1/send -H 'Content-Type: application/json' -d @$2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment