Update links to docs (#634)
This commit is contained in:
parent
3eb011b98f
commit
28fc81068f
|
@ -3,7 +3,7 @@ import { List } from 'immutable'
|
||||||
|
|
||||||
import { type Confirmation } from '~/routes/safe/store/models/confirmation'
|
import { type Confirmation } from '~/routes/safe/store/models/confirmation'
|
||||||
|
|
||||||
// https://gnosis-safe.readthedocs.io/en/latest/contracts/signatures.html#pre-validated-signatures
|
// https://docs.gnosis.io/safe/docs/docs5/#pre-validated-signatures
|
||||||
// https://github.com/gnosis/safe-contracts/blob/master/test/gnosisSafeTeamEdition.js#L26
|
// https://github.com/gnosis/safe-contracts/blob/master/test/gnosisSafeTeamEdition.js#L26
|
||||||
export const generateSignaturesFromTxConfirmations = (
|
export const generateSignaturesFromTxConfirmations = (
|
||||||
confirmations: List<Confirmation>,
|
confirmations: List<Confirmation>,
|
||||||
|
@ -28,7 +28,7 @@ export const generateSignaturesFromTxConfirmations = (
|
||||||
if (conf.signature) {
|
if (conf.signature) {
|
||||||
sigs += conf.signature.slice(2)
|
sigs += conf.signature.slice(2)
|
||||||
} else {
|
} else {
|
||||||
// https://gnosis-safe.readthedocs.io/en/latest/contracts/signatures.html#pre-validated-signatures
|
// https://docs.gnosis.io/safe/docs/docs5/#pre-validated-signatures
|
||||||
sigs += `000000000000000000000000${addr.replace(
|
sigs += `000000000000000000000000${addr.replace(
|
||||||
'0x',
|
'0x',
|
||||||
'',
|
'',
|
||||||
|
|
|
@ -21,7 +21,7 @@ const estimateDataGasCosts = data => {
|
||||||
return data.match(/.{2}/g).reduce(reducer, 0)
|
return data.match(/.{2}/g).reduce(reducer, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://gnosis-safe.readthedocs.io/en/latest/contracts/transactions.html#safe-transaction-data-gas-estimation
|
// https://docs.gnosis.io/safe/docs/docs4/#safe-transaction-data-gas-estimation
|
||||||
// https://github.com/gnosis/safe-contracts/blob/a97c6fd24f79c0b159ddd25a10a2ebd3ea2ef926/test/utils/execution.js
|
// https://github.com/gnosis/safe-contracts/blob/a97c6fd24f79c0b159ddd25a10a2ebd3ea2ef926/test/utils/execution.js
|
||||||
export const estimateDataGas = (
|
export const estimateDataGas = (
|
||||||
safe: any,
|
safe: any,
|
||||||
|
@ -43,7 +43,7 @@ export const estimateDataGas = (
|
||||||
const gasPrice = 0 // no need to get refund when we submit txs to metamask
|
const gasPrice = 0 // no need to get refund when we submit txs to metamask
|
||||||
const signatureCost = signatureCount * (68 + 2176 + 2176 + 6000) // array count (3 -> r, s, v) * signature count
|
const signatureCost = signatureCount * (68 + 2176 + 2176 + 6000) // array count (3 -> r, s, v) * signature count
|
||||||
|
|
||||||
// https://gnosis-safe.readthedocs.io/en/latest/contracts/signatures.html#pre-validated-signatures
|
// https://docs.gnosis.io/safe/docs/docs5/#pre-validated-signatures
|
||||||
const sigs = `0x000000000000000000000000${from.replace(
|
const sigs = `0x000000000000000000000000${from.replace(
|
||||||
'0x',
|
'0x',
|
||||||
'',
|
'',
|
||||||
|
@ -103,7 +103,7 @@ export const calculateTxFee = async (
|
||||||
safeInstance = await getGnosisSafeInstanceAt(safeAddress)
|
safeInstance = await getGnosisSafeInstanceAt(safeAddress)
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://gnosis-safe.readthedocs.io/en/latest/contracts/signatures.html#pre-validated-signatures
|
// https://docs.gnosis.io/safe/docs/docs5/#pre-validated-signatures
|
||||||
const sigs = `0x000000000000000000000000${from.replace(
|
const sigs = `0x000000000000000000000000${from.replace(
|
||||||
'0x',
|
'0x',
|
||||||
'',
|
'',
|
||||||
|
|
|
@ -27,7 +27,7 @@ export const estimateTxGasCosts = async (
|
||||||
|
|
||||||
let txData
|
let txData
|
||||||
if (isExecution) {
|
if (isExecution) {
|
||||||
// https://gnosis-safe.readthedocs.io/en/latest/contracts/signatures.html#pre-validated-signatures
|
// https://docs.gnosis.io/safe/docs/docs5/#pre-validated-signatures
|
||||||
const signatures =
|
const signatures =
|
||||||
tx && tx.confirmations
|
tx && tx.confirmations
|
||||||
? generateSignaturesFromTxConfirmations(tx.confirmations, preApprovingOwner)
|
? generateSignaturesFromTxConfirmations(tx.confirmations, preApprovingOwner)
|
||||||
|
|
|
@ -65,7 +65,7 @@ const createTransaction = ({
|
||||||
const nonce = await getNewTxNonce(txNonce, lastTx, safeInstance)
|
const nonce = await getNewTxNonce(txNonce, lastTx, safeInstance)
|
||||||
const isExecution = await shouldExecuteTransaction(safeInstance, nonce, lastTx)
|
const isExecution = await shouldExecuteTransaction(safeInstance, nonce, lastTx)
|
||||||
|
|
||||||
// https://gnosis-safe.readthedocs.io/en/latest/contracts/signatures.html#pre-validated-signatures
|
// https://docs.gnosis.io/safe/docs/docs5/#pre-validated-signatures
|
||||||
const sigs = `0x000000000000000000000000${from.replace(
|
const sigs = `0x000000000000000000000000${from.replace(
|
||||||
'0x',
|
'0x',
|
||||||
'',
|
'',
|
||||||
|
|
|
@ -48,7 +48,7 @@ const processTransaction = ({
|
||||||
const isExecution = approveAndExecute || (await shouldExecuteTransaction(safeInstance, nonce, lastTx))
|
const isExecution = approveAndExecute || (await shouldExecuteTransaction(safeInstance, nonce, lastTx))
|
||||||
|
|
||||||
let sigs = generateSignaturesFromTxConfirmations(tx.confirmations, approveAndExecute && userAddress)
|
let sigs = generateSignaturesFromTxConfirmations(tx.confirmations, approveAndExecute && userAddress)
|
||||||
// https://gnosis-safe.readthedocs.io/en/latest/contracts/signatures.html#pre-validated-signatures
|
// https://docs.gnosis.io/safe/docs/docs5/#pre-validated-signatures
|
||||||
if (!sigs) {
|
if (!sigs) {
|
||||||
sigs = `0x000000000000000000000000${from.replace(
|
sigs = `0x000000000000000000000000${from.replace(
|
||||||
'0x',
|
'0x',
|
||||||
|
|
Loading…
Reference in New Issue