Comments (4)
Yes, this is now supported, although for gas estimation will currently always zeroize the sender in order to avoid it being used to bypass access control and potentially exposing secret data through a side channel. The problem is that estimate gas queries are not signed, so you cannot authenticate the caller.
For this reason, when execution fails during gas estimation, the estimate will currently be artifically inflated to account for the fact that access control checks are usually in the front (as otherwise the estimate would be an underestimate most of the time). This is not ideal and needs some more thought.
from sapphire-paratime.
Currently the JS and Go compat APIs return a hard-coded amount when asked to estimate gas.
See:
sapphire-paratime/clients/js/src/compat.ts
Line 171 in 2ee5b38
sapphire-paratime/clients/go/compat.go
Line 231 in 2ee5b38
However, the implementation of eth_estimateGas in oasis-web3-gateway seems to have a full implementation.
Need to double check gas estimation works as expected, then re-enable it.
from sapphire-paratime.
For this reason, when execution fails during gas estimation, the estimate will currently be artifically inflated to account for the fact that access control checks are usually in the front (as otherwise the estimate would be an underestimate most of the time). This is not ideal and needs some more thought.
I vote this is an okay present day solution.
from sapphire-paratime.
If you're not using signed queries, and passing explicit authentication to the function (e.g. an EIP-712 signature, username/password, WebAuthN attestation) this will not be a problem.
from sapphire-paratime.
Related Issues (20)
- Deterministic deployment proxy HOT 1
- Ensure support for Tenderly HOT 2
- Update React tutorial
- Deploy CreateX on Oasis Sapphire
- Publish packages on https://jsr.io/new
- Add sourcify support to Hardhat verify HOT 1
- Wrong gas estimates for sending ether during contract create
- Why is this function returns a `bind.ContractBackend` instead of `WrappedBackend`? Transactor is not available this way. HOT 2
- Feature: EIP1559Signer library
- `_parseCBORUint` failing in `_decodeReceiptUndelegateStart` HOT 3
- Test `provider.getSigner` is wrapped with `sapphire-ethers-v6` in MetaMask
- sapphire-contracts: Add SIWE parser
- ci: Add e2e tests for Sapphire Go client using sapphire-localnet
- docs: Better document the usage/behavior of `contextOrHash` for .sign() and .verify()
- go-client: Properly implement WrappedBackend
- sapphire-contracts: Flaky Gas padding test HOT 1
- docs: Add SIWE login for authentication to Guide/Quickstart
- Fix subcall bug with `consensusTakeReceiptUndelegateDone` HOT 1
- Test and publish RC version of JS and integration clients
- Add information for using Band on Sapphire
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sapphire-paratime.