Skip to content

Commit eb398a3

Browse files
committed
test: add another v-function in local-env
adds: - new `v-function-updated.script` that enables testing of `./partner-chains-node smart-contracts reserve update-settings` command
1 parent c392fe7 commit eb398a3

File tree

6 files changed

+22
-5
lines changed

6 files changed

+22
-5
lines changed

dev/local-environment/configurations/cardano/entrypoint.sh

+12-1
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,16 @@ echo "New address created: $new_address"
8888

8989
dave_address="addr_test1vphpcf32drhhznv6rqmrmgpuwq06kug0lkg22ux777rtlqst2er0r"
9090
eve_address="addr_test1vzzt5pwz3pum9xdgxalxyy52m3aqur0n43pcl727l37ggscl8h7v8"
91+
9192
# An address that will keep an UTXO with script of a test V-function, related to the SPO rewards. See v-function.script file.
9293
vfunction_address="addr_test1vzuasm5nqzh7n909f7wang7apjprpg29l2f9sk6shlt84rqep6nyc"
94+
# total-accrued-function-script-hash (cardano-cli latest transaction policyid --script-file v-function.script)
95+
# ef1eb7b85327a8460799025a5affd0a8d8015731e9aacd5d1106a82b
96+
97+
# updated vfunction address (cardano-cli address build --payment-script-file v-function-updated.script --testnet-magic 42):
98+
vfunction_updated_address="addr_test1wpxhte72udea5ag3umnaukjmyjp8ywsgn2z6alkmhv42nxqcv2vwc"
99+
# total-accrued-function-script-hash (cardano-cli latest transaction policyid --script-file v-function-updated.script)
100+
# 4d75e7cae373da7511e6e7de5a5b2482723a089a85aefedbbb2aa998
93101

94102
# Define the UTXO details and amounts
95103
tx_in1="781cb948a37c7c38b43872af9b1e22135a94826eafd3740260a6db0a303885d8#0"
@@ -103,9 +111,10 @@ tx_out4=1000000000 # partner-chains-node-5 (eve)
103111
tx_out5_lovelace=10000000
104112
tx_out5_reward_token="1000000 $reward_token_policy_id.$reward_token_asset_name"
105113
tx_out6=10000000
114+
tx_out7=10000000
106115

107116
# Total output without fee
108-
total_output=$((tx_out1 + tx_out2 + tx_out3 + tx_out4 + tx_out5_lovelace + tx_out6))
117+
total_output=$((tx_out1 + tx_out2 + tx_out3 + tx_out4 + tx_out5_lovelace + tx_out6 + tx_out7))
109118

110119
fee=1000000
111120

