scripts: Remove staking from wasmd

This commit is contained in:
willclarktech 2020-08-04 17:26:45 +02:00
parent cf6dc3ec45
commit 43b1830f09
No known key found for this signature in database
GPG Key ID: 551A86E2E398ADF7
4 changed files with 0 additions and 70 deletions

View File

@ -1,3 +1,2 @@
0f14abcc6fed08f2dd06896db974989db97dbcc6e8e30188b73fe5ab427c7785 cw-erc20.wasm
ebc2b11e2afa50d5dcd4234840cd581e948a59d888bb8d651598bba3732cd8ee cw-nameservice.wasm
9430a98aa5bb765aa56f683290340e34e230822a4e356d566b54b9b5cf01ab30 staking.wasm

BIN
scripts/wasmd/contracts/staking.wasm (Stored with Git LFS)

Binary file not shown.

View File

@ -1,65 +0,0 @@
#!/usr/bin/env node
/* eslint-disable @typescript-eslint/naming-convention */
const { SigningCosmWasmClient } = require("@cosmjs/cosmwasm");
const { coins, Secp256k1Wallet } = require("@cosmjs/launchpad");
const fs = require("fs");
const httpUrl = "http://localhost:1317";
const alice = {
mnemonic: "enlist hip relief stomach skate base shallow young switch frequent cry park",
address0: "cosmos14qemq0vw6y3gc3u3e0aty2e764u4gs5le3hada",
};
const codeMeta = {
source: "", // not intended to be published
builder: "cosmwasm/rust-optimizer:0.8.0",
};
// To get the proper validator address, run the demo chain (./scripts/wasmd/start.sh), then run:
// curl http://localhost:1317/staking/validators | jq '.result[0].operator_address'
const bounty = {
label: "Bounty",
initMsg: {
name: "Bounty",
symbol: "BOUNTY",
decimals: 3,
validator: "cosmosvaloper1e9zn2ueue2m0edjhmsgsf03yfcmeg7m7xh5xu5",
exit_tax: "0.005", // 0.5 %
min_withdrawal: "7",
},
};
const fees = {
upload: {
amount: coins(25000, "ucosm"),
gas: "1500000", // 1.5 million
},
};
async function main() {
const wallet = await Secp256k1Wallet.fromMnemonic(alice.mnemonic);
const client = new SigningCosmWasmClient(httpUrl, alice.address0, wallet, fees);
const wasm = fs.readFileSync(__dirname + "/contracts/staking.wasm");
const uploadReceipt = await client.upload(wasm, codeMeta, "Upload Staking code");
console.info(`Upload succeeded. Receipt: ${JSON.stringify(uploadReceipt)}`);
for (const { label, initMsg } of [bounty]) {
const { contractAddress } = await client.instantiate(uploadReceipt.codeId, initMsg, label, {
memo: `Create an staking instance "${label}"`,
});
console.info(`Contract "${label}" instantiated at ${contractAddress}`);
}
}
main().then(
() => {
console.info("Done deploying staking instances.");
process.exit(0);
},
(error) => {
console.error(error);
process.exit(1);
},
);

View File

@ -26,4 +26,3 @@ SCRIPT_DIR="$(realpath "$(dirname "$0")")"
)
"$SCRIPT_DIR/deploy_erc20.js"
"$SCRIPT_DIR/deploy_nameservice.js"
"$SCRIPT_DIR/deploy_staking.js"