Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update #14

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
243 changes: 243 additions & 0 deletions .openzeppelin/mainnet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,243 @@
{
"manifestVersion": "3.2",
"proxies": [
{
"address": "0xDA290C4D658c767fA06c27bc2AcaD59bDFCCff4A",
"txHash": "0xb01890d3b4e7fc53a34fe68884d11c39d44f1459c82033a073e34325a7e1a27a",
"kind": "uups"
}
],
"impls": {
"10b93f9270061ac84ec2c9a64684e5743f351fd6746750f8667b2eaf3a37407b": {
"address": "0x1Ad8cec9E5a4A441FE407785E188AbDeb4371468",
"txHash": "0x8987caac69d7013638350abb97f52232dc30596330081898c9061e153233f463",
"layout": {
"solcVersion": "0.8.20",
"storage": [
{
"label": "chainKeyAddress",
"offset": 0,
"slot": "0",
"type": "t_address",
"contract": "OmnityPortContract",
"src": "contracts/OmnityPort.sol:71"
},
{
"label": "lastExecutedSequence",
"offset": 0,
"slot": "1",
"type": "t_uint256",
"contract": "OmnityPortContract",
"src": "contracts/OmnityPort.sol:72"
},
{
"label": "isActive",
"offset": 0,
"slot": "2",
"type": "t_bool",
"contract": "OmnityPortContract",
"src": "contracts/OmnityPort.sol:73"
},
{
"label": "tokens",
"offset": 0,
"slot": "3",
"type": "t_mapping(t_string_memory_ptr,t_struct(TokenInfo)2736_storage)",
"contract": "OmnityPortContract",
"src": "contracts/OmnityPort.sol:74"
},
{
"label": "tokenIds",
"offset": 0,
"slot": "4",
"type": "t_array(t_string_storage)dyn_storage",
"contract": "OmnityPortContract",
"src": "contracts/OmnityPort.sol:75"
},
{
"label": "handledTickets",
"offset": 0,
"slot": "5",
"type": "t_mapping(t_string_memory_ptr,t_bool)",
"contract": "OmnityPortContract",
"src": "contracts/OmnityPort.sol:76"
},
{
"label": "handledDirectives",
"offset": 0,
"slot": "6",
"type": "t_mapping(t_uint256,t_bool)",
"contract": "OmnityPortContract",
"src": "contracts/OmnityPort.sol:77"
},
{
"label": "targetChainFactor",
"offset": 0,
"slot": "7",
"type": "t_mapping(t_string_memory_ptr,t_uint128)",
"contract": "OmnityPortContract",
"src": "contracts/OmnityPort.sol:78"
},
{
"label": "feeTokenFactor",
"offset": 0,
"slot": "8",
"type": "t_uint128",
"contract": "OmnityPortContract",
"src": "contracts/OmnityPort.sol:79"
}
],
"types": {
"t_address": {
"label": "address",
"numberOfBytes": "20"
},
"t_bool": {
"label": "bool",
"numberOfBytes": "1"
},
"t_struct(InitializableStorage)65_storage": {
"label": "struct Initializable.InitializableStorage",
"members": [
{
"label": "_initialized",
"type": "t_uint64",
"offset": 0,
"slot": "0"
},
{
"label": "_initializing",
"type": "t_bool",
"offset": 8,
"slot": "0"
}
],
"numberOfBytes": "32"
},
"t_struct(OwnableStorage)14_storage": {
"label": "struct OwnableUpgradeable.OwnableStorage",
"members": [
{
"label": "_owner",
"type": "t_address",
"offset": 0,
"slot": "0"
}
],
"numberOfBytes": "32"
},
"t_uint64": {
"label": "uint64",
"numberOfBytes": "8"
},
"t_array(t_string_storage)dyn_storage": {
"label": "string[]",
"numberOfBytes": "32"
},
"t_mapping(t_string_memory_ptr,t_bool)": {
"label": "mapping(string => bool)",
"numberOfBytes": "32"
},
"t_mapping(t_string_memory_ptr,t_struct(TokenInfo)2736_storage)": {
"label": "mapping(string => struct OmnityPortContract.TokenInfo)",
"numberOfBytes": "32"
},
"t_mapping(t_string_memory_ptr,t_uint128)": {
"label": "mapping(string => uint128)",
"numberOfBytes": "32"
},
"t_mapping(t_uint256,t_bool)": {
"label": "mapping(uint256 => bool)",
"numberOfBytes": "32"
},
"t_string_memory_ptr": {
"label": "string",
"numberOfBytes": "32"
},
"t_string_storage": {
"label": "string",
"numberOfBytes": "32"
},
"t_struct(TokenInfo)2736_storage": {
"label": "struct OmnityPortContract.TokenInfo",
"members": [
{
"label": "name",
"type": "t_string_storage",
"offset": 0,
"slot": "0"
},
{
"label": "symbol",
"type": "t_string_storage",
"offset": 0,
"slot": "1"
},
{
"label": "decimals",
"type": "t_uint8",
"offset": 0,
"slot": "2"
},
{
"label": "erc20ContractAddr",
"type": "t_address",
"offset": 1,
"slot": "2"
},
{
"label": "settlementChainId",
"type": "t_string_storage",
"offset": 0,
"slot": "3"
}
],
"numberOfBytes": "128"
},
"t_uint128": {
"label": "uint128",
"numberOfBytes": "16"
},
"t_uint256": {
"label": "uint256",
"numberOfBytes": "32"
},
"t_uint8": {
"label": "uint8",
"numberOfBytes": "1"
}
},
"namespaces": {
"erc7201:openzeppelin.storage.Ownable": [
{
"contract": "OwnableUpgradeable",
"label": "_owner",
"type": "t_address",
"src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:24",
"offset": 0,
"slot": "0"
}
],
"erc7201:openzeppelin.storage.Initializable": [
{
"contract": "Initializable",
"label": "_initialized",
"type": "t_uint64",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:69",
"offset": 0,
"slot": "0"
},
{
"contract": "Initializable",
"label": "_initializing",
"type": "t_bool",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:73",
"offset": 8,
"slot": "0"
}
]
}
}
}
}
}
2 changes: 2 additions & 0 deletions contracts/OmnityPort.sol
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,8 @@ contract OmnityPortContract is
return false;
}
}


return true;
} else {
return false;
Expand Down
4 changes: 4 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ const config: HardhatUserConfig = {
}
},
networks: {
ethereum: {
url: `https://1rpc.io/eth`,
accounts: [DEPLOY_PRI_KEY],
},
bevm: {
url: `https://rpc-mainnet-1.bevm.io`,
accounts: [DEPLOY_PRI_KEY],
Expand Down
9 changes: 9 additions & 0 deletions scripts/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,17 @@ const { ethers, upgrades } = require("hardhat");
async function main() {
const OmnityPort = await ethers.getContractFactory("OmnityPortContract");
const omnityPort = await upgrades.deployProxy(OmnityPort, ["0xef1A4FdB2D67350Ec777e75F76be08E3542b993f"]);

await omnityPort.waitForDeployment();
console.log("OmnityPort deployed to:", await omnityPort.getAddress());
}
/*async function main() {
const OmnityPort = await ethers.getContractFactory("OmnityPortContract");
const omnityPort = await upgrades.deployProxy(OmnityPort, ["0xef1A4FdB2D67350Ec777e75F76be08E3542b993f"], {
useDeployedImplementation: true
});

await omnityPort.waitForDeployment();
console.log("OmnityPort deployed to:", await omnityPort.getAddress());
}*/
main();