-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from pnetwork-association/chore/xerc20-tests
Add xERC20 tests
- Loading branch information
Showing
17 changed files
with
2,214 additions
and
137 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
408 changes: 408 additions & 0 deletions
408
solidity/broadcast/Deploy.s.sol/11155111/run-latest.json
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{ | ||
"transactions": [ | ||
{ | ||
"hash": "0xff34ec9f4234dba91c332690c09ed65fae2b486411ed3a5edfb76292fa97fc15", | ||
"transactionType": "CALL", | ||
"contractName": null, | ||
"contractAddress": "0x6379ebd504941f50d5bfde9348b37593bd29c835", | ||
"function": "transfer(address,uint256)", | ||
"arguments": [ | ||
"0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", | ||
"10000000000000000000" | ||
], | ||
"transaction": { | ||
"from": "0xa0ee7a142d267c1f36714e4a8f75612f20a79720", | ||
"to": "0x6379ebd504941f50d5bfde9348b37593bd29c835", | ||
"gas": "0x1167a", | ||
"value": "0x0", | ||
"input": "0xa9059cbb000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb922660000000000000000000000000000000000000000000000008ac7230489e80000", | ||
"nonce": "0x1d", | ||
"chainId": "0x1" | ||
}, | ||
"additionalContracts": [], | ||
"isFixedGasLimit": false | ||
} | ||
], | ||
"receipts": [ | ||
{ | ||
"status": "0x1", | ||
"cumulativeGasUsed": "0xc99e", | ||
"logs": [ | ||
{ | ||
"address": "0x6379ebd504941f50d5bfde9348b37593bd29c835", | ||
"topics": [ | ||
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", | ||
"0x000000000000000000000000a0ee7a142d267c1f36714e4a8f75612f20a79720", | ||
"0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" | ||
], | ||
"data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000", | ||
"blockHash": "0xed02cfa6b3e137d0e0494cdd54b64215c9306083dd499978ba2f3ecf8e473f84", | ||
"blockNumber": "0xb", | ||
"blockTimestamp": "0x66a8e65b", | ||
"transactionHash": "0xff34ec9f4234dba91c332690c09ed65fae2b486411ed3a5edfb76292fa97fc15", | ||
"transactionIndex": "0x0", | ||
"logIndex": "0x0", | ||
"removed": false | ||
} | ||
], | ||
"logsBloom": "0x00000000000000000000040000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000008000000200000000000000000000000000100000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000200000000000000000000000002000000000004000000000000000000000000000000000000000000000000004000000000000000000000000", | ||
"type": "0x2", | ||
"transactionHash": "0xff34ec9f4234dba91c332690c09ed65fae2b486411ed3a5edfb76292fa97fc15", | ||
"transactionIndex": "0x0", | ||
"blockHash": "0xed02cfa6b3e137d0e0494cdd54b64215c9306083dd499978ba2f3ecf8e473f84", | ||
"blockNumber": "0xb", | ||
"gasUsed": "0xc99e", | ||
"effectiveGasPrice": "0x12a8b971", | ||
"blobGasPrice": "0x1", | ||
"from": "0xa0ee7a142d267c1f36714e4a8f75612f20a79720", | ||
"to": "0x6379ebd504941f50d5bfde9348b37593bd29c835", | ||
"contractAddress": null, | ||
"root": "0xb20c0af921641841cfc8e36e9d6e80957fd34c48e9db721bef83b73e61def40e" | ||
} | ||
], | ||
"libraries": [], | ||
"pending": [], | ||
"returns": {}, | ||
"timestamp": 1722345051, | ||
"chain": 1, | ||
"commit": "f9e6adb" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
./Script.sh "Deploy.s.sol" "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity ^0.8.13; | ||
|
||
import "forge-std/Script.sol"; | ||
import "forge-std/console.sol"; | ||
import "../src/PAM.sol"; | ||
|
||
contract PAMScript is Script { | ||
function setTeeSigner( | ||
address pam, | ||
bytes calldata pubKey, | ||
bytes memory attestation | ||
) external { | ||
vm.startBroadcast(); | ||
PAM(pam).setTeeSigner(pubKey, attestation); | ||
vm.stopBroadcast(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
./Script.sh "PAM.s.sol" "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
show_usage() { | ||
echo "Usage:" | ||
echo "$(basename "$0") <recipient> <token-address> <amount>" | ||
} | ||
|
||
if [[ -z "$1" ]]; then | ||
echo "Invalid recipient" | ||
show_usage | ||
exit 1 | ||
fi | ||
|
||
if [[ -z "$2" ]]; then | ||
echo "Invalid token-address" | ||
show_usage | ||
exit 1 | ||
fi | ||
|
||
if [[ -z "$3" ]]; then | ||
echo "Invalid amount" | ||
show_usage | ||
exit 1 | ||
fi | ||
|
||
cast calldata "pegOut(address,address,uint256)" "$1" "$2" "$3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.