protected override async Task <TestBlockchain> Build(ISpecProvider?specProvider = null, UInt256?initialValues = null) { TestBlockchain chain = await base.Build(specProvider, initialValues); AccountAbstractionRpcModule = new AccountAbstractionRpcModule(UserOperationPool, new [] { new Address(_accountAbstractionConfig.EntryPointContractAddress) }); return(chain); }
protected override async Task <TestBlockchain> Build(ISpecProvider?specProvider = null, UInt256?initialValues = null) { TestBlockchain chain = await base.Build(specProvider, initialValues); IList <Address> entryPointContractAddresses = new List <Address>(); IList <string> _entryPointContractAddressesString = _accountAbstractionConfig.GetEntryPointAddresses().ToList(); foreach (string _addressString in _entryPointContractAddressesString) { bool parsed = Address.TryParse( _addressString, out Address? entryPointContractAddress); entryPointContractAddresses.Add(entryPointContractAddress !); } AccountAbstractionRpcModule = new AccountAbstractionRpcModule(UserOperationPool, entryPointContractAddresses.ToArray()); return(chain); }
public void SupportedEntryPoints() { ResultWrapper <Address[]> resultOfEntryPoints = AccountAbstractionRpcModule.eth_supportedEntryPoints(); resultOfEntryPoints.GetResult().ResultType.Should().NotBe(ResultType.Failure, resultOfEntryPoints.Result.Error); IList <Address> entryPointContractAddresses = new List <Address>(); IList <string> _entryPointContractAddressesString = _accountAbstractionConfig.GetEntryPointAddresses().ToList(); foreach (string _addressString in _entryPointContractAddressesString) { bool parsed = Address.TryParse( _addressString, out Address? entryPointContractAddress); entryPointContractAddresses.Add(entryPointContractAddress !); } Address[] eps = entryPointContractAddresses.ToArray(); Address[] recieved_eps = (Address[])(resultOfEntryPoints.GetData()); Assert.AreEqual(eps, recieved_eps); }