@@ -123,6 +132,8 @@ cardano-cli latest transaction build-raw \
123132
--tx-out "$new_address+$tx_out5_lovelace+$tx_out5_reward_token" \
124133
--tx-out "$vfunction_address+$tx_out6" \
125134
--tx-out-reference-script-file /shared/v-function.script \
135+
--tx-out "$vfunction_updated_address+$tx_out7" \
136+
--tx-out-reference-script-file /shared/v-function-updated.script \
126137
--minting-script-file /shared/reward_token_policy.script \
127138
--mint "$tx_out5_reward_token" \
128139
--fee $fee \
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"type": "PlutusScriptV2",
3+
"description": "V-function that allows to release one token each minute since 2025-02-07 10:46 UTC (timestamp 1738925213000)",
4+
"cborHex": "59072a59072701000033233223222253232335332232353232325333573466e1d20000021323232323232332212330010030023232325333573466e1d2000002132323232323232323232332323233323333323332332332222222222221233333333333300100d00c00b00a00900800700600500400300230013574202460026ae84044c00c8c8c8c94ccd5cd19b87480000084cc8848cc00400c008c070d5d080098029aba135744002260489201035054310035573c0046aae74004dd5000998018009aba100f23232325333573466e1d20000021323232333322221233330010050040030023232325333573466e1d20000021332212330010030023020357420026600803e6ae84d5d100089814a481035054310035573c0046aae74004dd51aba1004300835742006646464a666ae68cdc3a4000004224440062a666ae68cdc3a4004004264244460020086eb8d5d08008a999ab9a3370e9002001099091118010021aba100113029491035054310035573c0046aae74004dd51aba10023300175c6ae84d5d1001111919192999ab9a3370e900100108910008a999ab9a3370e9000001099091180100198029aba10011302a491035054310035573c0046aae74004dd50009aba20013574400226046921035054310035573c0046aae74004dd500098009aba100d30013574201860046004eb4cc00404cd5d080519980200a3ad35742012646464a666ae68cdc3a40000042646466442466002006004646464a666ae68cdc3a40000042664424660020060046600aeb4d5d080098021aba1357440022604c921035054310035573c0046aae74004dd51aba10033232325333573466e1d20000021332212330010030023300575a6ae84004c010d5d09aba2001130264901035054310035573c0046aae74004dd51aba1357440064646464a666ae68cdc3a400000420482a666ae68cdc3a4004004204a2604c921035054310035573c0046aae74004dd5000911919192999ab9a3370e9000001089110010a999ab9a3370e90010010990911180180218029aba100115333573466e1d20040021122200113026491035054310035573c0046aae74004dd500089810a49035054310035573c0046aae74004dd51aba10083300175c6ae8401c8c88c008dd60009813111999aab9f0012028233502730043574200460066ae88008084ccc00c044008d5d0802998008011aba1004300275c40024464460046eac004c09088cccd55cf800901311919a8131991091980080180118031aab9d001300535573c00260086ae8800cd5d080100f98099aba1357440026ae88004d5d10009aba2001357440026ae88004d5d10009aba2001357440026ae88004d5d100089808249035054310035573c0046aae74004dd51aba10073001357426ae8801c8c8c8c94ccd5cd19b87480000084c848888c00c014dd71aba100115333573466e1d20020021321222230010053008357420022a666ae68cdc3a400800426424444600400a600c6ae8400454ccd5cd19b87480180084c848888c010014c014d5d080089808249035054310035573c0046aae74004dd500091919192999ab9a3370e900000109909111111180280418029aba100115333573466e1d20020021321222222230070083005357420022a666ae68cdc3a400800426644244444446600c012010600a6ae84004dd71aba1357440022a666ae68cdc3a400c0042664424444444660040120106eb8d5d08009bae357426ae8800454ccd5cd19b87480200084cc8848888888cc004024020dd71aba1001375a6ae84d5d10008a999ab9a3370e90050010891111110020a999ab9a3370e900600108911111100189807a49035054310035573c0046aae74004dd500091919192999ab9a3370e9000001099091180100198029aba100115333573466e1d2002002132333222122333001005004003375a6ae84008dd69aba1001375a6ae84d5d10009aba20011300e4901035054310035573c0046aae74004dd500091919192999ab9a3370e900000109909118010019bae357420022a666ae68cdc3a400400426424460020066eb8d5d080089806a481035054310035573c0046aae74004dd500091919192999ab9a3370e900000109991091980080180118029aba1001375a6ae84d5d1000898062481035054310035573c0046aae74004dd500091919192999ab9a3370e900000109bae3574200226016921035054310035573c0046aae74004dd500089803a49035054310035573c0046aae74004dd5003111999a8009002919199ab9a337126602044a66a002290001109a801112999ab9a3371e004010260260022600c006600244444444444401066e0ccdc09a9a980091111111111100291001112999a80110a99a80108008b0b0b002a4181520e00e00ca006400a400a6eb401c48800848800440084c00524010350543500232633573800200424002600644a66a002290001109a8011119b800013006003122002122122330010040032323001001223300330020020014c01091b00000194e00505480001"
5+
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"type": "PlutusScriptV2",
3-
"description": "V-function that allows to release one token each minute since 2025-01-01 00:00 UTC (timestamp 1735689600)",
3+
"description": "V-function that allows to release one token each minute since 1975-07-02 21:36 UTC (timestamp 000173568960)",
44
"cborHex": "59072659072301000033233223222253232335332232353232325333573466e1d20000021323232323232332212330010030023232325333573466e1d2000002132323232323232323232332323233323333323332332332222222222221233333333333300100d00c00b00a00900800700600500400300230013574202460026ae84044c00c8c8c8c94ccd5cd19b87480000084cc8848cc00400c008c070d5d080098029aba135744002260489201035054310035573c0046aae74004dd5000998018009aba100f23232325333573466e1d20000021323232333322221233330010050040030023232325333573466e1d20000021332212330010030023020357420026600803e6ae84d5d100089814a481035054310035573c0046aae74004dd51aba1004300835742006646464a666ae68cdc3a4000004224440062a666ae68cdc3a4004004264244460020086eb8d5d08008a999ab9a3370e9002001099091118010021aba100113029491035054310035573c0046aae74004dd51aba10023300175c6ae84d5d1001111919192999ab9a3370e900100108910008a999ab9a3370e9000001099091180100198029aba10011302a491035054310035573c0046aae74004dd50009aba20013574400226046921035054310035573c0046aae74004dd500098009aba100d30013574201860046004eb4cc00404cd5d080519980200a3ad35742012646464a666ae68cdc3a40000042646466442466002006004646464a666ae68cdc3a40000042664424660020060046600aeb4d5d080098021aba1357440022604c921035054310035573c0046aae74004dd51aba10033232325333573466e1d20000021332212330010030023300575a6ae84004c010d5d09aba2001130264901035054310035573c0046aae74004dd51aba1357440064646464a666ae68cdc3a400000420482a666ae68cdc3a4004004204a2604c921035054310035573c0046aae74004dd5000911919192999ab9a3370e9000001089110010a999ab9a3370e90010010990911180180218029aba100115333573466e1d20040021122200113026491035054310035573c0046aae74004dd500089810a49035054310035573c0046aae74004dd51aba10083300175c6ae8401c8c88c008dd60009813111999aab9f0012028233502730043574200460066ae88008084ccc00c044008d5d0802998008011aba1004300275c40024464460046eac004c09088cccd55cf800901311919a8131991091980080180118031aab9d001300535573c00260086ae8800cd5d080100f98099aba1357440026ae88004d5d10009aba2001357440026ae88004d5d10009aba2001357440026ae88004d5d100089808249035054310035573c0046aae74004dd51aba10073001357426ae8801c8c8c8c94ccd5cd19b87480000084c848888c00c014dd71aba100115333573466e1d20020021321222230010053008357420022a666ae68cdc3a400800426424444600400a600c6ae8400454ccd5cd19b87480180084c848888c010014c014d5d080089808249035054310035573c0046aae74004dd500091919192999ab9a3370e900000109909111111180280418029aba100115333573466e1d20020021321222222230070083005357420022a666ae68cdc3a400800426644244444446600c012010600a6ae84004dd71aba1357440022a666ae68cdc3a400c0042664424444444660040120106eb8d5d08009bae357426ae8800454ccd5cd19b87480200084cc8848888888cc004024020dd71aba1001375a6ae84d5d10008a999ab9a3370e90050010891111110020a999ab9a3370e900600108911111100189807a49035054310035573c0046aae74004dd500091919192999ab9a3370e9000001099091180100198029aba100115333573466e1d2002002132333222122333001005004003375a6ae84008dd69aba1001375a6ae84d5d10009aba20011300e4901035054310035573c0046aae74004dd500091919192999ab9a3370e900000109909118010019bae357420022a666ae68cdc3a400400426424460020066eb8d5d080089806a481035054310035573c0046aae74004dd500091919192999ab9a3370e900000109991091980080180118029aba1001375a6ae84d5d1000898062481035054310035573c0046aae74004dd500091919192999ab9a3370e900000109bae3574200226016921035054310035573c0046aae74004dd500089803a49035054310035573c0046aae74004dd5003111999a8009002919199ab9a337126602044a66a002290001109a801112999ab9a3371e004010260260022600c006600244444444444401066e0ccdc09a9a980091111111111100291001112999a80110a99a80108008b0b0b002a4181520e00e00ca006400a400a6eb401c48800848800440084c00524010350543500232633573800200424002600644a66a002290001109a8011119b800013006003122002122122330010040032323001001223300330020020014c01051a677485800001"
55
}

