我在富士测试网中使用gnosis安全系统有问题。
在此页面https://docs.gnosis-safe.io/learn/safe-core-api/available-services中没有相应的url用于连接,仅用于雪崩网络。
我使用这段代码获取挂起的事务,但是服务返回“未找到”错误:
const address = '0xCbCb5119c2239C4AeA74fBC91AEc3e9B1166Ef79';
const provider = new ethers.providers.JsonRpcProvider(
'https://api.avax-test.network/ext/C/rpc',
);
const owner1Signer = new ethers.Wallet(
process.env.SERVICE_WALLET_SECRET_KEY,
provider,
);
const ethAdapterOwner1 = new EthersAdapter({
ethers,
signerOrProvider: owner1Signer,
});
const txServiceUrl = 'https://safe-transaction-avalanche.safe.global/';
const safeService = new SafeServiceClient({
txServiceUrl,
ethAdapter: ethAdapterOwner1,
});
const { results } = await safeService.getPendingTransactions(address);
console.log(results);我认为这是因为我使用'https://safe-transaction-avalanche.safe.global/‘url。有人能帮忙吗?
发布于 2023-03-14 10:47:05
富士测试网没有可用的服务,您可以使用https://github.com/safe-global/safe-infrastructure运行自己的服务。
https://ethereum.stackexchange.com/questions/147275
复制相似问题