Skip to content

paycrest/contracts

Repository files navigation

solidity v0.8.18

Paycrest Contracts

Description

Paycrest contracts are multi-chain EVM-based smart contracts that facilitate the on-chain lifecycle of a payment order. They empower a sender to create a payment order, enable a liquidity provider to receive cryptocurrency in escrow, and much more.

Deployment

Deployment is done using Hardhat scripts

Deploy and verify upgradeable proxy contract

npx hardhat run scripts/deploy.ts --network <network>

npx hardhat verify --network <network> <contract_address>

# for Tron network,
tronbox migrate -f 1 --to 1 --network <network>

Upgrade proxy contract

npx hardhat run scripts/upgrade.ts --network <network>

# upgrade across all EVM chains
npx hardhat run scripts/upgrade.ts --network arbitrumOne && npx hardhat run scripts/upgrade.ts --network base && npx hardhat run scripts/upgrade.ts --network bsc && npx hardhat run scripts/upgrade.ts --network polygon && npx hardhat run scripts/upgrade.ts --network optimisticEthereum && npx hardhat run scripts/upgrade.ts --network scroll

# upgrade across all EVM testnet chains
npx hardhat run scripts/upgrade.ts --network arbitrumSepolia && npx hardhat run scripts/upgrade.ts --network amoy && npx hardhat run scripts/upgrade.ts --network baseSepolia && npx hardhat run scripts/upgrade.ts --network sepolia

# for Tron network,
tronbox migrate -f 2 --to 2 --network <network>

Owner configurations

Update network settings in scripts/config.ts

npx hardhat run scripts/setSupportedTokens.ts --network <network>

npx hardhat run scripts/updateProtocolAddresses.ts --network <network>

npx hardhat run scripts/updateProtocolFee.ts --network <network>

# for Tron network,
npx hardhat run scripts/tron/setSupportedTokens.ts

npx hardhat run scripts/tron/updateProtocolAddresses.ts

npx hardhat run scripts/tron/updateProtocolFee.ts

Testnet Contracts

Network Contracts Address
Ethereum Sepolia Gateway Proxy 0xCAD53Ff499155Cc2fAA2082A85716322906886c2
Gateway Implementation 0xafbf71A72d30f81eb66baaF904ea537fD35dd106
Arbitrum Sepolia Gateway Proxy 0x87B321fc77A0fDD0ca1fEe7Ab791131157B9841A
Gateway Implementation 0xD01abCEEeacfC91d2eCE31422DFe531004A7D2e6
Base Sepolia Gateway Proxy 0x847dfdAa218F9137229CF8424378871A1DA8f625
Gateway Implementation 0xfB411Cc6385Af50A562aFCb441864E9d541CDA67
Tron Shasta Gateway Proxy TYA8urq7nkN2yU7rJqAgwDShCusDZrrsxZ
Gateway Implementation TSGr6Ri7NZ7FxN1gCiWkn8cPA2qtF6ctdF
Gateway Admin TNcogTDoWxpuv77WtsiNTRhqjRbZmmDLTR

Mainnet Contracts

Network Contracts Address
Ethereum Gateway Proxy 0x16c9C78Dbb224889E3e2ADef991C8c4438ea797B
Gateway Implementation 0xD293fCd3dBc025603911853d893A4724CF9f70a0
Polygon Gateway Proxy 0xfB411Cc6385Af50A562aFCb441864E9d541CDA67
Gateway Implementation 0x46D259eF5B3E704F968cA2E50DAa800b9e674634
Base Gateway Proxy 0x30F6A8457F8E42371E204a9c103f2Bd42341dD0F
Gateway Implementation 0x0a7aA9F8eab1665DD905288669447b66082E4B17
BNB Smart Chain Gateway Proxy 0x1FA0EE7F9410F6fa49B7AD5Da72Cf01647090028
Gateway Implementation 0x3610bF11EBF9749ECd866ad96756C5eD65B237D5
Arbitrum One Gateway Proxy 0xE8bc3B607CfE68F47000E3d200310D49041148Fc
Gateway Implementation 0x647daC4807Eb82E67CE3bca930D6202190831B4a
Optimism Ethereum Gateway Proxy 0xD293fCd3dBc025603911853d893A4724CF9f70a0
Gateway Implementation 0x847dfdAa218F9137229CF8424378871A1DA8f625
Gateway Admin 0xb9B5280AB99E48a9662D4740B1e1398abdf87b6D
Scroll Gateway Proxy 0x663C5BfE7d44bA946C2dd4b2D1Cf9580319F9338
Gateway Implementation 0x5E7eC39915F6CD48829d06648F6682765846602a
Gateway Admin 0x16c9C78Dbb224889E3e2ADef991C8c4438ea797B
Tron Gateway Proxy THyFP5ST9YyLZn6EzjKjFhZti6aKPgEXNU
Gateway Implementation TDhBvHbnF8nN7YctokpdZAVPcmBx2Jrn2d
Gateway Admin TLw6AW9khfwLVq5gq9uV71wTVZEPxKjoiZ

Testing

Contract tests are defined under the tests directory. To run all the tests, run:

npx hardhat test

Commits and PRs

This project uses Conventional Commits to generate release notes and to determine versioning. Commit messages should adhere to this standard and be of the form:

$ git commit -m "feat: Add new feature x"
$ git commit -m "fix: Fix bug in feature x"
$ git commit -m "docs: Add documentation for feature x"
$ git commit -m "test: Add test suite for feature x"

Further details on conventional commits can be found here

Contributors ✨

Prosperity
Prosperity

💻
chibie
chibie

💻
Add your contributions

This project follows the all-contributors specification. Contributions of any kind welcome!

License

Affero General Public License v3.0

About

Paycrest Protocol Smart Contracts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published