Import gnosis-contracts

This commit is contained in:
Germán Martínez 2019-04-29 14:30:14 +02:00
parent d6d9e7cb57
commit b98cf81b7d
4 changed files with 121 additions and 13 deletions

View File

@ -65,6 +65,7 @@
"verbose": true
},
"dependencies": {
"@gnosis.pm/safe-contracts": "^1.0.0",
"@gnosis.pm/util-contracts": "^2.0.0",
"@material-ui/core": "^3.9.3",
"@material-ui/icons": "^3.0.1",

View File

@ -2,8 +2,8 @@
import contract from 'truffle-contract'
import { ensureOnce } from '~/utils/singleton'
import { getWeb3 } from '~/logic/wallets/getWeb3'
import GnosisSafeSol from '#/GnosisSafe.json'
import ProxyFactorySol from '#/ProxyFactory.json'
import GnosisSafeSol from '@gnosis.pm/safe-contracts/build/contracts/GnosisSafe.json'
import ProxyFactorySol from '@gnosis.pm/safe-contracts/build/contracts/ProxyFactory.json'
import { calculateGasOf, calculateGasPrice } from '~/logic/wallets/ethTransactions'
import { ZERO_ADDRESS } from '~/logic/wallets/ethAddresses'

View File

@ -14,7 +14,7 @@ import Paragraph from '~/components/layout/Paragraph'
import OpenPaper from '~/components/Stepper/OpenPaper'
import { FIELD_LOAD_NAME, FIELD_LOAD_ADDRESS } from '~/routes/load/components/fields'
import { getWeb3 } from '~/logic/wallets/getWeb3'
import SafeProxy from '#/Proxy.json'
import SafeProxy from '@gnosis.pm/safe-contracts/build/contracts/Proxy.json'
import { getSafeMasterContract } from '~/logic/contracts/safeContracts'
type Props = {

127
yarn.lock
View File

@ -1282,6 +1282,15 @@
resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.2.tgz#63985d3d8b02530e0869962f4da09142ee8e200e"
integrity sha512-n/VQ4mbfr81aqkx/XmVicOLjviMuy02eenSdJY33SVA7S2J42EU0P1H0mOogfYedb3wXA0d/LVtBrgTSm04WEA==
"@gnosis.pm/safe-contracts@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@gnosis.pm/safe-contracts/-/safe-contracts-1.0.0.tgz#2b562b1e23a0da1047a9f38ef71a70f811e75dd9"
integrity sha512-IT40DhKr1tAWRcSTpZ0wRfC9thrHzNzHzaPBQHP0Jq8fLVj+MIrRxY1adBZUppQ4W58XXnK0K/qj7IbyyigHlA==
dependencies:
openzeppelin-solidity "^2.0.0"
solc "^0.5.0"
truffle-hdwallet-provider "0.0.7-beta.1"
"@gnosis.pm/util-contracts@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@gnosis.pm/util-contracts/-/util-contracts-2.0.0.tgz#562b14a2d6cb4a59189476dd0f6aaeba5f65abe2"
@ -2445,6 +2454,11 @@ aes-js@3.0.0:
resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d"
integrity sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=
aes-js@^0.2.3:
version "0.2.4"
resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-0.2.4.tgz#94b881ab717286d015fa219e08fb66709dda5a3d"
integrity sha1-lLiBq3FyhtAV+iGeCPtmcJ3aWj0=
aes-js@^3.1.1:
version "3.1.2"
resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.1.2.tgz#db9aabde85d5caabbfc0d4f2a4446960f627146a"
@ -3866,6 +3880,11 @@ balanced-match@^1.0.0:
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
base-x@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/base-x/-/base-x-1.1.0.tgz#42d3d717474f9ea02207f6d1aa1f426913eeb7ac"
integrity sha1-QtPXF0dPnqAiB/bRqh9CaRPut6w=
base-x@^3.0.2:
version "3.0.5"
resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.5.tgz#d3ada59afed05b921ab581ec3112e6444ba0795a"
@ -4240,6 +4259,13 @@ bs58@^2.0.1:
resolved "https://registry.yarnpkg.com/bs58/-/bs58-2.0.1.tgz#55908d58f1982aba2008fa1bed8f91998a29bf8d"
integrity sha1-VZCNWPGYKrogCPob7Y+RmYopv40=
bs58@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/bs58/-/bs58-3.1.0.tgz#d4c26388bf4804cac714141b1945aa47e5eb248e"
integrity sha1-1MJjiL9IBMrHFBQbGUWqR+XrJI4=
dependencies:
base-x "^1.1.0"
bs58@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a"
@ -4247,6 +4273,14 @@ bs58@^4.0.0:
dependencies:
base-x "^3.0.2"
bs58check@^1.0.8:
version "1.3.4"
resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-1.3.4.tgz#c52540073749117714fa042c3047eb8f9151cbf8"
integrity sha1-xSVABzdJEXcU+gQsMEfrj5FRy/g=
dependencies:
bs58 "^3.1.0"
create-hash "^1.1.0"
bs58check@^2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc"
@ -6816,7 +6850,7 @@ ethereumjs-util@5.2.0, ethereumjs-util@^5.0.0, ethereumjs-util@^5.0.1, ethereumj
safe-buffer "^5.1.1"
secp256k1 "^3.0.1"
ethereumjs-util@^4.3.0:
ethereumjs-util@^4.3.0, ethereumjs-util@^4.4.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-4.5.0.tgz#3e9428b317eebda3d7260d854fddda954b1f1bc6"
integrity sha1-PpQosxfuvaPXJg2FT93alUsfG8Y=
@ -6857,6 +6891,19 @@ ethereumjs-vm@2.6.0, ethereumjs-vm@^2.1.0, ethereumjs-vm@^2.3.4, ethereumjs-vm@^
rustbn.js "~0.2.0"
safe-buffer "^5.1.1"
ethereumjs-wallet@0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/ethereumjs-wallet/-/ethereumjs-wallet-0.6.0.tgz#82763b1697ee7a796be7155da9dfb49b2f98cfdb"
integrity sha1-gnY7Fpfuenlr5xVdqd+0my+Yz9s=
dependencies:
aes-js "^0.2.3"
bs58check "^1.0.8"
ethereumjs-util "^4.4.0"
hdkey "^0.7.0"
scrypt.js "^0.2.0"
utf8 "^2.1.1"
uuid "^2.0.1"
ethereumjs-wallet@0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/ethereumjs-wallet/-/ethereumjs-wallet-0.6.2.tgz#67244b6af3e8113b53d709124b25477b64aeccda"
@ -8330,6 +8377,14 @@ hastscript@^5.0.0:
property-information "^5.0.1"
space-separated-tokens "^1.0.0"
hdkey@^0.7.0:
version "0.7.1"
resolved "https://registry.yarnpkg.com/hdkey/-/hdkey-0.7.1.tgz#caee4be81aa77921e909b8d228dd0f29acaee632"
integrity sha1-yu5L6BqneSHpCbjSKN0PKayu5jI=
dependencies:
coinstring "^2.0.0"
secp256k1 "^3.0.1"
hdkey@^1.0.0, hdkey@^1.1.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/hdkey/-/hdkey-1.1.1.tgz#c2b3bfd5883ff9529b72f2f08b28be0972a9f64a"
@ -11663,6 +11718,11 @@ opener@^1.5.1:
resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.1.tgz#6d2f0e77f1a0af0032aca716c2c1fbb8e7e8abed"
integrity sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA==
openzeppelin-solidity@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/openzeppelin-solidity/-/openzeppelin-solidity-2.2.0.tgz#1f0e857f53bda29b77a8e72f9a629db81015fd34"
integrity sha512-HfQq0xyT+EPs/lTWEd5Odu4T7CYdYe+qwf54EH28FQZthp4Bs6IWvOlOumTdS2dvpwZoTXURAopHn2LN1pwAGQ==
opn@5.4.0:
version "5.4.0"
resolved "https://registry.yarnpkg.com/opn/-/opn-5.4.0.tgz#cb545e7aab78562beb11aa3bfabc7042e1761035"
@ -13243,14 +13303,6 @@ react-popper@^1.3.3:
typed-styles "^0.0.7"
warning "^4.0.2"
react-qr-svg@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/react-qr-svg/-/react-qr-svg-2.2.1.tgz#f6f25820fdb2c39ad0d66a14a758e2f575717c68"
integrity sha512-rLDCZI9pIqD5lbBIatrqUMhP1gqQ7glqubXO/m/X87ikEPhXuY0hMLhYMuKoH4834G36ap8Az0HI4bXEJUN//w==
dependencies:
prop-types "^15.5.8"
qr.js "0.0.0"
react-redux@7.0.2:
version "7.0.2"
resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.0.2.tgz#34b280a3482aaf60e7d4a504b1295165cbe6b86a"
@ -14654,6 +14706,20 @@ solc@0.5.0:
semver "^5.5.0"
yargs "^11.0.0"
solc@^0.5.0:
version "0.5.7"
resolved "https://registry.yarnpkg.com/solc/-/solc-0.5.7.tgz#d84697ac5cc63d9b2139bfb349cec64b64861cdc"
integrity sha512-DaYFzB3AAYjzPtgUl9LenPY2xjI3wG9k8U8T8YE/sXHVIoCirCY5MB6mhcFPgk/VyUtaWZPUCWiYS1E6RSiiqw==
dependencies:
command-exists "^1.2.8"
fs-extra "^0.30.0"
keccak "^1.0.2"
memorystream "^0.3.1"
require-from-string "^2.0.0"
semver "^5.5.0"
tmp "0.0.33"
yargs "^11.0.0"
solidity-sha3@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/solidity-sha3/-/solidity-sha3-0.4.1.tgz#17577e93f6cfd58489c4ec7f2da3047530329ec1"
@ -15968,6 +16034,16 @@ truffle-external-compile@^1.0.8:
truffle-expect "^0.0.7"
web3-utils "1.0.0-beta.37"
truffle-hdwallet-provider@0.0.7-beta.1:
version "0.0.7-beta.1"
resolved "https://registry.yarnpkg.com/truffle-hdwallet-provider/-/truffle-hdwallet-provider-0.0.7-beta.1.tgz#ca5107a8c470eba9811f3ca760b53ff611e8485a"
integrity sha512-klqrlm19xkXuoYKTqjz+KSR/X2BMplqsgE7GcIxFkp2oR1NKqKFd8U/eAojpkpBLYd5W7gbFHMxhWKjQYViKKA==
dependencies:
bip39 "^2.2.0"
ethereumjs-wallet "0.6.0"
web3 "^0.18.2"
web3-provider-engine "^14.0.5"
truffle-init@^1.0.7:
version "1.0.7"
resolved "https://registry.yarnpkg.com/truffle-init/-/truffle-init-1.0.7.tgz#c3de57fbddfa77ae93642ae025f41c1157de2ba7"
@ -16565,6 +16641,11 @@ uuid@3.3.2, uuid@^3.0.0, uuid@^3.0.1, uuid@^3.1.0, uuid@^3.2.1, uuid@^3.3.2:
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131"
integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==
uuid@^2.0.1:
version "2.0.3"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a"
integrity sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho=
v8-compile-cache@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.0.2.tgz#a428b28bb26790734c4fc8bc9fa106fccebf6a6c"
@ -17248,6 +17329,32 @@ web3-provider-engine@14.1.0:
xhr "^2.2.0"
xtend "^4.0.1"
web3-provider-engine@^14.0.5:
version "14.2.0"
resolved "https://registry.yarnpkg.com/web3-provider-engine/-/web3-provider-engine-14.2.0.tgz#2efec157b2c429c5c674c079aea96b0a06de8b3d"
integrity sha512-sfLH5VhGjJrJJT5WcF8aGehcIKRUQ553q9tjQkkLaKU2AaLsRcwffnnWvrgeTkmKSf0y9dwkDTa48RVp+GUCSg==
dependencies:
async "^2.5.0"
backoff "^2.5.0"
clone "^2.0.0"
cross-fetch "^2.1.0"
eth-block-tracker "^3.0.0"
eth-json-rpc-infura "^3.1.0"
eth-sig-util "^1.4.2"
ethereumjs-block "^1.2.2"
ethereumjs-tx "^1.2.0"
ethereumjs-util "^5.1.5"
ethereumjs-vm "^2.3.4"
json-rpc-error "^2.0.0"
json-stable-stringify "^1.0.1"
promise-to-callback "^1.0.0"
readable-stream "^2.2.9"
request "^2.85.0"
semaphore "^1.0.3"
ws "^5.1.1"
xhr "^2.2.0"
xtend "^4.0.1"
web3-providers-http@1.0.0-beta.35:
version "1.0.0-beta.35"
resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.0.0-beta.35.tgz#92059d9d6de6e9f82f4fae30b743efd841afc1e1"
@ -17425,7 +17532,7 @@ web3@^0.16.0:
utf8 "^2.1.1"
xmlhttprequest "*"
web3@^0.18.4:
web3@^0.18.2, web3@^0.18.4:
version "0.18.4"
resolved "https://registry.yarnpkg.com/web3/-/web3-0.18.4.tgz#81ec1784145491f2eaa8955b31c06049e07c5e7d"
integrity sha1-gewXhBRUkfLqqJVbMcBgSeB8Xn0=