Consensys / starknet-snap

The MetaMask Snap for Starknet
https://snaps.consensys.net/starknet
Apache License 2.0
74 stars 26 forks source link

feat: sf-598 estimate gas fee with txn v3 #220

Closed stanleyyconsensys closed 2 months ago

stanleyyconsensys commented 5 months ago

This PR is to allow RPC method starkNet_estimateFee to be completable with TXN v3

it take an extra parameter priceUnit to indicate the requested rpc is looking for Wei Estimation or Fri Estimation where Wei is the default value

it has dependency on

RPC call example:

{
  method: 'wallet_invokeSnap',
  params: {
    snapId: '[SNAP_ID]',
    request: {
      method: 'starkNet_estimateFee',
      params: {
        // ... existing implementation 
        priceUnit: "FRI" // FRI or WEI,
      }
    }
  }
}
sonarcloud[bot] commented 5 months ago

Quality Gate Failed Quality Gate failed for 'consensys_starknet-snap-starknet-snap'

Failed conditions
68.2% Coverage on New Code (required ≥ 80%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

sonarcloud[bot] commented 5 months ago

Quality Gate Passed Quality Gate passed for 'consensys_starknet-snap-wallet-ui'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud