{"id":20737591,"url":"https://github.com/patronum-labs/force-transfer","last_synced_at":"2025-04-03T02:27:58.752Z","repository":{"id":247786114,"uuid":"826883338","full_name":"Patronum-Labs/force-transfer","owner":"Patronum-Labs","description":"Singleton contract and a library containing smart contracts that allow for the force transfer of native tokens to addresses using selfdestruct","archived":false,"fork":false,"pushed_at":"2024-08-03T11:02:11.000Z","size":220,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-21T06:18:44.545Z","etag":null,"topics":["eip-6780","force-send-value","force-transfer","msg-value","selfdestruct"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@patronumlabs/force-transfer","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Patronum-Labs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":"https://etherscan.io/address/0x5D551AbEAD9b93ebd0D092722517136FF278c3D0"}},"created_at":"2024-07-10T15:11:49.000Z","updated_at":"2024-08-03T13:50:48.000Z","dependencies_parsed_at":"2024-07-16T03:28:20.740Z","dependency_job_id":null,"html_url":"https://github.com/Patronum-Labs/force-transfer","commit_stats":null,"previous_names":["patronum-labs/force-transfer"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Patronum-Labs%2Fforce-transfer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Patronum-Labs%2Fforce-transfer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Patronum-Labs%2Fforce-transfer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Patronum-Labs%2Fforce-transfer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Patronum-Labs","download_url":"https://codeload.github.com/Patronum-Labs/force-transfer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246924303,"owners_count":20855706,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eip-6780","force-send-value","force-transfer","msg-value","selfdestruct"],"created_at":"2024-11-17T06:14:57.108Z","updated_at":"2025-04-03T02:27:58.716Z","avatar_url":"https://github.com/Patronum-Labs.png","language":"Solidity","funding_links":["https://etherscan.io/address/0x5D551AbEAD9b93ebd0D092722517136FF278c3D0"],"categories":[],"sub_categories":[],"readme":"# @patronumlabs/force-transfer\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/license/mit)\n\nThis package provides a library contract that helps to force transfer native tokens to contracts that cannot receive value, that do not have the receive function. The package includes the constants related to the **ForceTransfer Singleton**.\n\n## Rationale\n\nThe Force transfer contract is a singleton that allows to force the transfer of a native token to addresses without relying on solidity's call feature and uses `self-destruct` to force send the value.\n\n`ForceTransferLib` is a contract to be used by other developers in development to integrate the logic of force sending within their contracts and protocols.\n\n\u003e Use at your own risk and please check **[SECURITY.md](./SECURITY.md)**\n\n## Installation\n\n```bash\nnpm install @patronumlabs/force-transfer\n```\n\n## Usage\n\nHere's an example of how to use the `ForceTransferLib` in your Solidity contract:\n\n```solidity\npragma solidity ^0.8.0;\n\nimport \"@patronumlabs/force-transfer/contracts/ForceTransferLib.sol\";\n\ncontract MyContract {\n  function forceTransferToAddress(address payable recipient) external payable {\n    ForceTransferLib.force(recipient, msg.value);\n  }\n}\n```\n\nConstants related to the **ForceTransfer Singleton** are exported as well.\n\n```javascript\nimport { FORCE_TRANSFER_SINGLETON_CONFIG } from \"@patronumlabs/force-transfer/constants.js\";\n\nfunction checkRawTransactionAndDeployer() {\n  console.log(FORCE_TRANSFER_SINGLETON_CONFIG.rawTx);\n  console.log(FORCE_TRANSFER_SINGLETON_CONFIG.deployerAddress);\n}\n\ncheckRawTransactionAndDeployer();\n```\n\n## Deployment\n\nFor deployment of the **ForceTransfer Singleton**, the nick-method is used with a pre-signed rawTx generated by **[@patronumlabs/nick-method](https://github.com/Patronum-Labs/nick-method/tree/main)**, for more information please check **[DEPLOYMENT.md](DEPLOYMENT.md)**\n\nIf you need help deploying on a specified network, feel free to submit an issue.\n\n## [`ForceTransfer`](./contracts/ForceTransfer.sol) Deployments\n\n📌 The deployment address of [`ForceTransfer`](./contracts/ForceTransfer.sol) is **`0xBbfa4F54FF391957894c074A6eb34b7c967b7dAe`**.\n\n\u003e The Full list can be found in the [`deployments.json`](./deployments/deployments.json) file.\n\n### EVM-Based Production Networks\n\n- [LUKSO](https://explorer.execution.mainnet.lukso.network/address/0xBbfa4F54FF391957894c074A6eb34b7c967b7dAe)\n\n### Additional EVM-Based Test Networks\n\n- [LUKSO Testnet](https://explorer.execution.testnet.lukso.network/address/0xBbfa4F54FF391957894c074A6eb34b7c967b7dAe)\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\n[MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatronum-labs%2Fforce-transfer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatronum-labs%2Fforce-transfer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatronum-labs%2Fforce-transfer/lists"}