dev/local-environment/configurations/partner-chains-setup/entrypoint.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ echo "Permissioned candidates policy ID: $PERMISSIONED_CANDIDATES_POLICY_ID"
5555
echo "Setting values for NATIVE_TOKEN_POLICY_ID, NATIVE_TOKEN_ASSET_NAME, and ILLIQUID_SUPPLY_VALIDATOR_ADDRESS for chain-spec creation"
5656
export NATIVE_TOKEN_POLICY_ID="1fab25f376bc49a181d03a869ee8eaa3157a3a3d242a619ca7995b2b"
5757
export NATIVE_TOKEN_ASSET_NAME="52657761726420746f6b656e"
58-
export ILLIQUID_SUPPLY_VALIDATOR_ADDRESS="addr_test1wpy8ewg646rg4ce78nl3aassmkquf4wlxcaugqlxwzcylkca0q8v3"
58+
export ILLIQUID_SUPPLY_VALIDATOR_ADDRESS="addr_test1wq0mnff9xtddgxx8wjxt8sx68gxvf06yy2c60tqdgsp8ydsgvu7hq"
5959

6060
echo "Inserting D parameter..."
6161

@@ -195,7 +195,7 @@ jq '.genesis.runtimeGenesis.config.sessionCommitteeManagement.initialAuthorities
195195
]
196196
]' chain-spec.json > tmp.json && mv tmp.json chain-spec.json
197197

