提交 d7f47074 authored 作者: zhanglian's avatar zhanglian

调整合约地址

上级 31bb6311
......@@ -34,13 +34,13 @@ export default {
},
methods: {
init() {
// let bridgeContractAddress = '0x35645227C22c47Fe26953F14C8210b8Eb347CCd2';
let bridgeContractAddress = '0x40e60C0DDcdEf9C9dd07A11DD19f1b2afD71f904';
if ([60001, 97, 1337].includes(this.chainId)) {
let bridgeContractAddress = '';
console.log('--this.chainId',this.chainId, typeof this.chainId);
if ([60001, 70001].includes(this.chainId)) {
// bridgeContractAddress = '0x35645227C22c47Fe26953F14C8210b8Eb347CCd2';
bridgeContractAddress = '0x40e60C0DDcdEf9C9dd07A11DD19f1b2afD71f904';
} else if ([70001, 56].includes(this.chainId)) {
bridgeContractAddress = '';
} else if ([97, 56 ].includes(this.chainId)) {
bridgeContractAddress = '0x35645227C22c47Fe26953F14C8210b8Eb347CCd2';
}
let overrides = {
......@@ -88,7 +88,12 @@ export default {
if (this.walletConnected) {
this.init();
}
}
},
chainId(){
if (this.chainId) {
this.init();
}
},
}
};
</script>
......
......@@ -45,47 +45,6 @@ const tokenListDev = [{
type: 'erc20',
contractAddress: '0x337610d27c682e347c9cd60bd4b3b107c9d34ddd',
},
{
name: 'TKM3',
index: 3,
chainName: 'thk',
chainId: 60001,
url: '',
balance: '0',
type: 'main',
contractAddress: '',
},
{
name: 'TUSDT3',
index: 4,
chainName: 'thk',
chainId: 60001,
url: 'https://pancakeswap.finance/images/tokens/0xe9e7cea3dedca5984780bafc599bd69add087d56.png',
balance: '0',
type: 'erc20',
contractAddress: '0x86A1BA3EbA574884D6280310670f763e1a336d2D',
},
{
name: 'BTKM3',
index: 3,
chainName: 'bsc',
chainId: 1337,
url: '',
balance: '0',
type: 'erc20',
contractAddress: '0x0806c5b183F8a622fE62c7344B04e6e6A7C82c2e',
},
{
name: 'BUSDT3',
index: 4,
chainName: 'bsc',
chainId: 1337,
url: 'https://pancakeswap.finance/images/tokens/0xe9e7cea3dedca5984780bafc599bd69add087d56.png',
balance: '0',
type: 'erc20',
contractAddress: '0x337610d27c682e347c9cd60bd4b3b107c9d34ddd',
},
]
......
......@@ -338,6 +338,9 @@ export default {
let overrides = {
value,
}
console.log('---params', params);
console.log('---overrides', overrides);
console.log('---_bridge', window._bridge);
await window._bridge.methods.depositNative(...params).send(overrides)
},
async depositToken({ value, tokenAddress, address = window.defaultAccount, chain }) {
......@@ -353,6 +356,8 @@ export default {
address,
chain
]
console.log('---params', params);
console.log('---_bridge', window._bridge);
await window._bridge.methods.depositToken(...params).send();
},
async approve({ value, contractAddress, owner = window.defaultAccount, spender }) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论