solidity合同函数invest
钱包给钱包转账我会,调用合同读操作函数我会,调用合同写函数并且支付这样的,真的不明白怎么写 希望能帮忙补下代码来个示例看一下 十分感谢
const ethers = require('ethers');
const url = 'https://data-seed-prebsc-1-s1.binance.org:8545';
const abi = []
const contractAddress = '0Xbalabalabala';//
const provider = new ethers.providers.JsonRpcProvider(url);
const signer0 = provider.getSigner(0)
let privateKey = "balabalabala";
let wallet = new ethers.Wallet(privateKey, provider);
let contract = new ethers.Contract(contractAddress, abi, signer0)