198-
echo "Set initial funds to Alice (ecdsa), ?, and Alice (sr25519)"
198+
echo "Setting initial funds to Alice (ecdsa), ?, and Alice (sr25519)"
199199
jq '.genesis.runtimeGenesis.config.balances.balances = [
200200
["5C7C2Z5sWbytvHpuLTvzKunnnRwQxft1jiqrLD5rhucQ5S9X", 1000000000000000],
201201
["5D9eDKbFt4JKaEndQvMmbJYnpX9ENUj8U9UUg1AxSa64FJxE", 1000000000000000],

dev/local-environment/modules/cardano.txt

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
- ./configurations/cardano/keys/op.cert:/keys/node.cert
1818
- ./configurations/cardano/reward_token_policy.script:/shared/reward_token_policy.script
1919
- ./configurations/cardano/v-function.script:/shared/v-function.script
20+
- ./configurations/cardano/v-function-updated.script:/shared/v-function-updated.script
2021
- ./configurations/cardano/config-pool1.json:/shared/node-1-config.json.base
2122
- ./configurations/db-sync/config.json:/shared/db-sync-config.json.base
2223
- ./configurations/genesis/byron/genesis.json:/shared/byron/genesis.json.base

e2e-tests/config/substrate/local_nodes.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"deployment_mc_epoch": 2,
3-
"genesis_utxo": "f8fbe7316561e57de9ecd1c86ee8f8b512a314ba86499ba9a584bfa8fe2edc8d#0",
3+
"genesis_utxo": "34899a3bdf82f3f6257a7018a0dd5d73065feb8aee8f91c803b1626048d3c0a7#0",
44
"main_chain": {
55
"network": "--testnet-magic 42",
66
"epoch_length": 120,

0 commit comments

Comments
 (0)