Skip to content

The checkout portal contract enables buying a Kiwi NFT and delegating your device's key

Notifications You must be signed in to change notification settings

attestate/purchase-delegator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PurchaseDelegator

The checkout portal contract enables buying a Kiwi NFT and delegating your device's key at the same time

Development

This contract relies on the existence of third-party contracts on Optimism. Hence it is crucial to use forge test -f for the tests to pass.

Deployment

  • CREATE2 is used to deploy the contract to a deterministic address independent of chainId.
  • DEPLOYER: 0x0000000000ffe8b47b3e2130213b802212439497
  • SALT: 0x0000000000000000000000000000000000000000f00df00df00df00df00df00d
  • INITCODE: 0x608060405234801561001057600080fd5b5061060a806100206000396000f3fe60806040526004361061001e5760003560e01c806340dd9ed714610023575b600080fd5b61003661003136600461037a565b610038565b005b60006100426102a7565b905080341015610065576040516349798bf960e11b815260040160405180910390fd5b60405163e58306f960e01b81523360048201526001602482018190527366747bdc903d17c586fa09ee5d6b54cc85bbea45917308b7ecfac2c5754abafb789c84f8fa37c9f088b09190839063e58306f9906044016020604051808303816000875af11580156100d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100fc9190610400565b50604051630175507f60e31b81526001600160a01b03831690630baa83f890610129908c90600401610419565b600060405180830381600087803b15801561014357600080fd5b505af1158015610157573d6000803e3d6000fd5b5050604051731337e2624ffec537087c6774e9a18031cfeaf0a99250869150600081818185875af1925050503d80600081146101af576040519150601f19603f3d011682016040523d82523d6000602084013e6101b4565b606091505b505050600084346101c5919061043e565b9050801561029b5760005b88811015610262578989828181106101ea576101ea610457565b90506020020160208101906101ff919061046d565b6001600160a01b03166108fc89898481811061021d5761021d610457565b905060200201359081150290604051600060405180830381858888f1935050505015801561024f573d6000803e3d6000fd5b508061025a8161049d565b9150506101d0565b5047801561029957604051339082156108fc029083906000818181858888f19350505050158015610297573d6000803e3d6000fd5b505b505b50505050505050505050565b6000807366747bdc903d17c586fa09ee5d6b54cc85bbea459050806001600160a01b0316633474a4a66040518163ffffffff1660e01b815260040161016060405180830381865afa158015610300573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610324919061051b565b6040015191505090565b60008083601f84011261034057600080fd5b50813567ffffffffffffffff81111561035857600080fd5b6020830191508360208260051b850101111561037357600080fd5b9250929050565b600080600080600060a0868803121561039257600080fd5b60608601878111156103a357600080fd5b8695503567ffffffffffffffff808211156103bd57600080fd5b6103c989838a0161032e565b909650945060808801359150808211156103e257600080fd5b506103ef8882890161032e565b969995985093965092949392505050565b60006020828403121561041257600080fd5b5051919050565b60608181019083833792915050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561045157610451610428565b92915050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561047f57600080fd5b81356001600160a01b038116811461049657600080fd5b9392505050565b6000600182016104af576104af610428565b5060010190565b604051610160810167ffffffffffffffff811182821017156104e857634e487b7160e01b600052604160045260246000fd5b60405290565b805180151581146104fe57600080fd5b919050565b805167ffffffffffffffff811681146104fe57600080fd5b6000610160828403121561052e57600080fd5b6105366104b6565b61053f836104ee565b815261054d602084016104ee565b60208201526040830151604082015261056860608401610503565b606082015261057960808401610503565b608082015261058a60a08401610503565b60a082015261059b60c08401610503565b60c082015260e083810151908201526101008084015190820152610120808401519082015261014092830151928101929092525091905056fea2646970667358221220d920b65db758586d2a1e36589150fddfac3860b49fab684b1329524f9d5f11dd64736f6c63430008110033
  • ADDRESS: 0xE63496a8a9e6bD3aD9270236a890d78239441cF6
  • Deployed to:
    • Optimism

Updates and verifying on Etherscan

ETHERSCAN_API_KEY=abc forge verify-contract address PurchaseDelegator --watch --chain 10

License

SPDX-License-Identifier: AGPL-3.0

About

The checkout portal contract enables buying a Kiwi NFT and delegating your device's key

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published