Context & versions
Not specified in original ticket.
Steps to reproduce
- Deploy the following contract:
import CompactStandardLibrary;
export ledger c: List<Vector<2, ContractAddress>>;
export ledger k: Kernel;
circuit getVector(): Vector<2, ContractAddress> {
return [kernel.self(), k.self()];
}
export circuit test(): [] {
const zero = default<Vector<2, ContractAddress>>;
const one = getVector();
assert c.is_empty() == true "Structure should be empty";
assert c.length() == 0 "Size should be 0";
assert c.head().is_some == false "Head should not exist";
c.push_front(zero);
assert c.length() == 1 "Size should be 1";
assert c.head().is_some == true "Head should exist";
assert c.head().value == zero "Head should have value 0";
c.push_front(one);
assert c.length() == 2 "Size should be 2";
assert c.head().is_some == true "Head should exist";
assert c.head().value == one "Head should have value 1";
c.reset_to_default();
assert c.is_empty() == true "Structure should be empty";
assert c.length() == 0 "Size should be 0";
}
- Call the
test circuit on the deployed contract.
Actual behavior
Error: exceeded structure bounds
Expected behavior
The test circuit should execute without error. All assertions should pass and the ledger state should be consistent with the operations performed.
Migrated from PM-15087
Context & versions
Not specified in original ticket.
Steps to reproduce
testcircuit on the deployed contract.Actual behavior
Expected behavior
The
testcircuit should execute without error. All assertions should pass and the ledger state should be consistent with the operations performed.Migrated from PM-15087