ethereum-transfer-gateway
Advanced tools
Comparing version 0.1.0-beta.3 to 0.1.0-beta.4
{ | ||
"name": "ethereum-transfer-gateway", | ||
"version": "0.1.0-beta.3", | ||
"version": "0.1.0-beta.4", | ||
"description": "Ethhereum Transfer Gateway to Receiver Token without prior Approval", | ||
@@ -20,3 +20,4 @@ "repository": "github:wighawag/transfer-gateway", | ||
"export/artifacts/", | ||
"export/deploy/001_deploy_transfer_gateway.js", | ||
"export/deploy/001_deploy_erc20_transfer_gateway.js", | ||
"export/deploy/002_deploy_erc721_transfer_gateway.js", | ||
"diagram_*" | ||
@@ -29,11 +30,12 @@ ], | ||
"@codechecks/client": "^0.1.10", | ||
"@ethereum-waffle/chai": "^3.0.2", | ||
"@ethersproject/wallet": "^5.0.5", | ||
"@openzeppelin/contracts": "^3.2.1-solc-0.7", | ||
"@typechain/ethers-v5": "^6.0.0", | ||
"@types/chai": "^4.2.11", | ||
"@types/mocha": "^8.0.2", | ||
"@types/node": "^14.10.2", | ||
"@typescript-eslint/eslint-plugin": "^3.9.1", | ||
"@typescript-eslint/parser": "^3.9.1", | ||
"@typescript-eslint/eslint-plugin": "^4.6.0", | ||
"@typescript-eslint/parser": "^4.6.0", | ||
"chai": "^4.2.0", | ||
"chai-ethers": "^0.0.1", | ||
"cross-env": "^7.0.2", | ||
@@ -45,17 +47,21 @@ "dotenv": "^8.2.0", | ||
"fs-extra": "^9.0.1", | ||
"hardhat": "^2.0.2", | ||
"hardhat-deploy": "^0.7.0-beta.28", | ||
"hardhat-deploy-ethers": "^0.3.0-beta.5", | ||
"hardhat-gas-reporter": "^1.0.0", | ||
"hardhat": "^2.0.10", | ||
"hardhat-deploy": "^0.7.0-beta.44", | ||
"hardhat-deploy-ethers": "^0.3.0-beta.7", | ||
"hardhat-gas-reporter": "^1.0.1", | ||
"hardhat-typechain": "^0.3.5", | ||
"mocha": "^8.1.1", | ||
"prettier": "^2.0.5", | ||
"prettier-plugin-solidity": "^1.0.0-alpha.57", | ||
"slash": "^3.0.0", | ||
"solhint": "^3.3.1", | ||
"solhint-plugin-prettier": "^0.0.5", | ||
"solidity-coverage": "^0.7.10", | ||
"solidity-coverage": "^0.7.15", | ||
"ts-generator": "^0.1.1", | ||
"ts-node": "^9.0.0", | ||
"typescript": "^3.9.7" | ||
"typechain": "^4.0.2", | ||
"typescript": "^4.0.5" | ||
}, | ||
"scripts": { | ||
"prepare": "node ./.setup.js", | ||
"postinstall": "node ./.setup.js && hardhat typechain", | ||
"lint": "eslint \"**/*.{js,ts}\" && solhint src/**/*.sol", | ||
@@ -65,8 +71,10 @@ "lint:fix": "eslint --fix \"**/*.{js,ts}\" && solhint --fix src/**/*.sol", | ||
"format:fix": "prettier --write \"**/*.{ts,js,sol}\"", | ||
"compile": "hardhat compile", | ||
"void:deploy": "hardhat deploy", | ||
"test": "cross-env HARDHAT_DEPLOY_FIXTURE=true HARDHAT_COMPILE=true mocha --bail --recursive test", | ||
"gas": "cross-env REPORT_GAS=true hardhat test", | ||
"coverage": "cross-env HARDHAT_DEPLOY_FIXTURE=true --network coverage coverage", | ||
"coverage": "cross-env HARDHAT_DEPLOY_FIXTURE=true hardhat coverage", | ||
"update-readme": "node ./.update-readme.js", | ||
"dev": "hardhat node --reset --watch --export contractsInfo.json", | ||
"compile": "hardhat compile", | ||
"export": "tsc -p tsconfig.deploy.json && hardhat export-artifacts export/artifacts --include ERC20TransferGateway", | ||
"export": "tsc -p tsconfig.deploy.json && hardhat export-artifacts export/artifacts --include ERC20TransferGateway,ERC721TransferGateway", | ||
"local:dev": "hardhat --network localhost deploy --watch", | ||
@@ -77,18 +85,21 @@ "local:deploy": "hardhat --network localhost deploy", | ||
"local:export": "hardhat --network localhost export", | ||
"void:deploy": "hardhat deploy", | ||
"staging:deploy": "hardhat --network staging deploy", | ||
"staging:export": "hardhat --network staging export", | ||
"staging:seed": "cross-env HARDHAT_NETWORK=staging ts-node --files scripts/seed.ts", | ||
"staging:run": "cross-env HARDHAT_NETWORK=staging ts-node --files", | ||
"rinkeby:deploy": "hardhat --network rinkeby deploy", | ||
"rinkeby:export": "hardhat --network rinkeby export", | ||
"rinkeby:seed": "cross-env HARDHAT_NETWORK=rinkeby ts-node --files scripts/seed.ts", | ||
"rinkeby:run": "cross-env HARDHAT_NETWORK=rinkeby ts-node --files", | ||
"kovan:deploy": "hardhat --network kovan deploy", | ||
"kovan:export": "hardhat --network kovan export", | ||
"kovan:run": "cross-env HARDHAT_NETWORK=kovan ts-node --files", | ||
"goerli:deploy": "hardhat --network goerli deploy", | ||
"goerli:export": "hardhat --network goerli export", | ||
"goerli:run": "cross-env HARDHAT_NETWORK=goerli ts-node --files", | ||
"mainnet:deploy": "hardhat --network mainnet deploy", | ||
"mainnet:export": "hardhat --network mainnet export", | ||
"rinkeby:run": "cross-env HARDHAT_NETWORK=rinkeby ts-node --files", | ||
"mainnet:run": "cross-env HARDHAT_NETWORK=mainnet ts-node --files", | ||
"hardhat": "hardhat" | ||
} | ||
} |
@@ -7,9 +7,9 @@ # Transfer Gateways | ||
They can be pre-approved globally as immutable address from the ERC20 contract (see \_gateway in [solc_0.7/Test/BaseERC20.sol](solc_0.7/Test/BaseERC20.sol)) so ERC20 contract can benefit from it without requiring user confirmation. | ||
They can be pre-approved globally as immutable address from the ERC20 contract (see \_gateway in [src/solc_0.7/Test/BaseERC20.sol](src/solc_0.7/Test/BaseERC20.sol)) so ERC20 contract can benefit from it without requiring user confirmation. | ||
Alternatively for existing contract, users can approve it only once and can then make purchase in any contract that support such gateways. | ||
This technic is not exclusive to ERC20 and can be used for other contract types. | ||
This technique is not exclusive to ERC20 and this repo also includes an ERC721 version. | ||
I am planning to make an ERC721Gateway that support the transfer of multiple ERC721 (from different token contract). use case : https://mystery.market so we can deploy new sale contract without every time requiring approval for transferring ERC721 into it. | ||
Use case : https://mystery.market so we can deploy new sales contract without every time requiring approval for transferring ERC721 into it. | ||
@@ -23,3 +23,3 @@ ## How it works | ||
```js | ||
const { data, to } = await SaleContract.populateTransaction.purchase(1); | ||
const {data, to} = await SaleContract.populateTransaction.purchase(1); | ||
``` | ||
@@ -63,1 +63,12 @@ | ||
--> | ||
<!--BEGIN_TEST_COVERAGE_SUMMARY--> | ||
## Test Coverage | ||
| | File | Statements | | Functions | | Branches | | Lines | | | ||
| :-: | :--- | ---------: | --: | --------: | --: | -------: | --: | ----: | --: | | ||
| :exclamation: | [ERC20TransferGateway.sol](src/solc_0.7/ERC20TransferGateway.sol) | 35.29% | 6/17 | 50% | 3/6 | - | - | 35.29% | 6/17 | | ||
| :exclamation: | [ERC721TransferGateway.sol](src/solc_0.7/ERC721TransferGateway.sol) | 0% | 0/13 | 0% | 0/4 | - | - | 0% | 0/13 | | ||
<!--END_TEST_COVERAGE_SUMMARY--> |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7959074
165
171392
72
33
1