clients/token_bridge: add basic terra governance

Change-Id: I10fca1e939b0485812e26b42e3dcb5f9b435a64f
This commit is contained in:
Reisen 2021-08-19 12:21:41 +00:00
parent 3795cb15fb
commit 2846b29810
3 changed files with 235 additions and 76 deletions

View File

@ -1,14 +1,19 @@
import yargs from "yargs";
const {hideBin} = require('yargs/helpers')
import * as bridge from "bridge";
import * as elliptic from "elliptic";
import * as ethers from "ethers";
import * as token_bridge from "token-bridge";
import * as web3s from '@solana/web3.js';
import {PublicKey, TransactionInstruction, AccountMeta, Keypair, Connection} from "@solana/web3.js";
import * as ethers from "ethers";
import * as elliptic from "elliptic";
import {solidityKeccak256} from "ethers/lib/utils";
import {fromUint8Array} from "js-base64";
import {BridgeImplementation__factory} from "./src/ethers-contracts";
import {LCDClient, MnemonicKey} from '@terra-money/terra.js';
import {MsgExecuteContract} from "@terra-money/terra.js";
import {PublicKey, TransactionInstruction, AccountMeta, Keypair, Connection} from "@solana/web3.js";
import {solidityKeccak256} from "ethers/lib/utils";
const signAndEncodeVM = function (
timestamp,
@ -108,6 +113,59 @@ yargs(hideBin(process.argv))
console.log(vm)
})
.command('terra execute_governance_vaa [vaa]', 'execute a governance VAA on Terra', (yargs) => {
return yargs
.positional('vaa', {
describe: 'vaa to post',
type: "string",
required: true
})
.option('rpc', {
alias: 'u',
type: 'string',
description: 'URL of the Terra RPC',
default: "http://localhost:1317"
})
.option('token_bridge', {
alias: 't',
type: 'string',
description: 'Token Bridge address',
default: "terra10pyejy66429refv3g35g2t7am0was7ya7kz2a4"
})
}, async (argv: any) => {
const terra = new LCDClient({
URL: argv.rpc,
chainID: 'columbus-4'
});
const wallet = terra.wallet(new MnemonicKey({
mnemonic: 'notice oak worry limit wrap speak medal online prefer cluster roof addict wrist behave treat actual wasp year salad speed social layer crew genius',
}));
// create a simple message that moves coin balances
const vaa = Buffer.from(argv.vaa, "hex");
const transaction = new MsgExecuteContract(
wallet.key.accAddress,
argv.token_bridge,
{
submit_vaa: {
data: fromUint8Array(vaa)
},
},
{ uluna: 1000 }
);
wallet
.createAndSignTx({
msgs: [transaction],
memo: '',
})
.then(tx => terra.tx.broadcast(tx))
.then(result => {
console.log(result);
console.log(`TX hash: ${result.txhash}`);
});
})
.command('solana execute_governance_vaa [vaa]', 'execute a governance VAA on Solana', (yargs) => {
return yargs
.positional('vaa', {
@ -321,4 +379,4 @@ interface BridgeConfig {
// Amount of lamports that needs to be paid to the protocol to post a message
fee: number,
}
}

View File

@ -9,11 +9,13 @@
"version": "1.0.0",
"dependencies": {
"@solana/web3.js": "^1.22.0",
"@terra-money/terra.js": "^1.8.9",
"@typechain/ethers-v5": "^7.0.1",
"bn.js": "^5.2.0",
"bs58": "^4.0.1",
"buffer-layout": "^1.2.2",
"ethers": "^5.4.1",
"js-base64": "^3.6.1",
"npm": "^7.20.0",
"web3": "^1.5.0",
"yargs": "^17.0.1"
@ -3912,6 +3914,41 @@
"node": ">=6"
}
},
"node_modules/@terra-money/terra.js": {
"version": "1.8.9",
"resolved": "https://registry.npmjs.org/@terra-money/terra.js/-/terra.js-1.8.9.tgz",
"integrity": "sha512-vOBzn6qEWmWDsDngABr1YEwrLXfZjOSCcw/41twSluhspa25zNjLhFPsUexeAozOENbylwPkvEPEbzeFUCbIDg==",
"dependencies": {
"axios": "^0.21.1",
"bech32": "^2.0.0",
"bip32": "^2.0.6",
"bip39": "^3.0.3",
"bufferutil": "^4.0.3",
"decimal.js": "^10.2.1",
"jscrypto": "^1.0.1",
"readable-stream": "^3.6.0",
"secp256k1": "^4.0.2",
"tmp": "^0.2.1",
"utf-8-validate": "^5.0.5",
"ws": "^7.4.2"
},
"engines": {
"node": ">=12"
}
},
"node_modules/@terra-money/terra.js/node_modules/axios": {
"version": "0.21.1",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",
"integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",
"dependencies": {
"follow-redirects": "^1.10.0"
}
},
"node_modules/@terra-money/terra.js/node_modules/bech32": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz",
"integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg=="
},
"node_modules/@textile/buckets": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/@textile/buckets/-/buckets-6.1.0.tgz",
@ -6995,8 +7032,6 @@
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
"dev": true,
"optional": true,
"dependencies": {
"file-uri-to-path": "1.0.0"
}
@ -7005,8 +7040,6 @@
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/bip32/-/bip32-2.0.6.tgz",
"integrity": "sha512-HpV5OMLLGTjSVblmrtYRfFFKuQB+GArM0+XP8HGWfJ5vxYBqo+DesvJwOdC2WJ3bCkZShGf0QIfoIpeomVzVdA==",
"dev": true,
"optional": true,
"dependencies": {
"@types/node": "10.12.18",
"bs58check": "^2.1.1",
@ -7023,16 +7056,12 @@
"node_modules/bip32/node_modules/@types/node": {
"version": "10.12.18",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz",
"integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==",
"dev": true,
"optional": true
"integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ=="
},
"node_modules/bip39": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/bip39/-/bip39-3.0.4.tgz",
"integrity": "sha512-YZKQlb752TrUWqHWj7XAwCSjYEgGAk+/Aas3V7NyjQeZYsztO8JnQUaCWhcnL4T+jL8nvB8typ2jRPzTlgugNw==",
"dev": true,
"optional": true,
"dependencies": {
"@types/node": "11.11.6",
"create-hash": "^1.1.0",
@ -7043,9 +7072,7 @@
"node_modules/bip39/node_modules/@types/node": {
"version": "11.11.6",
"resolved": "https://registry.npmjs.org/@types/node/-/node-11.11.6.tgz",
"integrity": "sha512-Exw4yUWMBXM3X+8oqzJNRqZSwUAaS4+7NdvHqQuFi/d+synz++xmX3QIf+BFqneW8N31R8Ky+sikfZUXq07ggQ==",
"dev": true,
"optional": true
"integrity": "sha512-Exw4yUWMBXM3X+8oqzJNRqZSwUAaS4+7NdvHqQuFi/d+synz++xmX3QIf+BFqneW8N31R8Ky+sikfZUXq07ggQ=="
},
"node_modules/bitcore-lib": {
"version": "8.25.10",
@ -8414,6 +8441,11 @@
"node": ">=0.10.0"
}
},
"node_modules/decimal.js": {
"version": "10.3.1",
"resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.3.1.tgz",
"integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ=="
},
"node_modules/decode-uri-component": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
@ -10224,9 +10256,7 @@
"node_modules/file-uri-to-path": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
"dev": true,
"optional": true
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
},
"node_modules/filecoin.js": {
"version": "0.0.5-alpha",
@ -10394,14 +10424,12 @@
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.1.tgz",
"integrity": "sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg==",
"dev": true,
"funding": [
{
"type": "individual",
"url": "https://github.com/sponsors/RubenVerborgh"
}
],
"optional": true,
"engines": {
"node": ">=4.0"
},
@ -13448,6 +13476,11 @@
"version": "12.20.16",
"license": "MIT"
},
"node_modules/js-base64": {
"version": "3.6.1",
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.6.1.tgz",
"integrity": "sha512-Frdq2+tRRGLQUIQOgsIGSCd1VePCS2fsddTG5dTCqR0JHgltXWfsxnY0gIXPoMeRmdom6Oyq+UMOFg5suduOjQ=="
},
"node_modules/js-sha3": {
"version": "0.8.0",
"license": "MIT"
@ -13482,6 +13515,14 @@
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
"integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM="
},
"node_modules/jscrypto": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/jscrypto/-/jscrypto-1.0.2.tgz",
"integrity": "sha512-r+oNJLGTv1nkNMBBq3c70xYrFDgJOYVgs2OHijz5Ht+0KJ0yObD0oYxC9mN72KLzVfXw+osspg6t27IZvuTUxw==",
"bin": {
"jscrypto": "bin/cli.js"
}
},
"node_modules/jsdom": {
"version": "7.2.2",
"resolved": "https://registry.npmjs.org/jsdom/-/jsdom-7.2.2.tgz",
@ -15972,9 +16013,7 @@
"node_modules/nan": {
"version": "2.15.0",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz",
"integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==",
"dev": true,
"optional": true
"integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ=="
},
"node_modules/nano-json-stream-parser": {
"version": "0.1.2",
@ -23122,9 +23161,7 @@
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/tiny-secp256k1/-/tiny-secp256k1-1.1.6.tgz",
"integrity": "sha512-FmqJZGduTyvsr2cF3375fqGHUovSwDi/QytexX1Se4BPuPZpTE5Ftp5fg+EFSuEf3lhZqgCRjEG3ydUQ/aNiwA==",
"dev": true,
"hasInstallScript": true,
"optional": true,
"dependencies": {
"bindings": "^1.3.0",
"bn.js": "^4.11.8",
@ -23139,9 +23176,7 @@
"node_modules/tiny-secp256k1/node_modules/bn.js": {
"version": "4.12.0",
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
"integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",
"dev": true,
"optional": true
"integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
},
"node_modules/title-case": {
"version": "2.1.1",
@ -23153,6 +23188,31 @@
"upper-case": "^1.0.3"
}
},
"node_modules/tmp": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz",
"integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==",
"dependencies": {
"rimraf": "^3.0.0"
},
"engines": {
"node": ">=8.17.0"
}
},
"node_modules/tmp/node_modules/rimraf": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"dependencies": {
"glob": "^7.1.3"
},
"bin": {
"rimraf": "bin.js"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/to-absolute-glob": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-0.1.1.tgz",
@ -23449,9 +23509,7 @@
"node_modules/typeforce": {
"version": "1.18.0",
"resolved": "https://registry.npmjs.org/typeforce/-/typeforce-1.18.0.tgz",
"integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g==",
"dev": true,
"optional": true
"integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g=="
},
"node_modules/typescript": {
"version": "4.3.5",
@ -24618,8 +24676,6 @@
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/wif/-/wif-2.0.6.tgz",
"integrity": "sha1-CNP1IFbGZnkplyb63g1DKudLRwQ=",
"dev": true,
"optional": true,
"dependencies": {
"bs58check": "<3.0.0"
}
@ -25115,7 +25171,7 @@
"pkg": {
"name": "bridge",
"version": "0.1.0",
"extraneous": true
"dev": true
},
"pkg/bridge": {
"extraneous": true
@ -28256,6 +28312,40 @@
"defer-to-connect": "^1.0.1"
}
},
"@terra-money/terra.js": {
"version": "1.8.9",
"resolved": "https://registry.npmjs.org/@terra-money/terra.js/-/terra.js-1.8.9.tgz",
"integrity": "sha512-vOBzn6qEWmWDsDngABr1YEwrLXfZjOSCcw/41twSluhspa25zNjLhFPsUexeAozOENbylwPkvEPEbzeFUCbIDg==",
"requires": {
"axios": "^0.21.1",
"bech32": "^2.0.0",
"bip32": "^2.0.6",
"bip39": "^3.0.3",
"bufferutil": "^4.0.3",
"decimal.js": "^10.2.1",
"jscrypto": "^1.0.1",
"readable-stream": "^3.6.0",
"secp256k1": "^4.0.2",
"tmp": "^0.2.1",
"utf-8-validate": "^5.0.5",
"ws": "^7.4.2"
},
"dependencies": {
"axios": {
"version": "0.21.1",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",
"integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",
"requires": {
"follow-redirects": "^1.10.0"
}
},
"bech32": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz",
"integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg=="
}
}
},
"@textile/buckets": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/@textile/buckets/-/buckets-6.1.0.tgz",
@ -31012,8 +31102,6 @@
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
"dev": true,
"optional": true,
"requires": {
"file-uri-to-path": "1.0.0"
}
@ -31022,8 +31110,6 @@
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/bip32/-/bip32-2.0.6.tgz",
"integrity": "sha512-HpV5OMLLGTjSVblmrtYRfFFKuQB+GArM0+XP8HGWfJ5vxYBqo+DesvJwOdC2WJ3bCkZShGf0QIfoIpeomVzVdA==",
"dev": true,
"optional": true,
"requires": {
"@types/node": "10.12.18",
"bs58check": "^2.1.1",
@ -31037,9 +31123,7 @@
"@types/node": {
"version": "10.12.18",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz",
"integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==",
"dev": true,
"optional": true
"integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ=="
}
}
},
@ -31047,8 +31131,6 @@
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/bip39/-/bip39-3.0.4.tgz",
"integrity": "sha512-YZKQlb752TrUWqHWj7XAwCSjYEgGAk+/Aas3V7NyjQeZYsztO8JnQUaCWhcnL4T+jL8nvB8typ2jRPzTlgugNw==",
"dev": true,
"optional": true,
"requires": {
"@types/node": "11.11.6",
"create-hash": "^1.1.0",
@ -31059,9 +31141,7 @@
"@types/node": {
"version": "11.11.6",
"resolved": "https://registry.npmjs.org/@types/node/-/node-11.11.6.tgz",
"integrity": "sha512-Exw4yUWMBXM3X+8oqzJNRqZSwUAaS4+7NdvHqQuFi/d+synz++xmX3QIf+BFqneW8N31R8Ky+sikfZUXq07ggQ==",
"dev": true,
"optional": true
"integrity": "sha512-Exw4yUWMBXM3X+8oqzJNRqZSwUAaS4+7NdvHqQuFi/d+synz++xmX3QIf+BFqneW8N31R8Ky+sikfZUXq07ggQ=="
}
}
},
@ -32213,6 +32293,11 @@
"integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
"dev": true
},
"decimal.js": {
"version": "10.3.1",
"resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.3.1.tgz",
"integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ=="
},
"decode-uri-component": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
@ -33826,9 +33911,7 @@
"file-uri-to-path": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
"dev": true,
"optional": true
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
},
"filecoin.js": {
"version": "0.0.5-alpha",
@ -33973,9 +34056,7 @@
"follow-redirects": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.1.tgz",
"integrity": "sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg==",
"dev": true,
"optional": true
"integrity": "sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg=="
},
"for-each": {
"version": "0.3.3",
@ -36487,6 +36568,11 @@
}
}
},
"js-base64": {
"version": "3.6.1",
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.6.1.tgz",
"integrity": "sha512-Frdq2+tRRGLQUIQOgsIGSCd1VePCS2fsddTG5dTCqR0JHgltXWfsxnY0gIXPoMeRmdom6Oyq+UMOFg5suduOjQ=="
},
"js-sha3": {
"version": "0.8.0"
},
@ -36517,6 +36603,11 @@
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
"integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM="
},
"jscrypto": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/jscrypto/-/jscrypto-1.0.2.tgz",
"integrity": "sha512-r+oNJLGTv1nkNMBBq3c70xYrFDgJOYVgs2OHijz5Ht+0KJ0yObD0oYxC9mN72KLzVfXw+osspg6t27IZvuTUxw=="
},
"jsdom": {
"version": "7.2.2",
"resolved": "https://registry.npmjs.org/jsdom/-/jsdom-7.2.2.tgz",
@ -38634,9 +38725,7 @@
"nan": {
"version": "2.15.0",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz",
"integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==",
"dev": true,
"optional": true
"integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ=="
},
"nano-json-stream-parser": {
"version": "0.1.2",
@ -44245,8 +44334,6 @@
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/tiny-secp256k1/-/tiny-secp256k1-1.1.6.tgz",
"integrity": "sha512-FmqJZGduTyvsr2cF3375fqGHUovSwDi/QytexX1Se4BPuPZpTE5Ftp5fg+EFSuEf3lhZqgCRjEG3ydUQ/aNiwA==",
"dev": true,
"optional": true,
"requires": {
"bindings": "^1.3.0",
"bn.js": "^4.11.8",
@ -44258,9 +44345,7 @@
"bn.js": {
"version": "4.12.0",
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
"integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",
"dev": true,
"optional": true
"integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
}
}
},
@ -44274,6 +44359,24 @@
"upper-case": "^1.0.3"
}
},
"tmp": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz",
"integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==",
"requires": {
"rimraf": "^3.0.0"
},
"dependencies": {
"rimraf": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"requires": {
"glob": "^7.1.3"
}
}
}
},
"to-absolute-glob": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-0.1.1.tgz",
@ -44516,9 +44619,7 @@
"typeforce": {
"version": "1.18.0",
"resolved": "https://registry.npmjs.org/typeforce/-/typeforce-1.18.0.tgz",
"integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g==",
"dev": true,
"optional": true
"integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g=="
},
"typescript": {
"version": "4.3.5"
@ -45525,8 +45626,6 @@
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/wif/-/wif-2.0.6.tgz",
"integrity": "sha1-CNP1IFbGZnkplyb63g1DKudLRwQ=",
"dev": true,
"optional": true,
"requires": {
"bs58check": "<3.0.0"
}

View File

@ -3,14 +3,16 @@
"version": "1.0.0",
"dependencies": {
"@solana/web3.js": "^1.22.0",
"@terra-money/terra.js": "^1.8.9",
"@typechain/ethers-v5": "^7.0.1",
"bn.js": "^5.2.0",
"bs58": "^4.0.1",
"buffer-layout": "^1.2.2",
"npm": "^7.20.0",
"yargs": "^17.0.1",
"@typechain/ethers-v5": "^7.0.1",
"ethers": "^5.4.1",
"web3": "^1.5.0"
"js-base64": "^3.6.1",
"npm": "^7.20.0",
"web3": "^1.5.0",
"yargs": "^17.0.1"
},
"scripts": {
"start": "tsc && node main.js",
@ -19,15 +21,15 @@
"build-contracts": "npm run build --prefix ../../ethereum && node scripts/copyContracts.js && typechain --target=ethers-v5 --out-dir=src/ethers-contracts contracts/*.json"
},
"devDependencies": {
"@openzeppelin/contracts": "^4.2.0",
"@truffle/hdwallet-provider": "^1.4.1",
"@types/bn.js": "^5.1.0",
"@types/bs58": "^4.0.1",
"@types/yargs": "^17.0.2",
"bridge": "file:./pkg/core",
"token-bridge": "file:./pkg/token",
"typescript": "^4.3.5",
"@openzeppelin/contracts": "^4.2.0",
"@truffle/hdwallet-provider": "^1.4.1",
"copy-dir": "^1.3.0",
"truffle": "^5.4.1"
"token-bridge": "file:./pkg/token",
"truffle": "^5.4.1",
"typescript": "^4.3.5"
}
}