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
await eos.pushTransaction(myTx.transaction); |
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
await eos.pushTransaction(myTx.transaction); |
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
const txHeader = await getHeader(); | |
const coldEos = Eos({ | |
httpEndpoint: null, | |
chainId: "your_chain_id", | |
keyProvider: "your_private_key", | |
transactionHeaders: txHeader | |
}); | |
coldEos.fc.abiCache.abi("your_account_name", abi); |
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
async function getHeader() { | |
const expireInSeconds = 60 * 60 // 1 hour | |
const info = await eos.getInfo({}) | |
const chainDate = new Date(info.head_block_time + 'Z') | |
let expiration = new Date(chainDate.getTime() + expireInSeconds * 1000) | |
expiration = expiration.toISOString().split('.')[0] | |
const block = await eos.getBlock(info.last_irreversible_block_num) |
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
eos.fc.abiCache.abi("your_account_name", abi); |
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
eos.setcode("your_account_name", 0, 0, wasm); |
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
const fs = require("fs"); | |
const wasm = fs.readFileSync("/path/to/wasm/file"); | |
const abi = JSON.parse(fs.readFileSync("/path/to/abi/file")); |
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
contractSubcommand->set_callback([&] { | |
shouldSend = false; | |
set_code_callback(); | |
set_abi_callback(); | |
std::cerr << localized("Publishing contract...") << std::endl; | |
send_actions(std::move(actions), 10000, packed_transaction::zlib); | |
}); |
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
{ | |
"structs": [ | |
{ | |
"name": "transfer", | |
"base": "", | |
"fields": [ | |
{ | |
"name": "from", | |
"type": "account_name" | |
}, |