Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cmp20test
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
explorer-for-cmp20
cmp20test
Commits
5e86d963
Commit
5e86d963
authored
Dec 16, 2025
by
Developer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add script for test evm
parent
f89e27c4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
0 deletions
+59
-0
testevm.js
scripts/testevm.js
+59
-0
No files found.
scripts/testevm.js
0 → 100644
View file @
5e86d963
const
{
ContractFactory
}
=
require
(
"
ethers
"
);
const
hre
=
require
(
"
hardhat
"
);
async
function
test
()
{
const
signer
=
new
hre
.
ethers
.
Wallet
(
process
.
env
.
DEPLOY_PRIVATE_KEY
,
hre
.
ethers
.
provider
);
const
chainId
=
await
hre
.
ethers
.
provider
.
getNetwork
().
then
(
network
=>
network
.
chainId
);
const
TestMCOPY
=
await
ethers
.
getContractFactory
(
"
TestMCOPY
"
);
testMCOPY
=
await
TestMCOPY
.
deploy
();
await
testMCOPY
.
waitForDeployment
();
console
.
log
(
"
Calling TestMCOPY.testExplicitMCopy()
"
);
const
result
=
await
testMCOPY
.
testExplicitMCopy
();
console
.
log
(
"
Result:
"
,
result
);
const
TTest
=
await
ethers
.
getContractFactory
(
"
TTest
"
);
ttest
=
await
TTest
.
deploy
();
await
ttest
.
waitForDeployment
();
console
.
log
(
"
Calling TTest.testBASEFEE()
"
);
const
basefee
=
await
ttest
.
testBASEFEE
();
console
.
log
(
"
Result:
"
,
basefee
.
toString
());
console
.
log
(
"
Calling TTest.testPREVRANDAO()
"
);
const
prevrandao
=
await
ttest
.
testPREVRANDAO
();
console
.
log
(
"
Result:
"
,
prevrandao
.
toString
());
try
{
console
.
log
(
"
Calling TTest.testBLOBHASH()
"
);
const
blobhash
=
await
ttest
.
testBLOBHASH
();
console
.
log
(
"
Result:
"
,
blobhash
);
}
catch
(
error
)
{
console
.
error
(
"
Error calling testBLOBHASH:
"
,
error
.
message
);
}
console
.
log
(
"
Calling TTest.testBLOBFEE()
"
);
const
blobfee
=
await
ttest
.
testBLOBFEE
();
console
.
log
(
"
Result:
"
,
blobfee
.
toString
());
try
{
console
.
log
(
"
Calling TTest.test()
"
);
const
tx
=
await
ttest
.
test
();
await
tx
.
wait
();
console
.
log
(
"
TTest.test() called successfully
"
);
}
catch
(
error
)
{
console
.
error
(
"
Error calling test:
"
,
error
.
message
);
}
}
// Define the script
async
function
main
()
{
await
test
()
}
// Run the script
main
().
catch
((
error
)
=>
{
console
.
error
(
"
Error:
"
,
error
);
});
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment