question
stringlengths
34
149
answer
stringlengths
173
1.02k
Redelegate 613 ATOM ATOM from cosmosvaloper1zj4zo6mwkgslhezwhry0501mu6mqw4sjs0lfmv to cosmosvaloper1f4028f28v2psrlgxp6zu9fm35tb27kqkl3h1x6 on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const srcValidatorAddress = 'cosmosvaloper1zj4zo6mwkgslhezwhry0501mu6mqw4sjs0lfmv'; const dstValidatorAddress = 'cosmosvaloper1f4028f28v2psrlgxp6zu9fm35tb27kqkl3h1x6'; const amount = '613'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const redelegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.redelegateTokens(firstAccount.address, srcValidatorAddress, dstValidatorAddress, redelegateAmount, fee, 'Redelegating tokens'); return result.transactionHash; }
Undelegate 409 ATOM ATOM from cosmosvaloper11xk3jkyszp83l5c16wi08sfjx25g8z07y1ozcp on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper11xk3jkyszp83l5c16wi08sfjx25g8z07y1ozcp'; const amount = '409'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const undelegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.undelegateTokens(firstAccount.address, validatorAddress, undelegateAmount, fee, 'Undelegating tokens'); return result.transactionHash; }
Withdraw rewards from cosmosvaloper1qmg7d9cga8uj02c93mabzap8sbd0a06yv4xdtr on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper1qmg7d9cga8uj02c93mabzap8sbd0a06yv4xdtr'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const result = await client.withdrawRewards(firstAccount.address, validatorAddress, fee, 'Withdrawing rewards'); return result.transactionHash; }
Submit a proposal with title 'Proposal Title 43' and description 'Proposal Description 73' on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const title = 'Proposal Title 43'; const description = 'Proposal Description 73'; const deposit = '74'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const proposalMsg = { typeUrl: '/cosmos.gov.v1beta1.MsgSubmitProposal', value: { content: { typeUrl: '/cosmos.gov.v1beta1.TextProposal', value: { title: title, description: description }, }, initialDeposit: [{ denom: chainConfig.denom, amount: (parseFloat(deposit) * 1000000).toString() }], proposer: firstAccount.address, }, }; const result = await client.signAndBroadcast(firstAccount.address, [proposalMsg], fee, 'Submitting proposal'); return result.transactionHash; }
Delegate 604 ATOM ATOM to cosmosvaloper1opimlemkahjxd5b22fm84exdmagoqho7ddlkp9 on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper1opimlemkahjxd5b22fm84exdmagoqho7ddlkp9'; const amount = '604'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const delegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.delegateTokens(firstAccount.address, validatorAddress, delegateAmount, fee, 'Delegating tokens'); return result.transactionHash; }
Help me organize my day with a schedule.
Research topics for blockchain technology include consensus algorithms, smart contracts, decentralized finance (DeFi), scalability solutions, blockchain interoperability, and the impact of blockchain on various industries.
Submit a proposal with title 'Proposal Title 19' and description 'Proposal Description 1' on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const title = 'Proposal Title 19'; const description = 'Proposal Description 1'; const deposit = '272'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const proposalMsg = { typeUrl: '/cosmos.gov.v1beta1.MsgSubmitProposal', value: { content: { typeUrl: '/cosmos.gov.v1beta1.TextProposal', value: { title: title, description: description }, }, initialDeposit: [{ denom: chainConfig.denom, amount: (parseFloat(deposit) * 1000000).toString() }], proposer: firstAccount.address, }, }; const result = await client.signAndBroadcast(firstAccount.address, [proposalMsg], fee, 'Submitting proposal'); return result.transactionHash; }
How do I plan my week effectively?
To create a weekly timetable, list all your tasks for the week. Group similar tasks together and assign specific time slots for each group. Ensure to include time for breaks and leisure activities to avoid burnout.
Delegate 339 ATOM ATOM to cosmosvaloper1g9zi782ebrqf6lc9ku8h29ije1zcid0vt93o29 on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper1g9zi782ebrqf6lc9ku8h29ije1zcid0vt93o29'; const amount = '339'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const delegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.delegateTokens(firstAccount.address, validatorAddress, delegateAmount, fee, 'Delegating tokens'); return result.transactionHash; }
How can I improve my coding skills?
To plan your week effectively, start by listing your tasks for the week. Prioritize them based on importance and deadlines. Allocate specific time slots for each task, and make sure to include breaks to avoid burnout. Review your plan daily and adjust as necessary.
How can I stay motivated while working from home?
Staying motivated while working from home can be achieved by setting up a comfortable workspace, establishing a routine, setting clear goals, rewarding yourself for achievements, and staying connected with colleagues and friends.
Withdraw rewards from cosmosvaloper1h3gufghfsqwzgw21c6qxjihb8mqduhbn4jg7mw on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper1h3gufghfsqwzgw21c6qxjihb8mqduhbn4jg7mw'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const result = await client.withdrawRewards(firstAccount.address, validatorAddress, fee, 'Withdrawing rewards'); return result.transactionHash; }
Vote on proposal 41 with option 2 on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const proposalId = '41'; const option = '2'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const voteMsg = { typeUrl: '/cosmos.gov.v1beta1.MsgVote', value: { proposalId: proposalId, voter: firstAccount.address, option: option }, }; const result = await client.signAndBroadcast(firstAccount.address, [voteMsg], fee, 'Voting on proposal'); return result.transactionHash; }
Delegate 693 ATOM ATOM to cosmosvaloper17lue4levx1he5tsnligpnb8mc7cs8trpozprxu on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper17lue4levx1he5tsnligpnb8mc7cs8trpozprxu'; const amount = '693'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const delegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.delegateTokens(firstAccount.address, validatorAddress, delegateAmount, fee, 'Delegating tokens'); return result.transactionHash; }
Withdraw rewards from cosmosvaloper18kjpnl3hhgyrimcdr4xsf4c6k3cxgwtjv1032p on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper18kjpnl3hhgyrimcdr4xsf4c6k3cxgwtjv1032p'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const result = await client.withdrawRewards(firstAccount.address, validatorAddress, fee, 'Withdrawing rewards'); return result.transactionHash; }
Send 561 ATOM ATOM to cosmos1y7pj6o3sbs4rdtei369yogt1mkdnom9pwo3v7u on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const recipient = 'cosmos1y7pj6o3sbs4rdtei369yogt1mkdnom9pwo3v7u'; const amount = '561'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const sendAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.sendTokens(firstAccount.address, recipient, [sendAmount], fee, 'Sending tokens'); return result.transactionHash; }
Withdraw rewards from cosmosvaloper1ehic6skjb65e8pszzbjunh0uulu0s3ec46fefg on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper1ehic6skjb65e8pszzbjunh0uulu0s3ec46fefg'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const result = await client.withdrawRewards(firstAccount.address, validatorAddress, fee, 'Withdrawing rewards'); return result.transactionHash; }
Redelegate 466 ATOM ATOM from cosmosvaloper1eityzyjulp36eyqytprxanqjriyy02htbhh9x8 to cosmosvaloper1yvgrd57fj6oe3dkhteyfos3hhg1gsf8steahav on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const srcValidatorAddress = 'cosmosvaloper1eityzyjulp36eyqytprxanqjriyy02htbhh9x8'; const dstValidatorAddress = 'cosmosvaloper1yvgrd57fj6oe3dkhteyfos3hhg1gsf8steahav'; const amount = '466'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const redelegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.redelegateTokens(firstAccount.address, srcValidatorAddress, dstValidatorAddress, redelegateAmount, fee, 'Redelegating tokens'); return result.transactionHash; }
Undelegate 288 ATOM ATOM from cosmosvaloper1utnj8yhvin2b3btzbk66hmwv16t9dl7i5mxt5n on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper1utnj8yhvin2b3btzbk66hmwv16t9dl7i5mxt5n'; const amount = '288'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const undelegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.undelegateTokens(firstAccount.address, validatorAddress, undelegateAmount, fee, 'Undelegating tokens'); return result.transactionHash; }
Redelegate 655 ATOM ATOM from cosmosvaloper1ollfzdc801ot9rlq9safi5iejtmgb4v93z3iay to cosmosvaloper1suesusczt7rdpjncl8y18nt5c0x34kt9gdhj3e on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const srcValidatorAddress = 'cosmosvaloper1ollfzdc801ot9rlq9safi5iejtmgb4v93z3iay'; const dstValidatorAddress = 'cosmosvaloper1suesusczt7rdpjncl8y18nt5c0x34kt9gdhj3e'; const amount = '655'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const redelegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.redelegateTokens(firstAccount.address, srcValidatorAddress, dstValidatorAddress, redelegateAmount, fee, 'Redelegating tokens'); return result.transactionHash; }
Withdraw rewards from cosmosvaloper19u59dy1lm5kywck6fkh762htv19wr0jst6yxbp on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper19u59dy1lm5kywck6fkh762htv19wr0jst6yxbp'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const result = await client.withdrawRewards(firstAccount.address, validatorAddress, fee, 'Withdrawing rewards'); return result.transactionHash; }
Send 447 ATOM ATOM to cosmos1qrmujqkmvni17zl8bc29hxxdl8dwsru6bvy91j on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const recipient = 'cosmos1qrmujqkmvni17zl8bc29hxxdl8dwsru6bvy91j'; const amount = '447'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const sendAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.sendTokens(firstAccount.address, recipient, [sendAmount], fee, 'Sending tokens'); return result.transactionHash; }
How do I plan my week effectively?
To create a weekly timetable, list all your tasks for the week. Group similar tasks together and assign specific time slots for each group. Ensure to include time for breaks and leisure activities to avoid burnout.
Vote on proposal 14 with option 3 on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const proposalId = '14'; const option = '3'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const voteMsg = { typeUrl: '/cosmos.gov.v1beta1.MsgVote', value: { proposalId: proposalId, voter: firstAccount.address, option: option }, }; const result = await client.signAndBroadcast(firstAccount.address, [voteMsg], fee, 'Voting on proposal'); return result.transactionHash; }
Submit a proposal with title 'Proposal Title 91' and description 'Proposal Description 80' on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const title = 'Proposal Title 91'; const description = 'Proposal Description 80'; const deposit = '791'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const proposalMsg = { typeUrl: '/cosmos.gov.v1beta1.MsgSubmitProposal', value: { content: { typeUrl: '/cosmos.gov.v1beta1.TextProposal', value: { title: title, description: description }, }, initialDeposit: [{ denom: chainConfig.denom, amount: (parseFloat(deposit) * 1000000).toString() }], proposer: firstAccount.address, }, }; const result = await client.signAndBroadcast(firstAccount.address, [proposalMsg], fee, 'Submitting proposal'); return result.transactionHash; }
Delegate 632 ATOM ATOM to cosmosvaloper1qz0yrlfln7vdd2tii0vltjse70lw0vora1lptj on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper1qz0yrlfln7vdd2tii0vltjse70lw0vora1lptj'; const amount = '632'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const delegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.delegateTokens(firstAccount.address, validatorAddress, delegateAmount, fee, 'Delegating tokens'); return result.transactionHash; }
Submit a proposal with title 'Proposal Title 2' and description 'Proposal Description 73' on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const title = 'Proposal Title 2'; const description = 'Proposal Description 73'; const deposit = '427'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const proposalMsg = { typeUrl: '/cosmos.gov.v1beta1.MsgSubmitProposal', value: { content: { typeUrl: '/cosmos.gov.v1beta1.TextProposal', value: { title: title, description: description }, }, initialDeposit: [{ denom: chainConfig.denom, amount: (parseFloat(deposit) * 1000000).toString() }], proposer: firstAccount.address, }, }; const result = await client.signAndBroadcast(firstAccount.address, [proposalMsg], fee, 'Submitting proposal'); return result.transactionHash; }
Redelegate 269 ATOM ATOM from cosmosvaloper1v8exi009qux3c4shaiqnn83ywaqohdlcmtx8km to cosmosvaloper1s0ews6d8lrnd1sf2u66bv4b4sn2868skfxmrd8 on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const srcValidatorAddress = 'cosmosvaloper1v8exi009qux3c4shaiqnn83ywaqohdlcmtx8km'; const dstValidatorAddress = 'cosmosvaloper1s0ews6d8lrnd1sf2u66bv4b4sn2868skfxmrd8'; const amount = '269'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const redelegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.redelegateTokens(firstAccount.address, srcValidatorAddress, dstValidatorAddress, redelegateAmount, fee, 'Redelegating tokens'); return result.transactionHash; }
Redelegate 132 ATOM ATOM from cosmosvaloper1yf07bzltzw74932x1o6vjhh7ew1752btac35uo to cosmosvaloper1kye73v8k96c894qkk09ycm57kv7cmkmw49iloz on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const srcValidatorAddress = 'cosmosvaloper1yf07bzltzw74932x1o6vjhh7ew1752btac35uo'; const dstValidatorAddress = 'cosmosvaloper1kye73v8k96c894qkk09ycm57kv7cmkmw49iloz'; const amount = '132'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const redelegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.redelegateTokens(firstAccount.address, srcValidatorAddress, dstValidatorAddress, redelegateAmount, fee, 'Redelegating tokens'); return result.transactionHash; }
Send 147 ATOM ATOM to cosmos1vhf5yh6tq7x4kk4s7uxp3am3qpag3jirkp7inj on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const recipient = 'cosmos1vhf5yh6tq7x4kk4s7uxp3am3qpag3jirkp7inj'; const amount = '147'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const sendAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.sendTokens(firstAccount.address, recipient, [sendAmount], fee, 'Sending tokens'); return result.transactionHash; }
Undelegate 328 ATOM ATOM from cosmosvaloper13fubyzjsmoysmx259j368ntqgn2mnq0mey0ztl on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper13fubyzjsmoysmx259j368ntqgn2mnq0mey0ztl'; const amount = '328'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const undelegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.undelegateTokens(firstAccount.address, validatorAddress, undelegateAmount, fee, 'Undelegating tokens'); return result.transactionHash; }
Delegate 772 ATOM ATOM to cosmosvaloper1nyydhpj2mcv0we8pvrgit30rmdfqkghbum42bv on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper1nyydhpj2mcv0we8pvrgit30rmdfqkghbum42bv'; const amount = '772'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const delegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.delegateTokens(firstAccount.address, validatorAddress, delegateAmount, fee, 'Delegating tokens'); return result.transactionHash; }
Withdraw rewards from cosmosvaloper18c5tfn0wcbgb7w46481uevosimyf2jo4g9pvrk on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper18c5tfn0wcbgb7w46481uevosimyf2jo4g9pvrk'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const result = await client.withdrawRewards(firstAccount.address, validatorAddress, fee, 'Withdrawing rewards'); return result.transactionHash; }
Redelegate 241 ATOM ATOM from cosmosvaloper1cmmlkv0omk28q8he4et6b2nezliz2b6ajyuhl9 to cosmosvaloper1bmrvjdefh0y5nu87gwl0imu5e9flyfc0tuu2nj on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const srcValidatorAddress = 'cosmosvaloper1cmmlkv0omk28q8he4et6b2nezliz2b6ajyuhl9'; const dstValidatorAddress = 'cosmosvaloper1bmrvjdefh0y5nu87gwl0imu5e9flyfc0tuu2nj'; const amount = '241'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const redelegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.redelegateTokens(firstAccount.address, srcValidatorAddress, dstValidatorAddress, redelegateAmount, fee, 'Redelegating tokens'); return result.transactionHash; }
Vote on proposal 55 with option 3 on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const proposalId = '55'; const option = '3'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const voteMsg = { typeUrl: '/cosmos.gov.v1beta1.MsgVote', value: { proposalId: proposalId, voter: firstAccount.address, option: option }, }; const result = await client.signAndBroadcast(firstAccount.address, [voteMsg], fee, 'Voting on proposal'); return result.transactionHash; }
Submit a proposal with title 'Proposal Title 12' and description 'Proposal Description 12' on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const title = 'Proposal Title 12'; const description = 'Proposal Description 12'; const deposit = '647'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const proposalMsg = { typeUrl: '/cosmos.gov.v1beta1.MsgSubmitProposal', value: { content: { typeUrl: '/cosmos.gov.v1beta1.TextProposal', value: { title: title, description: description }, }, initialDeposit: [{ denom: chainConfig.denom, amount: (parseFloat(deposit) * 1000000).toString() }], proposer: firstAccount.address, }, }; const result = await client.signAndBroadcast(firstAccount.address, [proposalMsg], fee, 'Submitting proposal'); return result.transactionHash; }
Send 380 ATOM ATOM to cosmos189zne97llqcc02pwg4qvlae7uytqdw90crzazz on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const recipient = 'cosmos189zne97llqcc02pwg4qvlae7uytqdw90crzazz'; const amount = '380'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const sendAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.sendTokens(firstAccount.address, recipient, [sendAmount], fee, 'Sending tokens'); return result.transactionHash; }
Vote on proposal 10 with option 2 on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const proposalId = '10'; const option = '2'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const voteMsg = { typeUrl: '/cosmos.gov.v1beta1.MsgVote', value: { proposalId: proposalId, voter: firstAccount.address, option: option }, }; const result = await client.signAndBroadcast(firstAccount.address, [voteMsg], fee, 'Voting on proposal'); return result.transactionHash; }
Vote on proposal 81 with option 3 on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const proposalId = '81'; const option = '3'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const voteMsg = { typeUrl: '/cosmos.gov.v1beta1.MsgVote', value: { proposalId: proposalId, voter: firstAccount.address, option: option }, }; const result = await client.signAndBroadcast(firstAccount.address, [voteMsg], fee, 'Voting on proposal'); return result.transactionHash; }
Submit a proposal with title 'Proposal Title 66' and description 'Proposal Description 56' on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const title = 'Proposal Title 66'; const description = 'Proposal Description 56'; const deposit = '375'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const proposalMsg = { typeUrl: '/cosmos.gov.v1beta1.MsgSubmitProposal', value: { content: { typeUrl: '/cosmos.gov.v1beta1.TextProposal', value: { title: title, description: description }, }, initialDeposit: [{ denom: chainConfig.denom, amount: (parseFloat(deposit) * 1000000).toString() }], proposer: firstAccount.address, }, }; const result = await client.signAndBroadcast(firstAccount.address, [proposalMsg], fee, 'Submitting proposal'); return result.transactionHash; }
Withdraw rewards from cosmosvaloper1sdtv2bkzi6syce9zxcvbzh6fws0z1j80nn8ctt on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper1sdtv2bkzi6syce9zxcvbzh6fws0z1j80nn8ctt'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const result = await client.withdrawRewards(firstAccount.address, validatorAddress, fee, 'Withdrawing rewards'); return result.transactionHash; }
Withdraw rewards from cosmosvaloper1iewyesxt8t7sudagk5he7ppi9d8glra5q67j27 on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper1iewyesxt8t7sudagk5he7ppi9d8glra5q67j27'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const result = await client.withdrawRewards(firstAccount.address, validatorAddress, fee, 'Withdrawing rewards'); return result.transactionHash; }
Undelegate 838 ATOM ATOM from cosmosvaloper1vvelah6pnsfzu6358w7ld69x2g2dgz3s3fxaqx on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper1vvelah6pnsfzu6358w7ld69x2g2dgz3s3fxaqx'; const amount = '838'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const undelegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.undelegateTokens(firstAccount.address, validatorAddress, undelegateAmount, fee, 'Undelegating tokens'); return result.transactionHash; }
Withdraw rewards from cosmosvaloper1wnvnrvvcet1wu5tc7zho5h3gtv0vyxvqj2hco1 on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper1wnvnrvvcet1wu5tc7zho5h3gtv0vyxvqj2hco1'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const result = await client.withdrawRewards(firstAccount.address, validatorAddress, fee, 'Withdrawing rewards'); return result.transactionHash; }
Vote on proposal 22 with option 2 on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const proposalId = '22'; const option = '2'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const voteMsg = { typeUrl: '/cosmos.gov.v1beta1.MsgVote', value: { proposalId: proposalId, voter: firstAccount.address, option: option }, }; const result = await client.signAndBroadcast(firstAccount.address, [voteMsg], fee, 'Voting on proposal'); return result.transactionHash; }
Undelegate 880 ATOM ATOM from cosmosvaloper1mogo0zf641ly7ssrlwg3jiwgesfw2mwksqg8uk on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper1mogo0zf641ly7ssrlwg3jiwgesfw2mwksqg8uk'; const amount = '880'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const undelegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.undelegateTokens(firstAccount.address, validatorAddress, undelegateAmount, fee, 'Undelegating tokens'); return result.transactionHash; }
How can I improve my coding skills?
Organizing your day with a schedule can help you stay on track. Start by listing all your tasks for the day, then allocate specific time slots for each task. Be sure to include short breaks to recharge.
Send 61 ATOM ATOM to cosmos1z0m8xmt2akqxv76ri29nyll98ghvyq31ohd3mi on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const recipient = 'cosmos1z0m8xmt2akqxv76ri29nyll98ghvyq31ohd3mi'; const amount = '61'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const sendAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.sendTokens(firstAccount.address, recipient, [sendAmount], fee, 'Sending tokens'); return result.transactionHash; }
Delegate 347 ATOM ATOM to cosmosvaloper1n9zp2qdxsvux5469cyyfjzibv57h07axwkmhcm on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper1n9zp2qdxsvux5469cyyfjzibv57h07axwkmhcm'; const amount = '347'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const delegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.delegateTokens(firstAccount.address, validatorAddress, delegateAmount, fee, 'Delegating tokens'); return result.transactionHash; }
Undelegate 223 ATOM ATOM from cosmosvaloper1p9lovh0yzfs7jei8wixqaqo1qwlpmr9ih58z2j on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper1p9lovh0yzfs7jei8wixqaqo1qwlpmr9ih58z2j'; const amount = '223'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const undelegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.undelegateTokens(firstAccount.address, validatorAddress, undelegateAmount, fee, 'Undelegating tokens'); return result.transactionHash; }
How do I plan my week effectively?
Staying motivated while working from home can be achieved by setting up a comfortable workspace, establishing a routine, setting clear goals, rewarding yourself for achievements, and staying connected with colleagues and friends.
Send 742 ATOM ATOM to cosmos186vfwlmoip9xkn8egwczd59j0w9awfre9eauy2 on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const recipient = 'cosmos186vfwlmoip9xkn8egwczd59j0w9awfre9eauy2'; const amount = '742'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const sendAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.sendTokens(firstAccount.address, recipient, [sendAmount], fee, 'Sending tokens'); return result.transactionHash; }
Vote on proposal 40 with option 3 on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const proposalId = '40'; const option = '3'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const voteMsg = { typeUrl: '/cosmos.gov.v1beta1.MsgVote', value: { proposalId: proposalId, voter: firstAccount.address, option: option }, }; const result = await client.signAndBroadcast(firstAccount.address, [voteMsg], fee, 'Voting on proposal'); return result.transactionHash; }
Undelegate 84 ATOM ATOM from cosmosvaloper1dxfqissnsvzs3q7yor56739qgkav43aai58ryv on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper1dxfqissnsvzs3q7yor56739qgkav43aai58ryv'; const amount = '84'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const undelegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.undelegateTokens(firstAccount.address, validatorAddress, undelegateAmount, fee, 'Undelegating tokens'); return result.transactionHash; }
Delegate 582 ATOM ATOM to cosmosvaloper19sj1pet1umtfkiq7jui1omnsxaqu8gun1fyqzz on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper19sj1pet1umtfkiq7jui1omnsxaqu8gun1fyqzz'; const amount = '582'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const delegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.delegateTokens(firstAccount.address, validatorAddress, delegateAmount, fee, 'Delegating tokens'); return result.transactionHash; }
Undelegate 929 ATOM ATOM from cosmosvaloper1a2bj86bxljt0k9ik5kcfpuym2o26yhx8m7dj31 on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper1a2bj86bxljt0k9ik5kcfpuym2o26yhx8m7dj31'; const amount = '929'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const undelegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.undelegateTokens(firstAccount.address, validatorAddress, undelegateAmount, fee, 'Undelegating tokens'); return result.transactionHash; }
How do I prepare for a job interview?
Managing stress effectively involves practicing relaxation techniques such as deep breathing, meditation, and exercise. It's also important to maintain a healthy work-life balance and seek support from friends, family, or professionals if needed.
Submit a proposal with title 'Proposal Title 41' and description 'Proposal Description 6' on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const title = 'Proposal Title 41'; const description = 'Proposal Description 6'; const deposit = '857'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const proposalMsg = { typeUrl: '/cosmos.gov.v1beta1.MsgSubmitProposal', value: { content: { typeUrl: '/cosmos.gov.v1beta1.TextProposal', value: { title: title, description: description }, }, initialDeposit: [{ denom: chainConfig.denom, amount: (parseFloat(deposit) * 1000000).toString() }], proposer: firstAccount.address, }, }; const result = await client.signAndBroadcast(firstAccount.address, [proposalMsg], fee, 'Submitting proposal'); return result.transactionHash; }
Submit a proposal with title 'Proposal Title 14' and description 'Proposal Description 12' on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const title = 'Proposal Title 14'; const description = 'Proposal Description 12'; const deposit = '884'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const proposalMsg = { typeUrl: '/cosmos.gov.v1beta1.MsgSubmitProposal', value: { content: { typeUrl: '/cosmos.gov.v1beta1.TextProposal', value: { title: title, description: description }, }, initialDeposit: [{ denom: chainConfig.denom, amount: (parseFloat(deposit) * 1000000).toString() }], proposer: firstAccount.address, }, }; const result = await client.signAndBroadcast(firstAccount.address, [proposalMsg], fee, 'Submitting proposal'); return result.transactionHash; }
Submit a proposal with title 'Proposal Title 97' and description 'Proposal Description 10' on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const title = 'Proposal Title 97'; const description = 'Proposal Description 10'; const deposit = '698'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const proposalMsg = { typeUrl: '/cosmos.gov.v1beta1.MsgSubmitProposal', value: { content: { typeUrl: '/cosmos.gov.v1beta1.TextProposal', value: { title: title, description: description }, }, initialDeposit: [{ denom: chainConfig.denom, amount: (parseFloat(deposit) * 1000000).toString() }], proposer: firstAccount.address, }, }; const result = await client.signAndBroadcast(firstAccount.address, [proposalMsg], fee, 'Submitting proposal'); return result.transactionHash; }
Delegate 240 ATOM ATOM to cosmosvaloper1jrchjzuwhg74f1hnc6ivc5ex6ug9wxyeg0pvua on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper1jrchjzuwhg74f1hnc6ivc5ex6ug9wxyeg0pvua'; const amount = '240'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const delegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.delegateTokens(firstAccount.address, validatorAddress, delegateAmount, fee, 'Delegating tokens'); return result.transactionHash; }
Vote on proposal 75 with option 3 on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const proposalId = '75'; const option = '3'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const voteMsg = { typeUrl: '/cosmos.gov.v1beta1.MsgVote', value: { proposalId: proposalId, voter: firstAccount.address, option: option }, }; const result = await client.signAndBroadcast(firstAccount.address, [voteMsg], fee, 'Voting on proposal'); return result.transactionHash; }
Redelegate 519 ATOM ATOM from cosmosvaloper1xnflm5bx2aehiv30iru8vvrwrv3ko1iys412u5 to cosmosvaloper11m2w4x7uiqaak6898pw8da6mom6vqf9d446b4m on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const srcValidatorAddress = 'cosmosvaloper1xnflm5bx2aehiv30iru8vvrwrv3ko1iys412u5'; const dstValidatorAddress = 'cosmosvaloper11m2w4x7uiqaak6898pw8da6mom6vqf9d446b4m'; const amount = '519'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const redelegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.redelegateTokens(firstAccount.address, srcValidatorAddress, dstValidatorAddress, redelegateAmount, fee, 'Redelegating tokens'); return result.transactionHash; }
Withdraw rewards from cosmosvaloper1t29a5khaizz5212ahdvyos1hqdh989fu3d0ydb on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper1t29a5khaizz5212ahdvyos1hqdh989fu3d0ydb'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const result = await client.withdrawRewards(firstAccount.address, validatorAddress, fee, 'Withdrawing rewards'); return result.transactionHash; }
Help me organize my day with a schedule.
To plan your week effectively, start by listing your tasks for the week. Prioritize them based on importance and deadlines. Allocate specific time slots for each task, and make sure to include breaks to avoid burnout. Review your plan daily and adjust as necessary.
Submit a proposal with title 'Proposal Title 74' and description 'Proposal Description 9' on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const title = 'Proposal Title 74'; const description = 'Proposal Description 9'; const deposit = '921'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const proposalMsg = { typeUrl: '/cosmos.gov.v1beta1.MsgSubmitProposal', value: { content: { typeUrl: '/cosmos.gov.v1beta1.TextProposal', value: { title: title, description: description }, }, initialDeposit: [{ denom: chainConfig.denom, amount: (parseFloat(deposit) * 1000000).toString() }], proposer: firstAccount.address, }, }; const result = await client.signAndBroadcast(firstAccount.address, [proposalMsg], fee, 'Submitting proposal'); return result.transactionHash; }
Undelegate 558 ATOM ATOM from cosmosvaloper106e9tk538ggjru7a9ic69n1wgh5pnw84h76mtk on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper106e9tk538ggjru7a9ic69n1wgh5pnw84h76mtk'; const amount = '558'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const undelegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.undelegateTokens(firstAccount.address, validatorAddress, undelegateAmount, fee, 'Undelegating tokens'); return result.transactionHash; }
Delegate 673 ATOM ATOM to cosmosvaloper18nrv9ueddn5k9fame9mn48u7vg9rmxdp5jw3of on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper18nrv9ueddn5k9fame9mn48u7vg9rmxdp5jw3of'; const amount = '673'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const delegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.delegateTokens(firstAccount.address, validatorAddress, delegateAmount, fee, 'Delegating tokens'); return result.transactionHash; }
Redelegate 429 ATOM ATOM from cosmosvaloper1q197frdsgu4824wqbrgju1tx4a28ltc7jqj7lb to cosmosvaloper19oc687o5kejbm8zbw3648god25vojce411ve46 on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const srcValidatorAddress = 'cosmosvaloper1q197frdsgu4824wqbrgju1tx4a28ltc7jqj7lb'; const dstValidatorAddress = 'cosmosvaloper19oc687o5kejbm8zbw3648god25vojce411ve46'; const amount = '429'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const redelegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.redelegateTokens(firstAccount.address, srcValidatorAddress, dstValidatorAddress, redelegateAmount, fee, 'Redelegating tokens'); return result.transactionHash; }
Withdraw rewards from cosmosvaloper1oyanutoqbhfu7njvh704j2h2fsq335zss6sxzg on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper1oyanutoqbhfu7njvh704j2h2fsq335zss6sxzg'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const result = await client.withdrawRewards(firstAccount.address, validatorAddress, fee, 'Withdrawing rewards'); return result.transactionHash; }
Send 238 ATOM ATOM to cosmos1n95ar9dezpzembma1ygjrwfcuy1fo298em1h5u on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const recipient = 'cosmos1n95ar9dezpzembma1ygjrwfcuy1fo298em1h5u'; const amount = '238'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const sendAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.sendTokens(firstAccount.address, recipient, [sendAmount], fee, 'Sending tokens'); return result.transactionHash; }
Send 473 ATOM ATOM to cosmos1tcd07egd1aq1poaq30d8dmkqg35kbfiinq38rj on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const recipient = 'cosmos1tcd07egd1aq1poaq30d8dmkqg35kbfiinq38rj'; const amount = '473'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const sendAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.sendTokens(firstAccount.address, recipient, [sendAmount], fee, 'Sending tokens'); return result.transactionHash; }
How do I plan my week effectively?
To improve efficiency, try breaking down large tasks into smaller, manageable steps. Prioritize tasks based on urgency and importance, and eliminate any distractions while working.
Send 431 ATOM ATOM to cosmos1jvpcm6pfqn99qzhcpvm9xwjg8w7kyn8w1m92l4 on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const recipient = 'cosmos1jvpcm6pfqn99qzhcpvm9xwjg8w7kyn8w1m92l4'; const amount = '431'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const sendAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.sendTokens(firstAccount.address, recipient, [sendAmount], fee, 'Sending tokens'); return result.transactionHash; }
Undelegate 46 ATOM ATOM from cosmosvaloper1yzp6dxp352rvzwx7jsc6snqk6abws517qg6ske on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper1yzp6dxp352rvzwx7jsc6snqk6abws517qg6ske'; const amount = '46'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const undelegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.undelegateTokens(firstAccount.address, validatorAddress, undelegateAmount, fee, 'Undelegating tokens'); return result.transactionHash; }
Withdraw rewards from cosmosvaloper1oztfclci7k9nxn6cspi5ypmd20qw0o91504k0e on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper1oztfclci7k9nxn6cspi5ypmd20qw0o91504k0e'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const result = await client.withdrawRewards(firstAccount.address, validatorAddress, fee, 'Withdrawing rewards'); return result.transactionHash; }
Vote on proposal 23 with option 4 on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const proposalId = '23'; const option = '4'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const voteMsg = { typeUrl: '/cosmos.gov.v1beta1.MsgVote', value: { proposalId: proposalId, voter: firstAccount.address, option: option }, }; const result = await client.signAndBroadcast(firstAccount.address, [voteMsg], fee, 'Voting on proposal'); return result.transactionHash; }
Redelegate 921 ATOM ATOM from cosmosvaloper1rkehssqj09gox28hzakepkb8r1q1zh5zcpiv5t to cosmosvaloper1wfdljbg6pvc5va69iqe1eytapafs7yahxepobk on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const srcValidatorAddress = 'cosmosvaloper1rkehssqj09gox28hzakepkb8r1q1zh5zcpiv5t'; const dstValidatorAddress = 'cosmosvaloper1wfdljbg6pvc5va69iqe1eytapafs7yahxepobk'; const amount = '921'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const redelegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.redelegateTokens(firstAccount.address, srcValidatorAddress, dstValidatorAddress, redelegateAmount, fee, 'Redelegating tokens'); return result.transactionHash; }
Withdraw rewards from cosmosvaloper1hvivov6682gvjvdhfwr4delg6su9sfplsockxs on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper1hvivov6682gvjvdhfwr4delg6su9sfplsockxs'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const result = await client.withdrawRewards(firstAccount.address, validatorAddress, fee, 'Withdrawing rewards'); return result.transactionHash; }
Send 127 ATOM ATOM to cosmos15oe3mm90v8mj02vtpf6g6g4oxd7gutf9css7k8 on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const recipient = 'cosmos15oe3mm90v8mj02vtpf6g6g4oxd7gutf9css7k8'; const amount = '127'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const sendAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.sendTokens(firstAccount.address, recipient, [sendAmount], fee, 'Sending tokens'); return result.transactionHash; }
Undelegate 311 ATOM ATOM from cosmosvaloper1ho2lqzxa8dpro1e48jzcz6vuzw3mt1dz5y3im8 on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper1ho2lqzxa8dpro1e48jzcz6vuzw3mt1dz5y3im8'; const amount = '311'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const undelegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.undelegateTokens(firstAccount.address, validatorAddress, undelegateAmount, fee, 'Undelegating tokens'); return result.transactionHash; }
Delegate 292 ATOM ATOM to cosmosvaloper1iqeofurrslppcvefhkoumc174xdreyrcmvw54l on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper1iqeofurrslppcvefhkoumc174xdreyrcmvw54l'; const amount = '292'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const delegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.delegateTokens(firstAccount.address, validatorAddress, delegateAmount, fee, 'Delegating tokens'); return result.transactionHash; }
Send 104 ATOM ATOM to cosmos14ut0ry1z2h9ldugi9wio13q7cml81xtbu747yj on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const recipient = 'cosmos14ut0ry1z2h9ldugi9wio13q7cml81xtbu747yj'; const amount = '104'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const sendAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.sendTokens(firstAccount.address, recipient, [sendAmount], fee, 'Sending tokens'); return result.transactionHash; }
Vote on proposal 56 with option 1 on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const proposalId = '56'; const option = '1'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const voteMsg = { typeUrl: '/cosmos.gov.v1beta1.MsgVote', value: { proposalId: proposalId, voter: firstAccount.address, option: option }, }; const result = await client.signAndBroadcast(firstAccount.address, [voteMsg], fee, 'Voting on proposal'); return result.transactionHash; }
Vote on proposal 94 with option 4 on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const proposalId = '94'; const option = '4'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const voteMsg = { typeUrl: '/cosmos.gov.v1beta1.MsgVote', value: { proposalId: proposalId, voter: firstAccount.address, option: option }, }; const result = await client.signAndBroadcast(firstAccount.address, [voteMsg], fee, 'Voting on proposal'); return result.transactionHash; }
Vote on proposal 11 with option 4 on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const proposalId = '11'; const option = '4'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const voteMsg = { typeUrl: '/cosmos.gov.v1beta1.MsgVote', value: { proposalId: proposalId, voter: firstAccount.address, option: option }, }; const result = await client.signAndBroadcast(firstAccount.address, [voteMsg], fee, 'Voting on proposal'); return result.transactionHash; }
Vote on proposal 45 with option 3 on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const proposalId = '45'; const option = '3'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const voteMsg = { typeUrl: '/cosmos.gov.v1beta1.MsgVote', value: { proposalId: proposalId, voter: firstAccount.address, option: option }, }; const result = await client.signAndBroadcast(firstAccount.address, [voteMsg], fee, 'Voting on proposal'); return result.transactionHash; }
Submit a proposal with title 'Proposal Title 74' and description 'Proposal Description 53' on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const title = 'Proposal Title 74'; const description = 'Proposal Description 53'; const deposit = '864'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const proposalMsg = { typeUrl: '/cosmos.gov.v1beta1.MsgSubmitProposal', value: { content: { typeUrl: '/cosmos.gov.v1beta1.TextProposal', value: { title: title, description: description }, }, initialDeposit: [{ denom: chainConfig.denom, amount: (parseFloat(deposit) * 1000000).toString() }], proposer: firstAccount.address, }, }; const result = await client.signAndBroadcast(firstAccount.address, [proposalMsg], fee, 'Submitting proposal'); return result.transactionHash; }
Send 111 ATOM ATOM to cosmos1bgdi4bxhmznd7yhwy7a5bl9pku0anh4pvbdtgo on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const recipient = 'cosmos1bgdi4bxhmznd7yhwy7a5bl9pku0anh4pvbdtgo'; const amount = '111'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const sendAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.sendTokens(firstAccount.address, recipient, [sendAmount], fee, 'Sending tokens'); return result.transactionHash; }
Send 772 ATOM ATOM to cosmos15rqpsv2ch35qs17c4mtaouamnqp9b7lczsbjm6 on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const recipient = 'cosmos15rqpsv2ch35qs17c4mtaouamnqp9b7lczsbjm6'; const amount = '772'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const sendAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.sendTokens(firstAccount.address, recipient, [sendAmount], fee, 'Sending tokens'); return result.transactionHash; }
Withdraw rewards from cosmosvaloper1rier9zyxchhz4t023766gcv4sk94cyemwzqqi0 on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper1rier9zyxchhz4t023766gcv4sk94cyemwzqqi0'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const result = await client.withdrawRewards(firstAccount.address, validatorAddress, fee, 'Withdrawing rewards'); return result.transactionHash; }
Submit a proposal with title 'Proposal Title 96' and description 'Proposal Description 40' on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const title = 'Proposal Title 96'; const description = 'Proposal Description 40'; const deposit = '425'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const proposalMsg = { typeUrl: '/cosmos.gov.v1beta1.MsgSubmitProposal', value: { content: { typeUrl: '/cosmos.gov.v1beta1.TextProposal', value: { title: title, description: description }, }, initialDeposit: [{ denom: chainConfig.denom, amount: (parseFloat(deposit) * 1000000).toString() }], proposer: firstAccount.address, }, }; const result = await client.signAndBroadcast(firstAccount.address, [proposalMsg], fee, 'Submitting proposal'); return result.transactionHash; }
Submit a proposal with title 'Proposal Title 52' and description 'Proposal Description 100' on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const title = 'Proposal Title 52'; const description = 'Proposal Description 100'; const deposit = '614'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const proposalMsg = { typeUrl: '/cosmos.gov.v1beta1.MsgSubmitProposal', value: { content: { typeUrl: '/cosmos.gov.v1beta1.TextProposal', value: { title: title, description: description }, }, initialDeposit: [{ denom: chainConfig.denom, amount: (parseFloat(deposit) * 1000000).toString() }], proposer: firstAccount.address, }, }; const result = await client.signAndBroadcast(firstAccount.address, [proposalMsg], fee, 'Submitting proposal'); return result.transactionHash; }
Undelegate 222 ATOM ATOM from cosmosvaloper12lrhs7qqn1xlud2namwefj2uhn8b648n0zdfzp on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper12lrhs7qqn1xlud2namwefj2uhn8b648n0zdfzp'; const amount = '222'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const undelegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.undelegateTokens(firstAccount.address, validatorAddress, undelegateAmount, fee, 'Undelegating tokens'); return result.transactionHash; }
Withdraw rewards from cosmosvaloper1syza1gf49fl2af45w5ldm8gjbl7akt9e436hkr on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper1syza1gf49fl2af45w5ldm8gjbl7akt9e436hkr'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const result = await client.withdrawRewards(firstAccount.address, validatorAddress, fee, 'Withdrawing rewards'); return result.transactionHash; }
Redelegate 54 ATOM ATOM from cosmosvaloper1cfs8311io6ucd713uoapqfx5vkqh5kbeg5w7oi to cosmosvaloper1stjtkpz1a5z78cwm6hopkmoq57rb9akpu7e0c0 on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const srcValidatorAddress = 'cosmosvaloper1cfs8311io6ucd713uoapqfx5vkqh5kbeg5w7oi'; const dstValidatorAddress = 'cosmosvaloper1stjtkpz1a5z78cwm6hopkmoq57rb9akpu7e0c0'; const amount = '54'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const redelegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.redelegateTokens(firstAccount.address, srcValidatorAddress, dstValidatorAddress, redelegateAmount, fee, 'Redelegating tokens'); return result.transactionHash; }
Undelegate 68 ATOM ATOM from cosmosvaloper1p4niixuyk9zwq079ja7qkwkdt9cczice4yknju on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper1p4niixuyk9zwq079ja7qkwkdt9cczice4yknju'; const amount = '68'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const undelegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.undelegateTokens(firstAccount.address, validatorAddress, undelegateAmount, fee, 'Undelegating tokens'); return result.transactionHash; }
Vote on proposal 41 with option 4 on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const proposalId = '41'; const option = '4'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const voteMsg = { typeUrl: '/cosmos.gov.v1beta1.MsgVote', value: { proposalId: proposalId, voter: firstAccount.address, option: option }, }; const result = await client.signAndBroadcast(firstAccount.address, [voteMsg], fee, 'Voting on proposal'); return result.transactionHash; }
Delegate 554 ATOM ATOM to cosmosvaloper1boy5phm7m5vkekrj0ip9dvepij107nqgfcwnab on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper1boy5phm7m5vkekrj0ip9dvepij107nqgfcwnab'; const amount = '554'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const delegateAmount = { denom: chainConfig.denom, amount: (parseFloat(amount) * 1000000).toString() }; const result = await client.delegateTokens(firstAccount.address, validatorAddress, delegateAmount, fee, 'Delegating tokens'); return result.transactionHash; }
Withdraw rewards from cosmosvaloper18pba6mr0t8a0okjflsqiaur9elfyy7u7eblx02 on Cosmos.
async (DirectSecp256k1HdWallet, SigningStargateClient, mnemonic, chainConfig) => { const validatorAddress = 'cosmosvaloper18pba6mr0t8a0okjflsqiaur9elfyy7u7eblx02'; const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: chainConfig.prefix }); const [firstAccount] = await wallet.getAccounts(); const client = await SigningStargateClient.connectWithSigner(chainConfig.rpcEndpoint, wallet); const fee = { amount: [{ denom: chainConfig.denom, amount: chainConfig.feeAmount }], gas: chainConfig.gas, }; const result = await client.withdrawRewards(firstAccount.address, validatorAddress, fee, 'Withdrawing rewards'); return result.transactionHash; }